** * Gets the extension from a path. * Path must have a valid extension. */
(path string)
| 184 | * Path must have a valid extension. |
| 185 | */ |
| 186 | func extensionFromPath(path string) string { |
| 187 | ext := tspath.TryGetExtensionFromPath(path) |
| 188 | if len(ext) == 0 { |
| 189 | panic(fmt.Sprintf("File %s has unknown extension.", path)) |
| 190 | } |
| 191 | return ext |
| 192 | } |
| 193 | |
| 194 | func tryGetAnyFileFromPath(host ModuleSpecifierGenerationHost, path string) bool { |
| 195 | // !!! TODO: shouldn't this use readdir instead of fileexists for perf? |
no test coverage detected