mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
38 lines
802 B
TypeScript
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,
|
|
}],
|
|
}
|
|
};
|