Commit graph

4 commits

Author SHA1 Message Date
Nathan Shively-Sanders
c9ac15ae56
In JS, this assignments in constructors are preferred and nullable initializers become any (#22882)
* First draft:in js, constructor declaration is preferred

* Add tests

* initializer of null|undefined gives any in JS

Also move this-assignment fixes out of binder. I'm going to put it in
the checker instead.

* In JS, initializer null|undefined: any, []: any[]

* First draft of js prefer-ctor-types overhaul

* Update tests, update baselines

* Improve readability of constructor-type preference

* Cleanup: Remove TODO and duplication

* Add noImplicitAny errors

* Add comment
2018-03-26 13:42:34 -07:00
Mohamed Hegazy
3ac54e8a47 Infer class property declarations from assignments in nested arrow functions 2017-03-12 15:00:24 -07:00
Mohamed Hegazy
b977b8cc45 Respond to code review comments 2017-02-27 15:58:01 -08:00
Mohamed Hegazy
02ccd91159 Infer class properties from methods and not just constructors 2017-02-23 15:20:08 -08:00