Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heli.Create should return type Heli #93

Closed
x87 opened this issue Mar 28, 2023 · 3 comments
Closed

Heli.Create should return type Heli #93

x87 opened this issue Mar 28, 2023 · 3 comments
Labels
type:bug Something isn't working

Comments

@x87
Copy link
Contributor

x87 commented Mar 28, 2023

currently returns Car

@x87
Copy link
Contributor Author

x87 commented Mar 28, 2023

microsoft/TypeScript#5863

edit: in fact, it is not a type-only issue as the inherited static Create returns an instance of the parent class (i.e. Car).

@x87 x87 added the type:bug Something isn't working label May 31, 2023
@x87
Copy link
Contributor Author

x87 commented May 31, 2023

workaround: wrap in new Heli

let heli = new Heli(Car.Create(....));

same is true for other derived classes (Boat, Tank, Plane, etc)

@x87
Copy link
Contributor Author

x87 commented Jun 19, 2023

Fixed in 1.2.0

@x87 x87 closed this as completed Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant