A strict object shape would restrict object to only the properties present in the object shape, i.e.
type TypeTest = {
foo: string
};
const test = (test: TypeTest) => {
};
// This would work
test({
foo: 'OK'
});
// This would throw an error
test({
bar: 'NOT OK'
});
Denoting strict shape would require some sort of special syntax, e.g.
type TypeTest = strict<{
foo: string
}>;
This syntax could be used for more add-ons, e.g.
type TypeTest = somethingElse<strict<{
foo: string
}>>;
A strict object shape would restrict object to only the properties present in the object shape, i.e.
Denoting strict shape would require some sort of special syntax, e.g.
This syntax could be used for more add-ons, e.g.