Commit Graph

1874 Commits

Author SHA1 Message Date
Mohamed Hegazy
33d7a1fc13 Merge pull request #5397 from seanchas116/fix-nested-parameter-destructuring
Fix nested parameter destructuring
2015-10-27 09:46:23 -07:00
Vladimir Matveev
4dbd04cdeb Merge pull request #5208 from Microsoft/capturedBlockScopedVars
support block scoped vars captured in closures inside loops
2015-10-26 16:58:15 -07:00
Mohamed Hegazy
ed5dc5536d Merge pull request #5390 from maybejulian/declareOnTypeAliasInDts
Allow type aliases to omit 'declare' keyword in '.d.ts' files
2015-10-25 23:26:18 -07:00
Ryohei Ikegami
3b23ab5fb7 Do not type non-identifier binding name 2015-10-25 12:23:24 +09:00
Julian Williams
1d6f5c6781 Added grammar change to the comments. 2015-10-24 22:21:34 -04:00
Julian Williams
a0939d962b Added TypeAliasDeclaration to exceptions for required top level declare modifier 2015-10-23 22:43:11 -04:00
Nathan Shively-Sanders
c4e54685c6 Merge pull request #5384 from Microsoft/fix-union-of-variadic-functions
Fix union of variadic functions
2015-10-23 14:54:13 -07:00
Nathan Shively-Sanders
d26a4c8a87 Merge pull request #5359 from Microsoft/merge-inherits-interface-members
Merge inherits interface members
2015-10-23 14:51:13 -07:00
Nathan Shively-Sanders
742c701868 Use emptyArray instead of [] for no base types. 2015-10-23 14:26:45 -07:00
Nathan Shively-Sanders
ab2994ff87 Fix union types of variadic functions
The check used `=== len - 1` instead of `>= len - 1` to check whether a
parameter index might be pointing to a rest argument.
2015-10-23 13:34:09 -07:00
Ryan Cavanaugh
bede6edc51 Merge pull request #5366 from RyanCavanaugh/typeOperatorSpacingRule
Type operator spacing rule
2015-10-22 16:33:21 -07:00
Ryan Cavanaugh
69236c9be8 Add rule to check spaces around intersection/union type operators 2015-10-22 11:35:48 -07:00
Nathan Shively-Sanders
56322d2ecc Root class merged with interface can be extended
I found that merging a class that has no base with an interface that has a
base class causes a crash because `getDefaultConstructSignatures` assumes
that any base must be a class base. Which was true in the previously buggy
state.
2015-10-22 11:26:19 -07:00
Nathan Shively-Sanders
c072a5fd4b getBaseTypes handles interfaces merged w/classes
Previously it assumed that if a class was present in the merge, only the
class base types needed to be used. This became false when classes and
interfaces could be merged.
2015-10-21 16:04:40 -07:00
Ryan Cavanaugh
853e9a2462 Merge pull request #5295 from RyanCavanaugh/detectAdjacentJsxElements
Better error recovery for adjacent JSX elements in expression positions
2015-10-20 13:16:02 -07:00
Anders Hejlsberg
6d8950e13c Fix check for excess properties in union and intersection types 2015-10-20 12:39:43 -07:00
Nathan Shively-Sanders
f9c40d11a9 Merge pull request #5267 from Microsoft/disallow-primitive-assignability-to-index-of-any
Disallow primitive assignability to indexer of type any
2015-10-19 15:48:04 -07:00
Vladimir Matveev
96a4b237ac Merge branch 'master' into capturedBlockScopedVars 2015-10-19 14:22:25 -07:00
Mohamed Hegazy
e98a76fb62 Merge pull request #5257 from Microsoft/module-merge-with-constructors
Module merge with constructors
2015-10-16 16:55:57 -07:00
Mohamed Hegazy
bb369f1423 Merge pull request #5290 from Microsoft/interfaceClassMergingFix
Do not report errors for classes and interfaces merging
2015-10-16 16:45:31 -07:00
Nathan Shively-Sanders
a8aa48e73f Merge pull request #5230 from Microsoft/ambient-class-merges-overloads-with-interface
Ambient class merges overloads with interface
2015-10-16 15:08:59 -07:00
Ron Buckton
81e784c01e Fixed linter error 2015-10-16 14:36:36 -07:00
Ryan Cavanaugh
6ccb2a5ef2 Better error recovery for adjacent JSX elements in expression positions
Fixes #5286
2015-10-16 13:47:57 -07:00
Ron Buckton
798ffa763d Switched switch statement to if branches.
Fixes #5229.
2015-10-16 12:36:51 -07:00
Mohamed Hegazy
35a303ac01 Do not report errors for classes and interfaces merging 2015-10-16 10:54:35 -07:00
Nathan Shively-Sanders
6798bd576b Primitives are not assignable to any-type indexers
`string/numberIndexTypesRelatedTo` needs to prevent primitives from being
assignable to an indexer of type 'any'. However, these two functions take
an apparent type, which no longer has the primitive flag set. I thought of
three ways to provide this information:

