MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / findModule

Function findModule

packages/alphatab/scripts/TypeSchema.ts:405–419  ·  view source on GitHub ↗
(type: ts.Type, options: ts.CompilerOptions)

Source from the content-addressed store, hash-verified

403}
404
405function findModule(type: ts.Type, options: ts.CompilerOptions) {
406 if (type.symbol && type.symbol.declarations) {
407 for (const decl of type.symbol.declarations) {
408 const file = decl.getSourceFile();
409 if (file) {
410 const relative = path.relative(path.dirname(options.configFilePath as string), path.resolve(file.fileName));
411 return toImportPath(relative);
412 }
413 }
414
415 return `./${type.symbol.name}`;
416 }
417
418 return '';
419}

Callers 1

fillBaseInfoFromFunction · 0.85

Calls 2

toImportPathFunction · 0.70
resolveMethod · 0.45

Tested by

no test coverage detected