Emit an any for namepath types#37176
Conversation
sandersn
left a comment
There was a problem hiding this comment.
Fix makes sense here -- should we also add a general fallback to these specific early exit?
? what do you mean? |
orta
left a comment
There was a problem hiding this comment.
Thanks! Feels alright to me
|
Yikes, I mangled that sentence! What I meant was: the function has an early exit for specific cases. Should it also have a general fallback at the bottom sort of like we give errorType when type checking? (That's a question for future work anyway; the code as-is is good as a bug fix.) |
It has a "fallback" already - emit the node as-is, which is used for most typenodes. We only map away jsdoc-y typenodes here, cause printing them in not jsdoc is probably wrong. Namepath is even more special in that it doesn't even have emitter code, so actually just printed as an empty string. |
Fixes #36690
When we added an AST node to parse over namepaths in #32563, we didn't add any checker code to handle the new type node anywhere - in many cases, this meant a fallback to the
errorType(which is fine), but here we needed to explicitly map the namepath type node into ananytype node.