MCPcopy Create free account
hub / github.com/Snapchat/Valdi / removeTsFileExtension

Function removeTsFileExtension

npm_modules/cli/src/commands/projectsync.ts:222–229  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

220}
221
222function removeTsFileExtension(path: string): string {
223 if (path.endsWith('.d.ts')) {
224 return path.slice(0, -5);
225 } else if (path.endsWith('.ts')) {
226 return path.slice(0, -3);
227 }
228 return path;
229}
230
231function computeTsCompilerOptions(
232 existingTsConfigFile: any,

Callers 1

computeTsCompilerOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected