Prototype assignment should take the type of the initializer and not require a literal #39166
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
This is a feature request based on actual VS customer code.
TypeScript Version: 3.9.2
Search Terms: ES5 class javascript prototype assignment constructor function
Expected behavior: In the example below, the prototype for
test.class
should include properties fromtestPrototype
.Actual behavior: Per @sandersn this pattern is recognized in the binder and only uses syntactic information, therefore does not use the type information from
testPrototype
.Related Issues: #39167 from same user code. Also #33454 maybe?
Code
Compiler Options
Playground Link: Provided
The text was updated successfully, but these errors were encountered: