EnsurePathIsNonModuleName ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed with `./` or `../`) so as not to be confused with an unprefixed module name.
(path string)
| 922 | // EnsurePathIsNonModuleName ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed |
| 923 | // with `./` or `../`) so as not to be confused with an unprefixed module name. |
| 924 | func EnsurePathIsNonModuleName(path string) string { |
| 925 | if !PathIsAbsolute(path) && !PathIsRelative(path) { |
| 926 | return "./" + path |
| 927 | } |
| 928 | return path |
| 929 | } |
| 930 | |
| 931 | func IsExternalModuleNameRelative(moduleName string) bool { |
| 932 | // TypeScript 1.0 spec (April 2014): 11.2.1 |
no test coverage detected