MCPcopy Create free account
hub / github.com/microsoft/typescript-go / GetFileMapWithBuild

Function GetFileMapWithBuild

internal/execute/tsctests/sys.go:103–115  ·  view source on GitHub ↗
(files FileMap, commandLineArgs []string)

Source from the content-addressed store, hash-verified

101}
102
103func GetFileMapWithBuild(files FileMap, commandLineArgs []string) FileMap {
104 sys := newTestSys(&tscInput{
105 files: maps.Clone(files),
106 }, false)
107 execute.CommandLine(context.Background(), sys, commandLineArgs, sys)
108 sys.fs.writtenFiles.Range(func(key string) bool {
109 if text, ok := sys.fsFromFileMap().ReadFile(key); ok {
110 files[key] = text
111 }
112 return true
113 })
114 return files
115}
116
117func newTestSys(tscInput *tscInput, forIncrementalCorrectness bool) *TestSys {
118 cwd := tscInput.cwd

Callers 2

NewFourslashFunction · 0.92
TestTscModuleResolutionFunction · 0.85

Calls 6

CommandLineFunction · 0.92
newTestSysFunction · 0.85
fsFromFileMapMethod · 0.80
CloneMethod · 0.65
ReadFileMethod · 0.65
RangeMethod · 0.45

Tested by 1

TestTscModuleResolutionFunction · 0.68