Closed mesqueeb closed 1 month ago
the proposal comes from:
On a related note, you may wish to define an object like:
// like in TS library files
Record<keyof any, unknown>
// or verbosely without the any
Record<string | number | symbol, unknown>
will land in v5
CURRENTLY
We currently use
any
a lot like. Eg.:This currently makes stuff like this possible without error:
PROPOSAL
When the user passes an array with "any" we could also convert the outcome to "unknown" instead like so:
Which will result in throwing errors because the type was converted from
any
tounknown
:As long as the array type is not
any[]
it will keep the array type as is:@laquasicinque thoughts?