mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-19 11:06:04 +00:00
test: guard TypeScript modifier inspection
This commit is contained in:
@@ -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