mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Assert type of node object.
This commit is contained in:
parent
0908af9100
commit
4c856621c5
1 changed files with 3 additions and 1 deletions
|
@ -5,7 +5,9 @@ import * as commandLineArgs from "command-line-args"
|
|||
/** True if this is visible outside this file, false otherwise */
|
||||
function isNodeExported(node: ts.Node): boolean {
|
||||
return (
|
||||
(ts.getCombinedModifierFlags(node) & ts.ModifierFlags.Export) !== 0 ||
|
||||
(ts.getCombinedModifierFlags(<ts.Declaration>node) &
|
||||
ts.ModifierFlags.Export) !==
|
||||
0 ||
|
||||
(!!node.parent && node.parent.kind === ts.SyntaxKind.SourceFile)
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue