API: Exception in TypeChecker.typeToTypeNode #45515
Labels
Needs Investigation
This issue needs a team member to investigate its status.
Rescheduled
This issue was previously scheduled to an earlier milestone
Milestone
Bug Report
π Search Terms
typeToTypeNode kind undefined
π Version & Regression Information
4.3.2 and earlier versions (not sure when it started)
β― Playground Link
Playground
π» Code
Using compiler API:
Target code being transpiled:
Exception thrown:
π Actual behavior
When calling
typeToTypeNode
an exception is thrown.π Expected behavior
No exception should be thrown and undefined should be returned.
Tracing through the ts code, undefined is returned from
typeReferenceToTypeNode
here (linking to online editor since github can't display the file) and there is a comment referencing this issue. That is assigned to the object attempting to be accessed.The trigger seems to be the rest parameter type being an array of empty tuples. The real code that triggered the issue used some tricky generics to arrive at that type, but this direct version was able to reproduce the same issue.
The text was updated successfully, but these errors were encountered: