Commit Graph
2758 Commits
Author SHA1 Message Date
Anders Hejlsberg 564378fc9f Only infer 'never' return type in function expressions and lambdas 2016-05-23 10:35:40 -07:00
Nathan Shively-Sanders 89ebe5acad Merge pull request #8719 from Microsoft/instantiate-cross-file-merges
Instantiate cross file merges
2016-05-20 13:13:45 -07:00
Nathan Shively-Sanders 7562ef033e Use getSymbolOfNode instead of getMergedSymbol 2016-05-20 12:53:44 -07:00
Nathan Shively-Sanders 3bdfd8f477 Make sure to instantiate merged type parameters 2016-05-20 10:59:05 -07:00
Nathan Shively-Sanders 61154b6bdd Merge pull request #8713 from Microsoft/generic-inherited-default-constructor
Generic inherited default constructor
2016-05-20 10:41:44 -07:00
Mohamed Hegazy 0275fe25d7 Merge pull request #8697 from Microsoft/Fix8694
Fix #8694: check for singatures before calling a type empty
2016-05-19 16:14:57 -07:00
Nathan Shively-Sanders f9412f8831 Merge pull request #8698 from Microsoft/iife-parameters-correct-quickinfo
Mark IIFE signature with `anySignature` during contextual typing
2016-05-19 15:09:51 -07:00
Mohamed Hegazy 43b36d22e0 Merge pull request #8674 from evansb/union-type-react
Fixes #8657: Handles union typed React component.
2016-05-19 13:14:07 -07:00
Mohamed Hegazy 934c78a89d Fix #8694: check for singatures before calling a type empty 2016-05-19 12:36:04 -07:00
Nathan Shively-Sanders 8e668441b3 Mark IIFE signature with anySignature during contextual typing
Avoids recursion -- during batch compilation, `checkCallExpression` already
sets the signature to `anySignature` as a sentinel value, the services
layer calls directly into `checkParameter`, skipping `checkCallExpression`
entirely. So `getContextuallyTypedParameterType` also needs to set this
sentinel value.
2016-05-19 12:33:37 -07:00
Nathan Shively-Sanders 0001b8cb37 Remove target-following code when erasing signatures
Fixes return type of inherited default constructors when they are
generic.
2016-05-19 10:37:20 -07:00
Evan Sebastian 8ef350c762 Simplify the checker, no recursive checking for signature is needed anymore. 2016-05-19 22:41:03 +07:00
Evan Sebastian 44ace66888 Handles resolving JSX type for union typed element class 2016-05-19 21:53:11 +07:00
Evan Sebastian f1643c7a8a Fix lint errors 2016-05-19 06:00:35 +07:00
Evan Sebastian c808d44403 Requires the construct/call signature for each type in the union instead of whole. 2016-05-19 05:58:28 +07:00
Evan Sebastian f04d28d422 Recursively check union type of react components for constructor/call 2016-05-19 05:08:00 +07:00
Anders Hejlsberg 59f269c90a Merge pull request #8652 from Microsoft/neverType
Add 'never' type
2016-05-18 11:39:22 -07:00
Anders Hejlsberg 9a22d08422 Merge pull request #8625 from Microsoft/optionalClassProperties
Optional class properties
2016-05-18 11:32:50 -07:00
Nathan Shively-Sanders 780f251c92 Merge pull request #8650 from Microsoft/unescape-dunder-string-literal-types
Unescape string literal types starting with double underscore.
2016-05-18 09:13:05 -07:00
Anders Hejlsberg 88d7f23f10 Add additional error checking 2016-05-17 13:45:40 -07:00
Nathan Shively-Sanders a5585c544f Unescape only string literal type nodes.
Not all string literal types, regardless of source, as in the last
commit.
2016-05-17 13:42:15 -07:00
Nathan Shively-Sanders e25927da57 Unescape string literal types starting with double underscore.
String literal types starting with double underscore are escaped in the
parser and need to be unescaped before the type is given the string
literal as its name.
2016-05-17 13:05:03 -07:00
Anders Hejlsberg be7e2a837b Make 'never' an intrinsic type 2016-05-17 10:05:19 -07:00
Anders Hejlsberg aa028ca660 Handle 'never' in return type inference 2016-05-17 06:32:49 -07:00
Anders Hejlsberg c11d691d6f Introduce 'never' type 2016-05-17 06:15:57 -07:00
Nathan Shively-Sanders ae4a983c59 Use binding pattern for type inference result {}
The binding pattern provides additional information when the contextual
type is not found and would otherwise fix a type parameter to `{}`.
2016-05-16 16:09:36 -07:00
Anders Hejlsberg d66377d125 Add optionality to properties declared with '?' and initializer 2016-05-16 13:33:33 -07:00
Anders Hejlsberg 6b3fc7f310 Remove nullability from function types in language service 2016-05-16 09:23:29 -07:00
Anders Hejlsberg b90761cf43 Allow class properties and methods to be declared optional using '?' 2016-05-14 13:34:00 -07:00
Anders Hejlsberg 7706f3837e Minor cleanup of getFlowTypeOfReference parameters 2016-05-12 14:59:45 -07:00
Mohamed Hegazy 977a7ec1ba Merge pull request #8509 from Microsoft/Fix8507
Fix #8507: Consider UnknownSymbols values for import/export purposes
2016-05-12 11:03:22 -07:00
Andy 7806de0f45 Merge pull request #8555 from Microsoft/readonly_ctr
Fix #7590: Allow 'readonly' to be used in constructor parameters
2016-05-12 10:29:22 -07:00
Andy Hanson ce596732ab Remove duplicate check for misplaced parameter properties (taken care of by checkParameter) 2016-05-12 07:07:37 -07:00
Andy Hanson 40afe4a4dd Don't report error twice for readonly in method 2016-05-12 07:07:35 -07:00
Anders Hejlsberg 65468ed352 Include 'delete' operator in control flow analysis 2016-05-11 16:57:06 -07:00
Anders Hejlsberg c9a3ea6fe0 Stop analyzing loop branches when declared type is seen 2016-05-11 12:49:42 -07:00
Anders Hejlsberg 89506c1138 Merge pull request #8548 from Microsoft/typeGuardAsAssertion
Type guards as assertions
2016-05-11 11:27:43 -07:00
Andy Hanson a9742c5861 Change name from ConstructorParameterModifier to ParameterPropertyModifier 2016-05-11 09:48:37 -07:00
Anders Hejlsberg 5edf72666d Revert to declared type when '!' postfix operator would produce 'nothing' 2016-05-11 09:26:03 -07:00
Andy Hanson ad2634e343 Fix #7590: Allow 'readonly' to be used in constructor parameters 2016-05-11 08:32:17 -07:00
Mohamed Hegazy 0120d7bf7b Merge pull request #8456 from Microsoft/Fix8415
Fix #8415: consider accessors when searching for contextually typed properties
2016-05-10 10:54:02 -07:00
Anders Hejlsberg 6563251dbf Renaming emptyUnionType to nothingType 2016-05-10 09:40:24 -07:00
Anders Hejlsberg e944bfab52 Revert to declared type when narrowing produces the nothing type 2016-05-10 09:35:23 -07:00
Vladimir Matveev f95b0bcf82 resolve target of alias when getting member from the module 2016-05-09 15:40:03 -07:00
Vladimir Matveev a2948e131d guard agains cases when local value in initializer shadows function parameter with the same name 2016-05-09 08:50:06 -07:00
Mohamed Hegazy 0de410627e Code review comments 2016-05-08 15:59:15 -07:00
Mohamed Hegazy 02bae234c6 Merge branch 'master' into Fix8415 2016-05-08 15:31:48 -07:00
Mohamed Hegazy 5e9fc58038 Remove additional error message generated while emitting output 2016-05-08 15:27:13 -07:00
Yui 72c19ec806 Fix 7304: show correct quickinfo on "this" in type position (#8508)
* Show correct quickinfo when using this in type position

* Split quickinfo test into smaller files and add test case
2016-05-07 09:12:53 -07:00
Mohamed Hegazy b4becd46ec Fix #8507: Consider UnknownSymbols values for import/export purposes 2016-05-06 17:32:45 -07:00