How to use the isExportDeclaration function from typescript

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

157
158
159
160
161
162
163
164
165
166
function mustBeHoisted(s, isGlobal) {
    return (
        // Import/export statements must be moved to the top
        ts.isImportDeclaration(s) ||
        ts.isImportEqualsDeclaration(s) ||
        ts.isExportDeclaration(s) ||
        ts.isExportAssignment(s) ||
        // as well as many declarations
        ts.isTypeAliasDeclaration(s) ||
        ts.isInterfaceDeclaration(s) ||
fork icon116
star icon294
watch icon29

157
158
159
160
161
162
163
164
165
166

if (sourceFile) {
  ts.forEachChild(sourceFile, (node) => {
    if (
      ts.isImportDeclaration(node) ||
      ts.isExportDeclaration(node) ||
      ts.isImportEqualsDeclaration(node) ||
      ts.isExportAssignment(node)
    ) {
      const moduleName = node.moduleSpecifier?.text;
fork icon0
star icon0
watch icon1

+ 18 other calls in file

217
218
219
220
221
222
223
224
225
226
  return;

let containsReExport = false;
ts.forEachChild(importedModule, (child) => {
  const potentialReExport =
    ts.isExportDeclaration(child) &&
    child.moduleSpecifier !== undefined &&
    !child.isTypeOnly;
  if (!potentialReExport) return;
  const transitiveImportInfo = ts.getResolvedModule(
fork icon0
star icon0
watch icon2

+ 19 other calls in file

Other functions in typescript

Sorted by popularity

function icon

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