mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
fix(40617): handle uninitialized class member with computed key (#45974)
This commit is contained in:
@@ -2755,7 +2755,7 @@ namespace ts {
|
||||
function getPropFromRaw<T>(prop: "files" | "include" | "exclude" | "references", validateElement: (value: unknown) => boolean, elementTypeName: string): PropOfRaw<T> {
|
||||
if (hasProperty(raw, prop) && !isNullOrUndefined(raw[prop])) {
|
||||
if (isArray(raw[prop])) {
|
||||
const result = raw[prop];
|
||||
const result = raw[prop] as T[];
|
||||
if (!sourceFile && !every(result, validateElement)) {
|
||||
errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, prop, elementTypeName));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user