I am looking to define a generic object type that is not nested (meaning the value is not an object or array, only primitive types)
For example:
Valid cases:
{
a:"value",
b:false,
c:4
}
Invalid cases:
{
a:{b:"c"}
}
{
a:[5]
}
Is there a way to declare something like this (even though it's invalid syntax):
interface NotNestedObject {
[x: any]: not Array/Object;
}