* A type constructor operation which produces type constructor code for a particular directive.
| 754 | * A type constructor operation which produces type constructor code for a particular directive. |
| 755 | */ |
| 756 | class TypeCtorOp implements Op { |
| 757 | constructor( |
| 758 | readonly ref: Reference<ClassDeclaration<ts.ClassDeclaration>>, |
| 759 | readonly reflector: ReflectionHost, |
| 760 | readonly meta: TypeCtorMetadata, |
| 761 | ) {} |
| 762 | |
| 763 | /** |
| 764 | * Type constructor operations are inserted immediately before the end of the directive class. |
| 765 | */ |
| 766 | get splitPoint(): number { |
| 767 | return this.ref.node.end - 1; |
| 768 | } |
| 769 | |
| 770 | execute(im: ImportManager, sf: ts.SourceFile, refEmitter: ReferenceEmitter): string { |
| 771 | const emitEnv = new ReferenceEmitEnvironment(im, refEmitter, sf); |
| 772 | return generateInlineTypeCtor(emitEnv, this.ref.node, this.meta); |
| 773 | } |
| 774 | } |
nothing calls this directly
no outgoing calls
no test coverage detected