How to use the updateExportDeclaration function from typescript

Find comprehensive JavaScript typescript.updateExportDeclaration code examples handpicked from public code repositorys.

19
20
21
22
23
24
25
26
27
28
29
    if (fs.existsSync(abs + '.ts') || fs.existsSync(abs + '.tsx')) {
        return ts.updateExportDeclaration(exportNode, exportNode.decorators, exportNode.modifiers, exportNode.exportClause, ts.createStringLiteral(file + '.js'), exportNode.typeOnly);
    }
    if (fs.existsSync(abs + '/')) {
        const indexFile = `${file}/index.js`;
        return ts.updateExportDeclaration(exportNode, exportNode.decorators, exportNode.modifiers, exportNode.exportClause, ts.createStringLiteral(indexFile), exportNode.typeOnly);
    }
}


function visitImportNode(importNode, sourceFile, options) {
fork icon0
star icon2
watch icon1

+ 59 other calls in file

Other functions in typescript

Sorted by popularity

function icon

typescript.SyntaxKind is the most popular function in typescript (82777 examples)