I would like to create something similar to the following:
type ISomeType = 'one'|'two'|'more';
const bigBigBigDataType = {
...
someValue: 'bla-bla' oneOf ISomeType;
...
}
Although this code will run without any compilation errors, I am looking for a syntax that will prevent entering bla-bla
into a someValue
that should be of type ISomeType
.
Simply creating a type for bigBigBigDataType
is not the solution.