UNPKG

@salesforce/templates

Version:

Salesforce JS library for templates

32 lines (31 loc) 1.27 kB
import { type CreateOutput, GeneratorClass, TemplateOptions, TemplateType } from '../utils/types'; export declare function importGenerator<TOptions extends TemplateOptions>(templateType: TemplateType): GeneratorClass<TOptions>; /** * Template Service */ export declare class TemplateService { private static instance; private _cwd; constructor(cwd?: string); /** * Get an instance of TemplateService * @param cwd cwd of current environment. CLI: don't need to set explicitly. VS Code: it's typically the root workspace path */ static getInstance(cwd?: string): TemplateService; /** * Getting cwd of current environment */ get cwd(): string; /** * Setting cwd of current environment * In VS Code, it's typically the root workspace path */ set cwd(cwd: string); /** * Create using templates * @param templateType template type * @param templateOptions template options * @param customTemplatesRootPathOrGitRepo custom templates root path or git repo. If not specified, use built-in templates */ create<TOptions extends TemplateOptions>(templateType: TemplateType, templateOptions: TOptions, customTemplatesRootPathOrGitRepo?: string): Promise<CreateOutput>; }