1. Pass the original type into `string/numberIndexTypesRelatedTo` and
check its flag.
2. Record a boolean `isPrimitive` before converting to the apparent type,
and pass it to `string/numberIndexTypesRelatedTo`.
3. Create a helper function `isPrimitive` that takes the apparent type and
compares it to globalString/Number/Boolean/ESSymbolType.

I decided on (1) because it seems like the simplest and safest. But none
of the options are elegant. Please suggest improvements.
2015-10-15 09:45:38 -07:00
Nathan Shively-Sanders
e964cb10ca Make constructor use merged parent symbol
Previously in getSignatureFromDeclaration, it just used the parent symbol
without checking whether it was merged.
2015-10-14 12:24:22 -07:00
Vladimir Matveev
124447763b Merge pull request #5233 from Microsoft/relaxedUseBeforeDef
allow forward references to block scoped variables from functions
2015-10-13 14:19:01 -07:00
Mohamed Hegazy
99d448a167 Merge pull request #5231 from Microsoft/removeExperimentalAsyncFunctions
Remove experimental async functions
2015-10-13 14:17:36 -07:00
Vladimir Matveev
0465f1b0bb revert enum related changes 2015-10-13 13:18:58 -07:00
Vladimir Matveev
48b24343b1 use isBlockScopedNameDeclaredBeforeUse for block scoped variables and enums 2015-10-13 00:07:36 -07:00
Vladimir Matveev
eb3b91cf1b addressed PR feedback 2015-10-12 17:24:39 -07:00
Yui
77eaf04386 Merge pull request #4914 from Microsoft/exponentiation
[ES7] Exponentiation
2015-10-12 16:37:45 -07:00
Vladimir Matveev
f952873ef1 allow forward references to block scoped variables from functions 2015-10-12 16:18:37 -07:00
Nathan Shively-Sanders
92c2d48465 Lint: remove trailing whitespace 2015-10-12 14:37:10 -07:00
Mohamed Hegazy
92f1b48cc8 Remove --experimentalAsyncFunctions 2015-10-12 14:27:33 -07:00
Nathan Shively-Sanders
d6ae55708d Do not mark class members as ambient or export.
Even members of ambient classes. These flags have no useful semantics
there, and it prevents ambient classes from merging properly with
interfaces.
2015-10-12 14:25:39 -07:00
Nathan Shively-Sanders
8a051343ff Merge pull request #5169 from Microsoft/fix-simple-uses-of-polymorphic-this-in-services
Fix simple uses of polymorphic this in services
2015-10-12 13:54:50 -07:00
Vladimir Matveev
22e68de7ec Merge pull request #5216 from Microsoft/checkFunctionsInClassExpressions
check functions in class expressions
2015-10-12 11:09:21 -07:00
Yui T
d3e10b3d3f Merge remote-tracking branch 'origin/master' into exponentiation
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/program.ts
2015-10-12 10:54:46 -07:00
Vladimir Matveev
adf9f9b8df check initialization of exported block scoped variables 2015-10-12 09:59:41 -07:00
Vladimir Matveev
a0683276d1 check functions in class expressions 2015-10-11 21:57:17 -07:00
Vladimir Matveev
f0ba3f471a support block scoped vars captured in closures inside loops 2015-10-11 01:12:26 -07:00
Vladimir Matveev
1b5dc0d7d1 Merge pull request #5121 from Microsoft/shorthandPropsInDestructuring
parse/check/emit shorthand property assignment in destructuring
2015-10-10 22:39:05 -07:00
Vladimir Matveev
a556209b7e addressed PR feedback 2015-10-09 09:55:25 -07:00
Nathan Shively-Sanders
f19a2f54ed Fixup comments 2015-10-09 09:02:42 -07:00
jbondc
3d6398162e Typo 2015-10-09 11:16:36 -04:00
Nathan Shively-Sanders
10f9fa6da6 Fix lint: remove trailing whitespace on empty line 2015-10-08 09:30:08 -07:00
Nathan Shively-Sanders
2fb6eabc2e Fix this.member completion+quickinfo of overloads
1. Completion after `this.` was empty.
2. Quick info of methods with overloads always chose the first overload,
regardless of whether an argument whose type matched a different overload.

Both have the same cause: the type parameter introduced by
polymorphic `this` is not usable, whereas the original is. In both cases,
the usage is simple -- it doesn't take advantage of the capabilities of
polymorphic `this`.
2015-10-08 08:11:33 -07:00
jbondc
82eb992dc4 Accept baselines. 2015-10-08 08:21:28 -04:00