From e787e5d5a5e692c0918509d24f445bdc51f74ddd Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Tue, 4 Oct 2022 20:41:44 +0200 Subject: [PATCH] Support `exports.[identifier]` syntax --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 2898619dc..c7f3c27c9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -106,6 +106,8 @@ export async function run(configuration: Configuration) { identifier = declaration; } else if (declaration.isKind(ts.SyntaxKind.FunctionDeclaration)) { identifier = declaration.getFirstChildByKindOrThrow(ts.SyntaxKind.Identifier); + } else if (declaration.isKind(ts.SyntaxKind.PropertyAccessExpression)) { + identifier = declaration.getLastChildByKindOrThrow(ts.SyntaxKind.Identifier); } else { identifier = declaration.getFirstDescendantByKind(ts.SyntaxKind.Identifier); }