MCPcopy Index your code
hub / github.com/microsoft/typescript-go / IsExternalModuleNameRelative

Function IsExternalModuleNameRelative

internal/tspath/path.go:931–936  ·  view source on GitHub ↗
(moduleName string)

Source from the content-addressed store, hash-verified

929}
930
931func IsExternalModuleNameRelative(moduleName string) bool {
932 // TypeScript 1.0 spec (April 2014): 11.2.1
933 // An external module name is "relative" if the first term is "." or "..".
934 // Update: We also consider a path like `C:\foo.ts` "relative" because we do not search for it in `node_modules` or treat it as an ambient module.
935 return PathIsRelative(moduleName) || IsRootedDiskPath(moduleName)
936}
937
938type ComparePathsOptions struct {
939 UseCaseSensitiveFileNames bool

Calls 2

PathIsRelativeFunction · 0.85
IsRootedDiskPathFunction · 0.85

Tested by

no test coverage detected