{"record":{"id":"79daa461dded4a68","repo":"microsoft/TypeScript","slug":"unknown-compiler-option-name","errorCode":null,"errorMessage":"Unknown compiler option '${name}'.","messagePattern":"Unknown compiler option '(.+?)'\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/harness/harnessIO.ts","lineNumber":298,"sourceCode":"        for (const name in settings) {\r\n            if (ts.hasProperty(settings, name)) {\r\n                const value = settings[name];\r\n                if (value === undefined) {\r\n                    throw new Error(`Cannot have undefined value for compiler option '${name}'.`);\r\n                }\r\n                if (name === \"typeScriptVersion\") {\r\n                    continue;\r\n                }\r\n                const option = getCommandLineOption(name);\r\n                if (option) {\r\n                    const errors: ts.Diagnostic[] = [];\r\n                    options[option.name] = optionValue(option, value, errors);\r\n                    if (errors.length > 0) {\r\n                        throw new Error(`Unknown value '${value}' for compiler option '${name}'.`);\r\n                    }\r\n                }\r\n                else {\r\n                    throw new Error(`Unknown compiler option '${name}'.`);\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    function optionValue(option: ts.CommandLineOption, value: string, errors: ts.Diagnostic[]): any {\r\n        switch (option.type) {\r\n            case \"boolean\":\r\n                return value.toLowerCase() === \"true\";\r\n            case \"string\":\r\n                return value;\r\n            case \"number\": {\r\n                const numverValue = parseInt(value, 10);\r\n                if (isNaN(numverValue)) {\r\n                    throw new Error(`Value must be a number, got: ${JSON.stringify(value)}`);\r\n                }\r\n                return numverValue;\r\n            }\r","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/microsoft/TypeScript/blob/b465fdbfe175304d9b977da137b2c178ae1091d3/src/harness/harnessIO.ts#L280-L316","documentation":"Thrown by setCompilerOptionsFromHarnessSetting when a setting key is not a recognised compiler option (getCommandLineOption returns falsy) and is not the reserved 'typeScriptVersion' key. The harness validates every key against optionDeclarations and rejects anything unknown to prevent silent typos in test configuration.","triggerScenarios":"A test configuration contains a key that does not match any ts.CommandLineOption name (case-insensitive), e.g. a misspelled option or a removed/experimental flag not registered in the option declarations.","commonSituations":"Typo in the option name, using a project-specific flag that is not a tsc option, or referencing an option that was renamed/removed in the current compiler revision.","solutions":["Check the spelling against the canonical compiler option list (ts.optionDeclarations) and correct it.","If the option was renamed, update to the current name.","Remove the key if it is not a real compiler option (move project-specific flags to a separate config mechanism)."],"exampleFix":"// before\n// @stricNullChecks: true\n// after\n// @strictNullChecks: true","handlingStrategy":"validation","validationCode":"function validateOptionName(name: string, known: ReadonlySet<string>) {\n    if (!known.has(name.toLowerCase())) {\n        throw new Error(`'${name}' is not a known compiler option`);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Spell-check option names against ts.optionDeclarations.","When upgrading TypeScript, review any option renames and update test configs."],"tags":["harness","compiler-options","configuration","unknown-option"],"backgroundTag":null,"analyzedSha":"b465fdbfe175304d9b977da137b2c178ae1091d3","analyzedAt":"2026-08-12T05:38:42.698Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}