import { RttiVisitor } from "./rtti-visitor-base"; import * as ts from 'typescript'; import { RttiContext } from "./rtti-context"; import { MetadataEncoder } from "./metadata-encoder"; import { ExternalDecorator, MetadataCollector } from "./metadata-collector"; export declare class MetadataEmitter extends RttiVisitor { static emit(sourceFile: ts.SourceFile, ctx: RttiContext): ts.SourceFile; metadataEncoder: MetadataEncoder; collector: MetadataCollector; /** * The outboard metadata collector is used for class elements which are compiled away in the * resulting Javascript, for instance abstract methods. In that case the decorators on the * item are discarded. So instead we collect the metadata for placement outside the class * definition, which is the nearest place where it is valid to insert a call expression. */ outboardCollector: MetadataCollector; collectMetadata(callback: () => T): { node: T; decorators: ExternalDecorator[]; }; /** * In some cases we need to collect all metadata under an entire node subtree. An example is for class expressions * which are not valid decorator targets, but we still support emitting for them. * @param callback * @returns */ collectAllMetadata(callback: () => T): { node: T; decorators: ExternalDecorator[]; }; scope(nameScope: ts.ClassDeclaration | ts.ClassExpression | ts.InterfaceDeclaration, callback: () => T): T; protected everyNode(node: ts.Node): boolean | void; property(decl: ts.PropertyDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration): ts.PropertyDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration; propertySignature(signature: ts.PropertySignature): ts.PropertySignature; class(decl: ts.ClassDeclaration): ts.ClassDeclaration | (ts.ExpressionStatement | ts.ClassDeclaration)[]; export(decl: ts.ExportDeclaration): ts.ExportDeclaration | ts.Statement[]; private exportInterfaceToken; enum(decl: ts.EnumDeclaration): ts.EnumDeclaration | (ts.ExpressionStatement | ts.EnumDeclaration)[]; interface(decl: ts.InterfaceDeclaration): (ts.VariableStatement | ts.ExpressionStatement | ts.InterfaceDeclaration | ts.ExportDeclaration)[]; functionDecl(decl: ts.FunctionDeclaration): ts.VariableStatement | (ts.ExpressionStatement | ts.FunctionDeclaration)[]; functionExpr(decl: ts.FunctionExpression | ts.ArrowFunction): ts.CallExpression; classExpr(decl: ts.ClassExpression): ts.CallExpression; method(decl: ts.MethodDeclaration): ts.MethodDeclaration; methodSignature(node: ts.MethodSignature): ts.MethodSignature; emitOutboardMetadataExpressions(node: NodeT, outboardMetadata: { node: NodeT; decorators: ExternalDecorator[]; }): ts.Expression[]; emitOutboardMetadata(node: NodeT, outboardMetadata: { node: NodeT; decorators: ExternalDecorator[]; }): ts.ExpressionStatement[]; } //# sourceMappingURL=metadata-emitter.d.ts.map