Files
tsgo/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithNestedArrayIntersection.js

38 lines
802 B
TypeScript

//// [tests/cases/compiler/excessPropertyCheckWithNestedArrayIntersection.ts] ////
//// [excessPropertyCheckWithNestedArrayIntersection.ts]
interface ValueOnlyFields {
fields: Array<{
value: number | null;
}>;
}
interface ValueAndKeyFields {
fields: Array<{
key: string | null;
value: number | null;
}>;
}
interface BugRepro {
dataType: ValueAndKeyFields & ValueOnlyFields;
}
const repro: BugRepro = {
dataType: {
fields: [{
key: 'bla', // should be OK: Not excess
value: null,
}],
}
}
//// [excessPropertyCheckWithNestedArrayIntersection.js]
"use strict";
const repro = {
dataType: {
fields: [{
key: 'bla', // should be OK: Not excess
value: null,
}],
}
};