MCPcopy Create free account
hub / github.com/microsoft/typescript-go / resolveExternalModuleName

Method resolveExternalModuleName

internal/checker/checker.go:15019–15026  ·  view source on GitHub ↗
(location *ast.Node, moduleReferenceExpression *ast.Node, ignoreErrors bool)

Source from the content-addressed store, hash-verified

15017}
15018
15019func (c *Checker) resolveExternalModuleName(location *ast.Node, moduleReferenceExpression *ast.Node, ignoreErrors bool) *ast.Symbol {
15020 errorMessage := c.getCannotResolveModuleNameErrorForSpecificModule(moduleReferenceExpression)
15021 if errorMessage == nil {
15022 errorMessage = diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations
15023 }
15024 ignoreErrors = ignoreErrors || c.compilerOptions.NoCheck.IsTrue()
15025 return c.resolveExternalModuleNameWorker(location, moduleReferenceExpression, core.IfElse(ignoreErrors, nil, errorMessage), ignoreErrors, false /*isForAugmentation*/)
15026}
15027
15028func (c *Checker) getCannotResolveModuleNameErrorForSpecificModule(moduleName *ast.Node) *diagnostics.Message {
15029 if ast.IsStringLiteral(moduleName) {

Calls 4

IfElseFunction · 0.92
IsTrueMethod · 0.80

Tested by

no test coverage detected