Closed jackbsteinberg closed 5 years ago
Based on the code you deleted, it sounds like it does more than turn literal types into their counterparts; it also turns primitive types into their corresponding classes.
Based on the code you deleted, it sounds like it does more than turn literal types into their counterparts; it also turns primitive types into their corresponding classes.
Yep it does seem to do that as well
Currently
getModuleNameForType
is explicitly checking for literal values, but while I was digging though the documentation I found the.getApparentType()
method, which turns literal types into their apparent counterpart (e.g.4
intoNumber
)https://ts-morph.com/details/types