3191 Commits

Author SHA1 Message Date
Nathan Shively-Sanders
41bb446865 Revert unioning of this argument types
The right solution is to not instantiate this-types of unions, which is a
separate problem more to do with this-class types.
2016-02-08 16:39:19 -08:00
Nathan Shively-Sanders
738713b146 Improve error reporting
1. Fix bug in error reporting in compareSignaturesRelated.
2. When the this-argument is a union type, allow assignability when the
method's signature is assignable to *any* member of the union.
2016-02-08 14:01:51 -08:00
Nathan Shively-Sanders
fa598758b1 Improve display and contextual typing of this
1. Always display `this` type if annotated.
2. Contextually type un-annotated `this` parameters in addition to `this`
expressions.
2016-02-08 09:41:57 -08:00
Nathan Shively-Sanders
80de700be0 Get contextual type of this parameter correctly
Now the language service also sees the contextual type.

Note that with this change, the type display for contextually typed this
parameters goes away because there is no symbol. I'll fix type display
next.
2016-02-05 16:18:21 -08:00
Nathan Shively-Sanders
2f74da112d Add specific error messages for out-of-place this
Also remove lint in checker.
2016-02-04 16:01:10 -08:00
Nathan Shively-Sanders
8c87da523b First round of review comments addressed.
Only major thing is a bug fix in
`isContextSensitiveFunctionLikeDeclaration`, and turning on context
sensitivity to `this` even with `--strictThis` off.
2016-02-04 15:43:43 -08:00
Nathan Shively-Sanders
0af56c0ee2 Update error numbers in new tests after merge 2016-02-02 16:27:01 -08:00
Nathan Shively-Sanders
8032b06f33 Merge branch 'master' into this-function-types 2016-02-02 16:16:46 -08:00
Daniel Rosenwasser
3dae2534f3 Merge pull request #6278 from Microsoft/theyreNotTHATSpecial
Remove most special treatment of specialized signatures.
2016-02-02 12:45:30 -08:00
Vladimir Matveev
7259074dfb Merge pull request #6846 from Microsoft/noErrorOnEmptyDtsFile
do not error if typings for external library is empty .d.ts file
2016-02-02 12:12:52 -08:00
Vladimir Matveev
fb99a6697d do not error if typings for external library is empty .d.ts file 2016-02-02 11:36:38 -08:00
T18970237136
757f4703a9 Update test files. 2016-02-02 10:30:39 +01:00
Daniel Rosenwasser
0855933757 Merge pull request #6587 from nojvek/master
pretty output for jsx and createElement emits to children array
2016-02-01 21:38:15 -08:00
Vladimir Matveev
555f35e2cd Merge pull request #6803 from Microsoft/noDirExistsCheckInClassic
don't do 'directoryExists' check in classic resolution scheme
2016-02-01 16:49:51 -08:00
Vladimir Matveev
f94c7202d2 update baselines 2016-02-01 15:54:14 -08:00
Daniel Rosenwasser
73d9a941c8 Accepted that other baseline. 2016-02-01 14:17:35 -08:00
Daniel Rosenwasser
25d2140626 Accepted baselines. 2016-02-01 14:17:33 -08:00
Vladimir Matveev
e168e945e5 Merge pull request #6770 from Microsoft/dottedNamesInSystem
properly handle dotted namespace names in System modules
2016-02-01 10:01:05 -08:00
Vladimir Matveev
726514bac0 Merge pull request #6763 from Microsoft/classInterfaceCrossFileMerge
properly handle merged declarations across files
2016-02-01 10:00:54 -08:00
Vladimir Matveev
4d2cd6f88b properly dotted namespace names in System modules 2016-01-31 12:10:33 -08:00
Vladimir Matveev
e5aa9cbc6f properly handle merged declarations across files 2016-01-30 19:58:29 -08:00
Vladimir Matveev
39216e8811 Merge pull request #6742 from Microsoft/augmentExportEquals
allow augmentation for entities exported via 'export='
2016-01-30 19:47:06 -08:00
Vladimir Matveev
ac528cc948 addressed PR feedback 2016-01-30 16:20:48 -08:00
Noj Vek
f04f93c414 Fix typo in compiler reactNamespace error string 2016-01-30 11:37:02 -08:00
Ron Buckton
fe23cc3c44 Merge pull request #6684 from Microsoft/fixDecoratedClassName
Fix ES6 decorated class double binding.
2016-01-29 17:37:24 -08:00
Vladimir Matveev
5d22d18a70 allow augmentation for entities exported via 'export=' 2016-01-29 16:27:34 -08:00
Nathan Shively-Sanders
d030889166 Update baselines
1. Display of `this` changes for quick info.
2. The type of Function.call/apply/bind is more precise.
2016-01-29 14:52:47 -08:00
Nathan Shively-Sanders
04e7d81105 Add tests and baselines for this-function types. 2016-01-29 14:49:52 -08:00
Daniel Rosenwasser
ad9bff88fa Merge branch 'master' into theyreNotTHATSpecial 2016-01-29 14:47:23 -08:00
Vladimir Matveev
56355d1d17 fix access check issues when declaration is in multiple files 2016-01-29 13:28:27 -08:00
guybedford
94fe3e0fb2 set __moduleName from context.id argument 2016-01-29 18:42:23 +02:00
Noj Vek
238fcbcee9 single iteration through children array without any array allocation 2016-01-28 23:29:08 -08:00
Ron Buckton
4835e43a8f Merge branch 'master' into fixDecoratedClassName 2016-01-28 17:59:04 -08:00
Ron Buckton
0978639ab2 Merge branch 'master' into fixDecoratedClassName 2016-01-28 17:53:56 -08:00
Yui
e954929d4b Merge pull request #5833 from Microsoft/fix4211
Error when accessing this before super
2016-01-28 15:55:03 -08:00
Vladimir Matveev
78b525312f Merge pull request #6704 from Microsoft/isRequireCall_fix
add extra argument to 'isRequireCall' to check if argument is string …
2016-01-28 15:16:53 -08:00
Kanchalai Tanglertsampan
bf854a784f Merge branch 'master' into fix4211 2016-01-28 14:33:50 -08:00
Vladimir Matveev
3661b66be4 add extra argument to 'isRequireCall' to check if argument is string literal 2016-01-28 14:18:23 -08:00
Anders Hejlsberg
c00d239c00 Accepting new baselines 2016-01-28 13:29:58 -08:00
Anders Hejlsberg
371811ab5b Adding test 2016-01-28 10:40:08 -08:00
Ron Buckton
1bb96555da Creates a class body scoped alias to the class to avoid class name double binding.
Fixes #5386.
2016-01-27 16:13:51 -08:00
Vladimir Matveev
5b68d6559a strip quotes from module names during deduplication 2016-01-27 15:34:53 -08:00
Ron Buckton
6648403a8e Updated test baselines 2016-01-27 14:31:21 -08:00
Ron Buckton
a6af98e100 Merge pull request #6631 from Microsoft/reservePromiseInTopLevelModule
Reserve promise in top level module
2016-01-27 12:25:57 -08:00
Daniel Rosenwasser
5e05c75e93 Merge branch 'master' into theyreNotTHATSpecial 2016-01-27 11:53:42 -08:00
Vladimir Matveev
f23c35f04d Merge pull request #5728 from Microsoft/pathMappingModuleResolution
Path mapping module resolution
2016-01-27 11:38:33 -08:00
Vladimir Matveev
2b22a47cbb Merge pull request #6553 from Microsoft/handleNestedBlockScopedName
handle block scoped binding in nested blocks
2016-01-27 11:28:59 -08:00
Anders Hejlsberg
98603f9f49 Merge pull request #6532 from Microsoft/readonlyMembers
Readonly properties and index signatures
2016-01-27 10:50:26 -08:00
Vladimir Matveev
e67ff39e17 merge with origin/master 2016-01-27 10:40:52 -08:00
Kanchalai Tanglertsampan
e910e7151b Merge branch 'master' into fix4211 2016-01-27 10:36:08 -08:00