export type TemplateHelper = readonly [ name: string, fn: (path: string | undefined, data: unknown) => unknown ]; /** The generic type a template can have as its input. */ export interface TemplateData { helpers?: H; [key: string]: unknown; } /** The generic type a template can have as its text used to write files */ export interface SourceTemplateData { filename: string; helpers?: H; [key: string]: unknown; } /** The parameters you can provide a template with */ export type Commands = Arg | [cmd: 'each', arg: Arg] | [cmd: '/each'] | [cmd: 'if', arg: Arg] | [cmd: 'else'] | [cmd: '/if'] | (undefined extends T['helpers'] ? void : [cmd: `$${Exclude[number][0]}`, args?: Arg]); export type KeysOf | readonly unknown[], Key extends keyof T = KeysOfUnion> = Key extends string | number ? NonNullable extends Record | readonly unknown[] ? (Key & string) | `${T extends readonly unknown[] ? Key | '@' : Key}.${NonNullable extends readonly unknown[] ? KeysOf> | '@' : KeysOf>}` : `${T extends readonly unknown[] ? Exclude | '@' : Key}` : never; type KeysOfUnion = T extends T ? keyof T : never; export {}; //# sourceMappingURL=types.d.ts.map