MCPcopy Create free account
hub / github.com/Snapchat/Valdi / isExternalOrCommonJsModule

Function isExternalOrCommonJsModule

compiler/companion/src/AST.ts:530–532  ·  view source on GitHub ↗
(file: ts.SourceFile)

Source from the content-addressed store, hash-verified

528
529export function getImportStringLiteralsFromSourceFile(sourceFile: ts.SourceFile): ts.StringLiteral[] {
530 const output: ts.StringLiteral[] = [];
531 for (const statement of sourceFile.statements) {
532 if (ts.isImportDeclaration(statement)) {
533 const importDeclaration: ts.ImportDeclaration = statement;
534 if (ts.isStringLiteral(importDeclaration.moduleSpecifier)) {
535 output.push(importDeclaration.moduleSpecifier);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected