ARTICLE AD BOX
I'm trying to check if a json has excess properties.
I use 'satisfies' operator for this. It works fine when json has absent properties.
But when it has excess properties no errors is shown. Is there any way to check for excess properties?
Example:
import * as a from './data.json' // data.json: { "xxx": 0, "bbb": 9 } interface testType { xxx: number } a satisfies testType //no error. Why? const b = { xxx: 0, bbb: 9, //error: 'bbb' does not exist in type 'testType'. } satisfies testType const с = { xxx: 0, bbb: 9, } as const с satisfies testType //no error again