( currentDirectory string, compilerOptions *core.CompilerOptions, rootFileNames []string, builder *ProjectCollectionBuilder, logger *logging.LogTree, )
| 99 | } |
| 100 | |
| 101 | func NewInferredProject( |
| 102 | currentDirectory string, |
| 103 | compilerOptions *core.CompilerOptions, |
| 104 | rootFileNames []string, |
| 105 | builder *ProjectCollectionBuilder, |
| 106 | logger *logging.LogTree, |
| 107 | ) *Project { |
| 108 | p := NewProject(inferredProjectName, KindInferred, currentDirectory, builder, logger) |
| 109 | if compilerOptions == nil { |
| 110 | compilerOptions = &core.CompilerOptions{ |
| 111 | AllowJs: core.TSTrue, |
| 112 | Module: core.ModuleKindESNext, |
| 113 | ModuleResolution: core.ModuleResolutionKindBundler, |
| 114 | Target: core.ScriptTargetLatestStandard, |
| 115 | Jsx: core.JsxEmitReactJSX, |
| 116 | AllowImportingTsExtensions: core.TSTrue, |
| 117 | StrictNullChecks: core.TSTrue, |
| 118 | StrictFunctionTypes: core.TSTrue, |
| 119 | SourceMap: core.TSTrue, |
| 120 | AllowNonTsExtensions: core.TSTrue, |
| 121 | ResolveJsonModule: core.TSTrue, |
| 122 | } |
| 123 | } |
| 124 | p.CommandLine = tsoptions.NewParsedCommandLine( |
| 125 | compilerOptions, |
| 126 | rootFileNames, |
| 127 | tspath.ComparePathsOptions{ |
| 128 | UseCaseSensitiveFileNames: builder.fs.fs.UseCaseSensitiveFileNames(), |
| 129 | CurrentDirectory: currentDirectory, |
| 130 | }, |
| 131 | ) |
| 132 | return p |
| 133 | } |
| 134 | |
| 135 | func NewProject( |
| 136 | configFileName string, |
no test coverage detected