Commit Graph

7976 Commits

Author SHA1 Message Date
Anders Hejlsberg
50d874e09d Improve type relationship error reporting for nullable types 2016-03-05 16:55:54 -08:00
Anders Hejlsberg
129a4f1908 Check return type includes 'undefined' in function with implicit return 2016-03-05 16:16:19 -08:00
Anders Hejlsberg
d0e4b4ae35 Treat 'return' as 'return undefined' for type checking purposes 2016-03-05 15:23:00 -08:00
Anders Hejlsberg
8db7af035d Proper handling of 'null' and 'undefined' in equals and not equals guards 2016-03-05 11:16:31 -08:00
Anders Hejlsberg
689e28d3ac Keep linter happy with fix in reduceLeft/reduceRight 2016-03-05 11:14:57 -08:00
Anders Hejlsberg
097f4564bb Remove unused variable 2016-03-05 10:07:28 -08:00
Anders Hejlsberg
2762772afd Include 'undefined' in return type for implicit or expressionless returns 2016-03-05 09:58:47 -08:00
Anders Hejlsberg
eed4093be5 Fix bugs in reduceLeft and reduceRight 2016-03-05 09:56:01 -08:00
Anders Hejlsberg
a0790fba7d Add only 'undefined' to optional parameter types 2016-03-04 17:39:56 -08:00
Anders Hejlsberg
64f572747c Introduce comparable (a.k.a. possibly assignable) relation 2016-03-04 17:26:56 -08:00
Anders Hejlsberg
25a72d6085 Removing unused functions 2016-03-04 15:51:22 -08:00
Matt McCutchen
49172207bf Expose ts.isExternalModule as public API.
Fixes #7359
2016-03-04 18:45:42 -05:00
Mohamed Hegazy
a5354608fc Merge pull request #7392 from Microsoft/declarationEmitFixes
Declaration emit fixes
2016-03-04 15:35:43 -08:00
Anders Hejlsberg
15b240548f Extract and lift nullability over best common supertype 2016-03-04 15:01:11 -08:00
Mohamed Hegazy
15640492c4 Code review comments 2016-03-04 14:21:31 -08:00
Anders Hejlsberg
d6fcd1af1b Consider for-in and for-of variables to be definitely assigned 2016-03-04 13:19:58 -08:00
Anders Hejlsberg
c623e1f8c9 No widening of 'null' and 'undefined' types in --strictNullChecks mode 2016-03-04 10:42:23 -08:00
Mohamed Hegazy
15f07e6231 Fix #4506: Remove assert to allow for invalid patterns already flagged erlier by the checker 2016-03-03 23:01:46 -08:00
Mohamed Hegazy
3bb2c57264 Fix #3810: Handel expressions in extends clauses 2016-03-03 22:35:30 -08:00
Mohamed Hegazy
c98c763243 Fix #5651: Get the correct meaning for expressions in extends clauses 2016-03-03 21:47:11 -08:00
Anders Hejlsberg
87ae0489eb Reinstate separate type kinds for 'null' and 'undefined' 2016-03-03 17:44:46 -08:00
Ryan Cavanaugh
311f8dd7d3 Merge pull request #7309 from RyanCavanaugh/fix6878
Support JSDoc on class / obj. literal getters
2016-03-03 15:50:15 -08:00
Mohamed Hegazy
baa040115e Fix #7173: Widen the type do the defualt export expression before writing it out. 2016-03-03 15:42:47 -08:00
Jason Ramsay
ae2b7c2aa2 Removing cachePath from discoverTypings and DiscoverTypingsInfo.
With the move to using the packageNameToLocation map it is no longer required.
2016-03-03 15:17:52 -08:00
Mohamed Hegazy
0cba37d5b2 Merge pull request #7358 from martine/empty-return
in noImplicitReturns mode, also disallow "return;"
2016-03-03 13:56:19 -08:00
Vladimir Matveev
744e51047e Merge pull request #7373 from Microsoft/limitInferenceDepth
set the maximum depth to explore during type inference
2016-03-03 12:18:49 -08:00
Evan Martin
5132ea64ea in noImplicitReturns mode, also disallow "return;"
In --noImplicitReturns mode, if a function specifies a return type,
disallow empty "return;" statements.

