|
export function createConfigFileUpdater( |
|
optionsToExtend: CompilerOptions |
|
): (options: ts.CompilerOptions) => ts.Diagnostic[] { |
|
const configFileMap = new WeakMap<ts.TsConfigSourceFile, ts.ParsedCommandLine>(); |
|
return options => { |
|
const { configFile, configFilePath } = options; |
|
if (!configFile || !configFilePath) return []; |
|
|
|
if (!configFileMap.has(configFile)) { |
|
const parsedConfigFile = updateParsedConfigFile( |
|
ts.parseJsonSourceFileConfigFileContent( |
|
configFile, |
|
ts.sys, |
|
path.dirname(configFilePath), |
|
optionsToExtend, |
|
configFilePath |
|
) |
|
); |
|
|
|
configFileMap.set(configFile, parsedConfigFile); |
|
} |
|
|
|
const parsedConfigFile = configFileMap.get(configFile)!; |
|
Object.assign(options, parsedConfigFile.options); |
|
return parsedConfigFile.errors; |
|
}; |
|
} |
createConfigFileUpdater doesn't call getExtendedTstlOptions to get tstl extended options.
TypeScriptToLua/src/cli/tsconfig.ts
Lines 131 to 157 in f205222
createConfigFileUpdaterdoesn't callgetExtendedTstlOptionsto get tstl extended options.