UNPKG

929 BTypeScriptView Raw
1interface StoryData {
2 viewMode?: string;
3 storyId?: string;
4}
5interface SeparatorOptions {
6 rootSeparator: string | RegExp;
7 groupSeparator: string | RegExp;
8}
9export declare const knownNonViewModesRegex: RegExp;
10export declare const sanitize: (string: string) => string;
11export declare const toId: (kind: string, name: string) => string;
12export declare const parsePath: (path?: string) => StoryData;
13interface Query {
14 [key: string]: any;
15}
16export declare const queryFromString: (s: string) => Query;
17export declare const queryFromLocation: (location: { search: string }) => Query;
18export declare const stringifyQuery: (query: Query) => any;
19export declare const getMatch: (
20 current: string,
21 target: string,
22 startsWith?: boolean
23) => {
24 path: string;
25};
26export declare const parseKind: (
27 kind: string,
28 { rootSeparator, groupSeparator }: SeparatorOptions
29) => {
30 root: string;
31 groups: string[];
32};
33export {};