Fixes #5916.
2016-03-03 12:18:23 -08:00
Anders Hejlsberg
ea4b13bdf9 Allow 'null' and 'undefined' as type names 2016-03-03 11:18:12 -08:00
Vladimir Matveev
1589e4f57e set the maximum depth to explore during type inference 2016-03-03 10:47:21 -08:00
Mohamed Hegazy
30a6a33259 Fix #7362: check for --watchFile in tsconfig.json as well as on the commandline 2016-03-03 10:18:33 -08:00
Tingan Ho
194927e51b Update with master 2016-03-03 13:58:20 +08:00
Tingan Ho
99edce09bc Fixes CR feedback 2016-03-03 13:29:00 +08:00
Kanchalai Tanglertsampan
70d267419b Concat declaration error so we report them 2016-03-02 17:13:51 -08:00
Anders Hejlsberg
33e3825beb Assigned-before-use checking for non-nullable variables 2016-03-02 16:40:16 -08:00
zhengbli
2835e259aa Enable navigateTo on all projects for a file 2016-03-02 15:50:00 -08:00
zhengbli
7663a96a7b Enable findReferences on all projects for a file 2016-03-02 15:37:35 -08:00
Basarat Ali Syed
1bebc711b0 fix(build) TypingResolutionHost interface is used by exported function discoverTypings 2016-03-03 10:32:07 +11:00
zhengbli
55f4b02ed4 Enable rename on all projects for a file 2016-03-02 14:25:55 -08:00
Alexander
694a48c445 Added new diagnostics message to clarify error for type guards
New diagnostics message "A type guard's type must be assignable to its parameter's type." number 2677
is now using in chain report to clarify vague error message for type guards.
2016-03-03 00:24:02 +03:00
jramsay
de47fcc113 Merge pull request #7179 from Microsoft/jsTypingForAcquireDts
Salsa: JS support for discovering and acquiring d.ts files
2016-03-02 11:10:12 -08:00
Jason Ramsay
e8772bc0a2 - Adding new lines after { for single-line if statements
- Renaming DiscoverTypingsSettings to DiscoverTypingsInfo to match host
2016-03-02 10:11:13 -08:00
Vladimir Matveev
f34dcdd464 Merge pull request #7328 from Microsoft/flipSidesInSignatureCheck
flip sides source and target when we check signature relations
2016-03-01 19:28:19 -08:00
Jason Ramsay
4bbdf2a0bb - Removing filesToWatch from getTypingNamesFromNodeModuleFolder.
These modules are already installed and are not expected to change
2016-03-01 19:06:31 -08:00
Jason Ramsay
6aad783db8 - Adding DiscoverTypingsSettings
- Remove all references to Tsd.
Instead pass a map of package names to cached typing locations
2016-03-01 18:52:11 -08:00
zhengbli
1224013f77 Update the format span end position for formatOnEnter 2016-03-01 16:45:56 -08:00
Vladimir Matveev
568e2aab58 allow fallthrough from the last case of the switch 2016-03-01 15:58:59 -08:00
Vladimir Matveev
0ef2b9ea85 flip sides source and target when we check signature relations 2016-03-01 15:47:00 -08:00
Ryan Cavanaugh
65f09d66ad Don't crash 2016-03-01 15:09:15 -08:00
Ryan Cavanaugh
6cdbc6cad0 Show aliases (e.g. imports) in JSX tag completion positions
Fixes #4577
2016-03-01 13:47:29 -08:00
Ryan Cavanaugh
1f9153f801 Update to push types through as well 2016-03-01 12:26:17 -08:00