tsc declaration-emits any
type for self-referring class expressions
#56479
Labels
Duplicate
An existing issue was already created
π Search Terms
declaration
,any
,class expressions
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?jsx=0&module=1&ts=5.3.1-rc#code/MYewdgzgLgBAhjAvDYAbOEIwIIwN4BQMxMATgKZwAm4qAnvAFw5IxjkDuOAFAJQDcBAL5A
π» Code
π Actual behavior
TSC emits the following declaration (I think due to literal types does not have a recursive representation):
π Expected behavior
Either or both :
any
type during declaration emit it should rather be an error.Additional information about the issue
This was noticed during the development of --IsolatedDeclarations, and we decided to not support declaration emit for class expressions as it was complicated an hacky to replicate what the current TSC is doing.
Related issue in terms of discrepancy between class declaration emit and class expression emit : #56145
The text was updated successfully, but these errors were encountered: