refactor(compiler-cli): return TS nodes from TypeTranslatorVisitor (#28342)
The TypeTranslatorVisitor visitor returned strings because before it wasn't possible to transform declaration files directly through the TypeScript custom transformer API. Now that's possible though, so it should return nodes instead. PR Close #28342
This commit is contained in:
@ -57,8 +57,7 @@ export class DtsFileTransformer {
|
||||
const decls = this.ivyFields.get(node.name.text) !;
|
||||
const newMembers = decls.map(decl => {
|
||||
const modifiers = [ts.createModifier(ts.SyntaxKind.StaticKeyword)];
|
||||
const type = translateType(decl.type, this.imports);
|
||||
const typeRef = ts.createTypeReferenceNode(ts.createIdentifier(type), undefined);
|
||||
const typeRef = translateType(decl.type, this.imports);
|
||||
return ts.createProperty(undefined, modifiers, decl.name, undefined, typeRef, undefined);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user