Types That You Need To Pay Attention To
These are types that are supported but be careful when using them. They are not limitations, but how things work.
Record<string, something> Support
By design Firelord banned mapped type, this was until version 2.5.10. To understand why mapped was banned in the first place and why it is possible now, see this issue. In short, querying mapped type requires extra information, make sure you know what you are doing.
Object Unions Type
Object unions type was banned before v2.6.2 because it brings uncertainty that cannot be handled reasonably. For example, with {a:number}|{b:string}
, you can set {a:1}
then update {b:"x"}
, in this case the type is no longer unions type but an intersection type: {a:number} & {b:string}
. This limitation is lifted to allow users to fully utilize discriminated unions. Plus in future update operation Mandatory Field could mitigate this problem.