mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-06 08:18:18 +00:00
test: guard TypeScript modifier inspection
This commit is contained in:
1 parent
d0be2968c2
commit
6cc06bf20f
1 file changed
+1
@@ -13,6 +13,7 @@ function parseSourceFile(filePath: string): ts.SourceFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function hasExportModifier(statement: ts.Statement): boolean {
|
function hasExportModifier(statement: ts.Statement): boolean {
|
||||||
|
if (!ts.canHaveModifiers(statement)) return false;
|
||||||
return ts.getModifiers(statement)?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword) ?? false;
|
return ts.getModifiers(statement)?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword) ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user