(fileName string)
| 109 | } |
| 110 | |
| 111 | func GetDeclarationFileExtension(fileName string) string { |
| 112 | base := GetBaseFileName(fileName) |
| 113 | for _, ext := range SupportedDeclarationExtensions { |
| 114 | if strings.HasSuffix(base, ext) { |
| 115 | return ext |
| 116 | } |
| 117 | } |
| 118 | if strings.HasSuffix(base, ExtensionTs) { |
| 119 | index := strings.Index(base, ".d.") |
| 120 | if index >= 0 { |
| 121 | return base[index:] |
| 122 | } |
| 123 | } |
| 124 | return "" |
| 125 | } |
| 126 | |
| 127 | func GetDeclarationEmitExtensionForPath(path string) string { |
| 128 | switch { |
no test coverage detected