type Json = string | number | boolean | null | Json[] | [key: string]: Json ;
If you are testing code in the Playground set to version 3.7, you will see the compiler successfully handle this syntax. If you set the version lower (e.g., 3.6), the Playground will throw an error, flagging the ?. syntax as invalid. ts playground 37
type Json = string | number | boolean | null | Json[] | [key: string]: Json ;
If you are testing code in the Playground set to version 3.7, you will see the compiler successfully handle this syntax. If you set the version lower (e.g., 3.6), the Playground will throw an error, flagging the ?. syntax as invalid.