From 1a590ef8f666cb5e4d2aa0e54ed549e239261208 Mon Sep 17 00:00:00 2001 From: Gabriela Araujo Britto Date: Tue, 3 Mar 2020 14:29:39 -0800 Subject: [PATCH 1/3] Return ES as export kind for dts --- index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/index.ts b/index.ts index 99cb98d..6a9b3cb 100644 --- a/index.ts +++ b/index.ts @@ -640,10 +640,12 @@ function getDtsExportKind(sourceFile: ts.SourceFile): InferenceResult Date: Thu, 5 Mar 2020 16:43:23 -0800 Subject: [PATCH 2/3] Update --- index.ts | 5 ----- package-lock.json | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/index.ts b/index.ts index 6a9b3cb..ff44591 100644 --- a/index.ts +++ b/index.ts @@ -641,11 +641,6 @@ function getDtsExportKind(sourceFile: ts.SourceFile): InferenceResult Date: Thu, 5 Mar 2020 17:14:11 -0800 Subject: [PATCH 3/3] Remove unused code --- index.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/index.ts b/index.ts index ff44591..2e11569 100644 --- a/index.ts +++ b/index.ts @@ -811,19 +811,6 @@ function isExportEquals(node: ts.Node): boolean { return ts.isExportAssignment(node) && !!node.isExportEquals; } -function isExportConstruct(node: ts.Node): boolean { - return ts.isExportAssignment(node) - || ts.isExportDeclaration(node) - || hasExportModifier(node); -} - -function hasExportModifier(node: ts.Node): boolean { - if (node.modifiers) { - return node.modifiers.some(modifier => modifier.kind === ts.SyntaxKind.ExportKeyword); - } - return false; -} - function matches(srcFile: ts.SourceFile, predicate: (n: ts.Node) => boolean): boolean { function matchesNode(node: ts.Node): boolean { if (predicate(node)) return true;