Created
March 20, 2017 00:06
-
-
Save unlocomqx/70accec959e41b27be51bf01c96d0b36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getSourceFileOfNode(node) { | |
while (node && node.kind !== 256 /* SourceFile */) { | |
if (node.text == 'NgModule'){ | |
return node; | |
} | |
node = node.parent; | |
} | |
return node; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment