UNPKG

polen

Version:

A framework for delightful GraphQL developer portals

46 lines (44 loc) 1.21 kB
export interface Options { /** * @default '/' */ separator?: string; /** * When false, virtual modules will be prefixed with \\0 to avoid being processed by other plugins. * @see https://vitejs.dev/guide/api-plugin.html#virtual-modules-convention * @default false */ allowPluginProcessing?: boolean; } export interface Identifier { id: string; resolved: string; namespace: string | null; separator: string; } export declare const defaults: { readonly allowPluginProcessing: false; readonly separator: "/"; }; export declare const create: (parameters: { id: string; namespace?: string; separator?: string; allowPluginProcessing?: boolean; }) => Identifier; export interface Factory { (idSegments: string[], options?: Options): Identifier; /** * The prefix that ids returned from this factory will have. */ prefix: string; /** * Does the given id have a prefix that matches this factory? */ includes: (id: string) => boolean; } export declare const createFactory: (parameters: { namespace: string; separator?: string; }) => Factory; //# sourceMappingURL=identifier.d.ts.map