Feature request: A function to get the value type of node getStaticType
#17
Labels
enhancement
New feature or request
getStaticType
#17
Similar to
getStaticValue
, but only tell the type.For example
`a${foo}`
->string
[...foo]
->array
{foo}
->object
!foo
->boolean
...
It's useful to make some auto-fix, example
Enforce
new Array(foo)
toArray.from({length: foo})
or[foo]
, if we can know type offoo
isnumber
, we can auto fix to the first one.The text was updated successfully, but these errors were encountered: