Flag JS Literals and ignore assignments/accesses to invalid props, instead of adding an index (#25996)

* Remove index signatures from js literals, use an object flag to indicate errors should be ignored instead

* Add focused test on the keyof problem

* Fix fourslash test

* Reenable errors with noImplicitAny flag

* Also disable excess property checks outside of noImplicitAny mode for js literals

* Edit and move comments
This commit is contained in:
Wesley Wigham authored and GitHub committed 2018-08-02 13:40:44 -07:00
1 parent eb763f0792
commit fefc47fae3
65 files changed
+526 -369

No files matched your search

+1
View File
@@ -3824,6 +3824,7 @@ namespace ts {
ReverseMapped = 1 << 11, // Object contains a property from a reverse-mapped type
JsxAttributes = 1 << 12, // Jsx attributes type
MarkerType = 1 << 13, // Marker type used for variance probing
JSLiteral = 1 << 14, // Object type declared in JS - disables errors on read/write of nonexisting members
ClassOrInterface = Class | Interface
}