Skip to content

New 'unknown' top type #24439

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

Merged
merged 25 commits into from
May 30, 2018
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
07a696f
Rename existing unknownType to errorType
ahejlsberg May 26, 2018
8f193b4
Free up one bit in TypeFlags
ahejlsberg May 26, 2018
8b2149e
Accept new baselines
ahejlsberg May 26, 2018
03f464f
Add 'unknown' keyword to scanner/parser/emitter
ahejlsberg May 26, 2018
d225065
Accept new baselines
ahejlsberg May 26, 2018
2003b2a
Implement 'unknown' type in checker
ahejlsberg May 26, 2018
5a0910a
Accept new baselines
ahejlsberg May 26, 2018
b20925a
'null' and 'undefined' are bottom types in non-strictNullChecks mode
ahejlsberg May 26, 2018
9e4d19f
Fixes to keyof and narrowing by typeof check
ahejlsberg May 27, 2018
f63b61c
Accept new baselines
ahejlsberg May 27, 2018
79e7700
{ [P in unknown]: XXX } should resolve to { [x: string]: XXX }
ahejlsberg May 27, 2018
73af0ad
Add tests
ahejlsberg May 27, 2018
5da063f
Accept new baselines
ahejlsberg May 27, 2018
353802c
Check we have non-unknown where we require non-nullable
ahejlsberg May 27, 2018
a83653e
Add new diagnostic
ahejlsberg May 27, 2018
31c73de
Update tests
ahejlsberg May 27, 2018
a4a73df
Accept new baselines
ahejlsberg May 27, 2018
074961f
keyof unknown should be never
ahejlsberg May 29, 2018
c694ffe
Update tests
ahejlsberg May 29, 2018
e98f9a6
Accept new baselines
ahejlsberg May 29, 2018
6b1c84e
Remove eager resolution of distributive conditional types
ahejlsberg May 30, 2018
577662d
Update tests
ahejlsberg May 30, 2018
41ef7a7
Accept new baselines
ahejlsberg May 30, 2018
e22a9d6
Merge branch 'master' into unknownType
ahejlsberg May 30, 2018
8664390
Rename unknownType to errorType in merged code
ahejlsberg May 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add new diagnostic
  • Loading branch information
ahejlsberg committed May 27, 2018
commit a83653ed99516af7b5ba2c1443b648603cc0c706
4 changes: 4 additions & 0 deletions src/compiler/diagnosticMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2024,6 +2024,10 @@
"category": "Error",
"code": 2570
},
"Object is of type 'unknown'.": {
"category": "Error",
"code": 2571
},
"JSX element attributes type '{0}' may not be a union type.": {
"category": "Error",
"code": 2600
Expand Down