I have the following code:
type Document = number | string | Array;
TypeScript complains with the following error:
Building on what NPE said, types cannot recursively point to themselves, you could unroll this type to whatever level of depth you considered sufficient, e.g.:
type Document = [number|string|[number|string|[number|string|[number|string]]]]
Not pretty, but removes the need for an interface or class with a property value.