declare module '@ember/template-compiler/lib/types' { import type { ASTPluginEnvironment, builders, PrecompileOptions, PrecompileOptionsWithLexicalScope, } from '@glimmer/syntax'; export type Builders = typeof builders; export type PluginFunc = NonNullable< NonNullable['ast'] >[number]; export type LexicalScope = NonNullable; interface Plugins { ast: PluginFunc[]; } export interface EmberPrecompileOptions extends PrecompileOptions { isProduction?: boolean; moduleName?: string; plugins?: Plugins; lexicalScope?: LexicalScope; /** * This supports template blocks defined in class bodies. * * Manual form: * * ```ts * class MyComponent { * static { * template(templateContent, { * component: this, * eval: () => eval(arguments[0]) * }) * } * } * ``` * * GJS form (compiled to the manual form via `content-tag`): * * ```ts * class MyComponent { * * } * ``` */ component?: object; eval?: (value: string) => unknown; scope?: () => Record; } export type EmberASTPluginEnvironment = ASTPluginEnvironment & EmberPrecompileOptions; export {}; }