* A type constructor operation which produces type constructor code for a particular directive.
| 771 | * A type constructor operation which produces type constructor code for a particular directive. |
| 772 | */ |
| 773 | class TypeCtorOp implements Op { |
| 774 | constructor( |
| 775 | readonly ref: Reference<ClassDeclaration<ts.ClassDeclaration>>, |
| 776 | readonly reflector: ReflectionHost, |
| 777 | readonly meta: TypeCtorMetadata, |
| 778 | ) {} |
| 779 | |
| 780 | /** |
| 781 | * Type constructor operations are inserted immediately before the end of the directive class. |
| 782 | */ |
| 783 | get splitPoint(): number { |
| 784 | return this.ref.node.end - 1; |
| 785 | } |
| 786 | |
| 787 | execute(im: ImportManager, sf: ts.SourceFile, refEmitter: ReferenceEmitter): string { |
| 788 | const emitEnv = new ReferenceEmitEnvironment(im, refEmitter, sf); |
| 789 | return generateInlineTypeCtor(emitEnv, this.ref.node, this.meta); |
| 790 | } |
| 791 | } |
nothing calls this directly
no outgoing calls
no test coverage detected