[Feature] Implement support for built-in type identifiers such as str
, num
, bool
etc.
#495
Open
2 of 5 tasks
str
, num
, bool
etc.
#495
Is there an existing proposal for this?
This feature does not exist in the latest version
Proposal
Implement support for type identifiers, which should be usable during runtime to compare types.
This includes the following types:
bool
str
num
But importantly excludes the following types, as they are constants and therefore have as the type themselves. This also means doing
typeof(<value of type undefined>)
will simply returnundefined
and therefore should be rather replaced with<value of type undefined> == undefined
(Same as withnull
andvoid
, which is effectively a synonym forundefined
.This extends proposal #369, which proposes support for the built-in
typeof()
function allowing dynamic type checking.Exact behaviour / changes you want
str
,num
andbool
.typeof(EXP)
and the constant type identifiers.type
, for example:Additional Notes
The text was updated successfully, but these errors were encountered: