UNPKG

@tsed/cli

Version:
14 lines (13 loc) 347 B
import { injectable } from "@tsed/cli-core"; export function defineTemplate(opts) { const provider = injectable(Symbol.for(`TEMPLATE:${opts.id}`)) .type("CLI_TEMPLATES") .factory(() => ({ ext: "ts", ...opts })); if (opts.hooks) { provider.hooks(opts.hooks); } return provider.token(); }