How to use the createVariableDeclaration function from typescript
Find comprehensive JavaScript typescript.createVariableDeclaration code examples handpicked from public code repositorys.
293 294 295 296 297 298 299 300 301 302
function createWrappedEnum(name, hostNode, statements, literalInitializer = ts.createObjectLiteral(), addExportModifier = false) { const node = addExportModifier ? ts.updateVariableStatement(hostNode, [ts.createToken(ts.SyntaxKind.ExportKeyword)], hostNode.declarationList) : hostNode; const innerVarStmt = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([ ts.createVariableDeclaration(name, undefined, literalInitializer), ])); const innerReturn = ts.createReturn(ts.createIdentifier(name)); const iife = ts.createImmediatelyInvokedFunctionExpression([ innerVarStmt,
0
0
1
+ 3 other calls in file
typescript.SyntaxKind is the most popular function in typescript (82777 examples)