How to use the updateClassDeclaration function from typescript
Find comprehensive JavaScript typescript.updateClassDeclaration code examples handpicked from public code repositorys.
216 217 218 219 220 221 222 223 224 225
} else if (ts.isInterfaceDeclaration(s)) { return ts.updateInterfaceDeclaration(s, s.decorators, modifiers, s.name, s.typeParameters, s.heritageClauses, s.members); } else if (ts.isEnumDeclaration(s)) { return ts.updateEnumDeclaration(s, s.decorators, modifiers, s.name, s.members); } else if (ts.isClassDeclaration(s)) { return ts.updateClassDeclaration(s, s.decorators, modifiers, s.name, s.typeParameters, s.heritageClauses, s.members); } else if (ts.isFunctionDeclaration(s)) { return ts.updateFunctionDeclaration(s, s.decorators, modifiers, s.asteriskToken, s.name, s.typeParameters, s.parameters, s.type, s.body); } return s;
116
294
29
+ 3 other calls in file
16 17 18 19 20 21 22 23 24 25
const visitNode = (node) => { if (ts.isClassDeclaration(node)) { const decorators = ts.visitNodes(node.decorators, node => ts.isDecorator(node) ? visitDecorator(node, typeChecker, directTemplateLoading, resourceImportDeclarations, moduleKind) : node); return ts.updateClassDeclaration(node, decorators, node.modifiers, node.name, node.typeParameters, node.heritageClauses, node.members); } return ts.visitEachChild(node, visitNode, context); }; return (sourceFile) => {
0
0
1
typescript.SyntaxKind is the most popular function in typescript (82777 examples)