Wesley Wigham
49689894d7
Elaborate jsx children elementwise ( #29264 )
...
* Heavy WIP, but has good contextual typing fix
* Add arity error, refine messages and spans
* Small error message change
* Better error messages, text-specific message
2019-01-15 11:32:36 -08:00
Wesley Wigham
dc0f4afe5e
Save & recalculate declare flag modifier on late printed statements ( #29412 )
...
* Save & recalculate declre flag modifier on late printed statements
* Accept related baseline updates
2019-01-14 13:53:04 -08:00
Sheetal Nandi
d4055a3234
Merge pull request #26017 from ajafff/rest-param-destructuring
...
allow BindingPattern in FunctionRestParameter
2019-01-14 10:58:19 -08:00
Wesley Wigham
aba0b700b6
Allow circular umd-merged-with-augmentation refs to resolve to the module as intended ( #29335 )
2019-01-10 14:48:15 -08:00
Wesley Wigham
76f444e338
Allow nonnull assertions in references ( #29351 )
2019-01-10 14:45:19 -08:00
Wesley Wigham
d0aff9bdcd
Fix crash ( #29333 )
2019-01-09 14:23:57 -08:00
Daniel Rosenwasser
6bfb935929
Merge pull request #25445 from a-tarasyuk/bug/24542-bad-error-message-for-import-ing-an-export
...
24542 - bad error message for `import *`-ing an `export=`
2019-01-09 11:02:14 -08:00
Klaus Meinhardt
b52a7fc3ea
Exclude JSDoc @extends from 'super()' checks ( #29308 )
...
* Exclude JSDoc @extends from 'super()' checks
This fixes a similar problem as #29244 where JSDoc `@extends`
* fix check 'super can only be referenced in a derived class'
2019-01-09 10:35:22 -08:00
Wesley Wigham
19c72c758a
Allow untyped calls on unions of untyped things ( #29265 )
2019-01-08 11:05:55 -08:00
Alexander T
52057ac4f6
Merge branch 'master' of https://github.com/Microsoft/TypeScript into bug/24542-bad-error-message-for-import-ing-an-export
2019-01-08 10:55:11 +02:00
Martin Probst
7a2b2cebbf
Do not emit code for @extends tags in JS. ( #29244 )
...
When transpiling JavaScript, TS3.1+ emits `@extends` tags as code. E.g.
/** @extends {SuperClass} */
class SubClass {}
Causes an ES5 emit that references SuperClass:
/**
* @extends {SomeBase}
*/
var SubClass = /** @class */ (function (_super) {
__extends(SubClass, _super);
function SubClass() {
return _super !== null && _super.apply(this, arguments) || this;
}
return SubClass;
}(SomeBase));
Note the literal references to `SomeBase`.
This appears to be an accidental effect of 0f55566cf4. It refactored
`getEffectiveBaseTypeNode` for type checking, but missed an instance
where it is also used for emit logic. This change fixes the problem by
specifically getting the heritage clauses directly off the AST.
Change-Id: I3128a757e5924e2528c61230a90ac13650852542
2019-01-04 08:13:14 -08:00
Klaus Meinhardt
66314e1f85
Merge branch 'master' of github.com:Microsoft/TypeScript into rest-param-destructuring
2019-01-03 17:45:17 +01:00
Anders Hejlsberg
beebda3574
Merge pull request #29110 from Microsoft/fixDiscriminantCheck
...
Fix discriminant property check
2018-12-30 17:46:01 -10:00
Anders Hejlsberg
fd3af78b8b
Merge pull request #29179 from Microsoft/typeParameterDefaultForwardReference
...
No self or forward references in type parameter defaults
2018-12-30 17:43:57 -10:00
Anders Hejlsberg
7f4d1ac475
Add regression test
2018-12-28 09:38:19 -10:00
Anders Hejlsberg
a400a8afec
Add regression test
2018-12-27 14:05:14 -10:00
Anders Hejlsberg
3e93461fc8
Add regression test
2018-12-20 07:21:49 -08:00
Wesley Wigham
08022d57c8
Allow calls on unions of dissimilar signatures ( #29011 )
...
* Add core of new union signature logic and test - needs intersection signature logic to fully work
* Add inversion of variance for class props lookup from union sig returns
* Fix lints
* Combine parameter names for nicer quick info
* PR feedback 1
* Fix miscopy
* PR feedback round 2
* Remove argument name combining because loc :(
* Nit cleanup round 3
* Reinline getTupleTypeForArgumentAtPos
* Remove a tad more
* No step on sneky off-by-one error
2018-12-19 16:35:01 -08:00
Daniel Rosenwasser
ab2a38ebef
Merge pull request #29102 from Microsoft/declarationEmitForDefaultExportClassExtendingExpression
...
Declaration emit for default exported class extending expression
2018-12-19 16:19:36 -08:00
Daniel Rosenwasser
54352dc1c9
Added test case.
2018-12-19 15:51:31 -08:00
Wesley Wigham
d23effc200
Non-latebound computed property names should print as their underlying name type ( #29084 )
2018-12-18 17:02:34 -08:00
Wesley Wigham
4e3bc9e35a
Reset constEnumOnlyModule flag on relevant symbol merges in binder ( #29079 )
2018-12-18 12:31:53 -08:00
Alexander T
78707b206a
Merge branch 'master' of https://github.com/Microsoft/TypeScript into bug/24542-bad-error-message-for-import-ing-an-export
2018-12-18 10:41:31 +02:00
Anders Hejlsberg
c52e5985b7
Merge pull request #29068 from Microsoft/noGenericEmptyObject
...
Generic types should never be considered empty objects
2018-12-17 15:59:42 -08:00
Wesley Wigham
d2885eab4a
Add regression test for #29047 ( #29066 )
2018-12-17 14:56:48 -08:00
Anders Hejlsberg
ab797df977
Add regression test
2018-12-17 14:14:54 -08:00
Daniel Rosenwasser
4d74f67325
Merge pull request #28888 from Microsoft/numericPropertyAccess
...
Avoid adding a dot when comment a property acccess's expression has trailing comments
2018-12-13 15:18:27 -08:00
Wesley Wigham
5788446aa1
Use contextual parameter types over binding pattern initializer types ( #28967 )
...
* Use contextual parameter types over binding pattern initializer types
* Remove unneeded check
2018-12-12 15:39:32 -08:00
Daniel Rosenwasser
2999a1eb47
Merge remote-tracking branch 'origin/master' into numericPropertyAccess
2018-12-11 16:52:23 -08:00
Philip Pesca
e6aa992095
Fix error message when type argument arity is wrong ( #28366 )
...
* Fix error message when type argument arity is wrong
* Parenthesize 's' in plurals
* Update baseline
* Update baseline
* Use old error message
* Revert parantheses
2018-12-11 09:54:38 -08:00
Daniel Rosenwasser
2e9be8c05b
Added more tests, including some in 'removeComments' mode.
2018-12-10 22:21:15 -08:00
Daniel Rosenwasser
bc59582c7d
Merge pull request #28627 from ajafff/arrow-arguments
...
ArrowFunction has no own 'arguments'
2018-12-10 11:42:43 -08:00
Daniel Rosenwasser
8150169762
Merge pull request #28857 from JoshuaKGoldberg/identifiers-after-numeric-literals
...
Added error for IdentifierStart immediately after a NumericLiteral
2018-12-06 11:49:56 -08:00
Josh Goldberg
a211184347
Clarified error message; extended error to identifier end
...
Lengthening the reported error length to include all of the identifier necessitates scanning for all of the identifier. I also reset the `pos` after so other identifier scanning still happens.
2018-12-06 11:17:06 -08:00
Daniel Rosenwasser
3fe72631ce
Added test case for trivia preceding dot in numeric LHS in property accesses.
2018-12-05 15:02:00 -08:00
Anders Hejlsberg
07dbc56208
Merge pull request #28854 from Microsoft/fixExcessPropertyChecks
...
Improve excess property checks
2018-12-05 08:51:08 -08:00
Josh Goldberg
174816fc26
Added error for IdentifierStart immediately after a NumericLiteral
...
Fixes #4702 .
2018-12-04 17:59:20 -08:00
Anders Hejlsberg
e7bb5625c0
Add additional tests
2018-12-04 14:51:59 -08:00
Wesley Wigham
2103ed69e6
Merge pull request #28782 from weswigham/global-merge-no-crash
...
Fix crash on umd and module merge, allow umds to be accessed when merged with a non-UMD symbol
2018-12-03 09:43:04 -08:00
Wesley Wigham
03a98a2840
Merge pull request #28783 from weswigham/fix-typeparam-parent
...
Add missing case to declaration diagnostic handler
2018-12-03 09:15:38 -08:00
Anders Hejlsberg
28f8fdaccd
Merge pull request #28784 from Microsoft/controlFlowDestructuringLoop
...
Fix control flow analysis of destructuring in loops
2018-12-01 07:01:43 -08:00
Wesley Wigham
cd6fdb11d6
Add constructor case
2018-11-30 17:44:25 -08:00
Anders Hejlsberg
290eff9722
Add regression test
2018-11-30 16:28:21 -08:00
Wesley Wigham
fa8df0d32c
Add missing case to declaration diagnostic handler
2018-11-30 16:25:07 -08:00
Wesley Wigham
d92771d61a
Fix crash on umd and module merge, allow umds to be accessed when merged with a non-UMD symbol
2018-11-30 15:55:20 -08:00
Daniel Rosenwasser
b44ee8ef4b
Added tests for types with overlap across a single property name.
2018-11-30 14:59:43 -08:00
Wesley Wigham
54bbf74f62
Do not lookup name of default property symbols from the symbols value declaration ( #28711 )
2018-11-28 13:58:43 -08:00
Nathan Shively-Sanders
f915420c80
Revert "Don't consider 'typeof a' as using 'a' ( #28528 )"
...
This reverts commit 0c4ceeec24f16f87e75386355c86ac38612a1175.
2018-11-26 14:45:19 -08:00
Daniel Rosenwasser
6627d33540
Merge pull request #27087 from Microsoft/overlappyTypes
...
Elaborate on types in unions with the most overlap in properties
2018-11-26 14:58:15 -05:00
Klaus Meinhardt
635780db07
ArrowFunction has no own 'arguments'
...
Fixes : #28621
2018-11-20 23:07:01 +01:00