* Improve excess property checking for intersections
Still a draft, the implementation needs improvement
* Use mutable isIntersection in checkTypeRelatedTo
This makes parameter lists a lot shorter. Seems like a slight
improvement, although I can revert if I change my mind.
* Fix semicolon lint
* Remove TODOOOO
* Revert "Use mutable isIntersection in checkTypeRelatedTo"
This reverts commit b8dccff2a2
.
23 lines
412 B
TypeScript
23 lines
412 B
TypeScript
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,
|
|
}],
|
|
}
|
|
}
|