How to use the createLiteral function from typescript
Find comprehensive JavaScript typescript.createLiteral code examples handpicked from public code repositorys.
129 130 131 132 133 134 135 136 137 138
function createResourceImport(node, loader, resourceImportDeclarations, moduleKind = ts.ModuleKind.ES2015) { const url = getResourceUrl(node, loader); if (!url) { return null; } const urlLiteral = ts.createLiteral(url); if (moduleKind < ts.ModuleKind.ES2015) { return ts.createPropertyAccess(ts.createCall(ts.createIdentifier('require'), [], [urlLiteral]), 'default'); } else {
0
0
1
+ 3 other calls in file
typescript.SyntaxKind is the most popular function in typescript (82777 examples)