10566 Commits

Author SHA1 Message Date
Andy
f6dc0ad707
Check for unused getter/setter in classes (#21013)
* Check for unused getter/setter in classes

* Write-only use of setter is still a reference; and don't error on setter if getter exists
2018-01-05 09:10:58 -08:00
Ron Buckton
ed5e62442f
Merge pull request #20883 from HerringtonDarkholme/relax-type-constraint
fix #20018, allow skip constraint when merging interfaces
2018-01-04 17:09:45 -08:00
Klaus Meinhardt
7ef541ca1f findConfigFile can return undefined (#20556) 2018-01-04 16:56:29 -08:00
Josh Goldberg
131cf4714c Allowed trailing commas in type parameter/argument lists (#20599)
This change is only one source file and one error file... there must be something I'm missing!?
2018-01-04 16:54:51 -08:00
Orta
5865494453 Switch the pretty output to use colons to separate file:line:char so that lines are clickable in terminals (#20736) 2018-01-04 16:38:52 -08:00
benbraou
b36d614b56 bug(esnext): add definition for promise.finally (#20511)
Fixes #20411
2018-01-04 15:31:59 -08:00
Matt Bierner
3f577b8617 Fix quick info for require template string (#20851)
* Fix quick info for require template string

Fixes #20850

* Add path completions tests
2018-01-04 15:17:40 -08:00
Martin Hiller
e3a20e7f0a Do not redefine __asyncValues if it already exists (#20460)
The emitted declaration for the __asyncValues variable checked for the
global property __asyncIterable instead of its actual declared name
__asyncValues.

Now the __asyncValues variable is not redefined if it is already
present as global variable.

This commit fixes issue #20408.
2018-01-03 17:18:15 -08:00
Andy
a33f229d82
Support completions contextual types in more places (#20768)
* Support completions contextual types in more places

* Adjust formatting
2018-01-03 13:51:33 -08:00
Wesley Wigham
e0f20334d2
Use inference for filling JSX attributes in getJsxElementInstanceType (#20973)
* Add simple type inference for JSX elements

* Small cleanups from PR feedback
2018-01-03 11:30:41 -08:00
Nathan Shively-Sanders
5539e11b76
Merge pull request #20609 from Microsoft/getRootSymbols
Ensure getRootSymbols always works recursively
2018-01-03 09:44:27 -08:00
Wesley Wigham
29378b2ce2
Call back into getTypeOfFuncClassEnumModule in getTypeOfVariableOrParameterOrProperty if valueDeclaration is irregular kind (#20939) 2018-01-02 17:19:42 -08:00
Daniel Rosenwasser
0477f91dba
Merge pull request #20928 from Microsoft/initializerWithPropertyAccessUseBeforeDeclaration
Check whether we have a class before testing whether we have a super-class
2017-12-29 14:47:13 -08:00
Daniel Rosenwasser
ea94a3430d Check whether we have a class before testing whether we have a super-class. 2017-12-29 12:30:27 -08:00
Wesley Wigham
ae211983eb
Add method signature handler to getTypeOfVariableOrParameterOrProperty (#20825) 2017-12-28 19:00:54 -08:00
Anders Hejlsberg
ff4f03c51d
Merge pull request #20882 from Microsoft/fixNarrowTypeBySwitch
Fix narrowing of type variable in switch statement
2017-12-28 09:22:26 -08:00
Herrington Darkholme
303786a3b8 fix #20018, allow skip constraint when merging interfaces 2017-12-24 17:05:05 +08:00
Anders Hejlsberg
5d3ecaebad Fix narrowTypeBySwitchOnDiscriminant function 2017-12-23 19:12:49 -08:00
Nathan Shively-Sanders
2df7a89e61 Merge branch 'master' into limit-recursive-structured-type-resolution 2017-12-22 14:41:58 -08:00
Nathan Shively-Sanders
fb3042c3f7 Move recursion limiter to individual resolve* functions 2017-12-22 14:39:25 -08:00
Wesley Wigham
cedcba9285
Reset partial memberlist on defered circularity to calculate the correct members (#20179)
* Reset partial memberlist on defered circularity to calculate the correct members

* Remove return type
2017-12-22 11:41:39 -08:00
Wesley Wigham
7ad0d7b9fd
Fix higher order inference on indexed access types (#20165) 2017-12-21 14:47:03 -08:00
Wesley Wigham
00450f029c
Not all extended types have symbols (#20827) 2017-12-21 13:07:29 -08:00
Anders Hejlsberg
c78a6a5cad Fix 'this' parameter handling in getUnionSignatures 2017-12-19 19:48:30 -08:00
Daniel Rosenwasser
ccd5608392
Merge pull request #20416 from JoshuaKGoldberg/tell-me-im-pretty
Prettified timestamps and error reports in --pretty
2017-12-19 12:59:35 -08:00
Josh Goldberg
b3151707df Converted to enum; marked internal 2017-12-19 12:19:39 -08:00
Daniel Rosenwasser
69e091b40d
Merge pull request #19797 from charlespierce/implements_class_error_message
Add new error message when class implements class
2017-12-19 11:39:05 -08:00
Wesley Wigham
6c15fc6634
Fix devtools test (#20731)
* Fix devtools test

* Add small test case mimicing the issue from the user test
2017-12-18 14:47:45 -08:00
Andy
1562a278f8
Don't add completion for method if the this parameter doesn't match (#20616) 2017-12-18 11:28:04 -08:00
Andy
9a62454485
Include static 'this' accesses in references of class (#20483) 2017-12-18 10:54:22 -08:00
Andrew Casey
5e2dec7727
Merge pull request #20729 from amcasey/GH19839
Refine Extract Local
2017-12-15 16:51:25 -08:00
Wesley Wigham
ae73a9141d
Allow JSXAttributes types to be shortcut-spread into the spread type like normal objects (#19047)
* Bring jsx type resolution inline with normal objects, move jsx attribute property ignorign into relationship check

* Improved errors and reordered members

* Always use inferrential mode for jsx pass

* Add some missing skipLibChecks

* New check mode instead of odd type mapper

* Do not enable object literal freshness checks on jsx spreads

* Fix minor style nits

* Update order of type for test

* Accept corrected baseline
2017-12-15 16:13:28 -08:00
Wesley Wigham
dd933f4413
Fix get symbol at location to behave correctly for parameter assignments and jsx attributes (#20706)
* Fix get symbol at location to behave correctly got parameter assignments and jsx attributes

* Handle all those edge cases that weren;t explicitly handled

* Fix part of bug WRT getTypeAtLocation and for loops

* Baseline corrections pursuant to #20710

* Restore jsdoc tag interpretation

* Clean up some code, revert fourslash tests

* Cleanup types used by PR feedback
2017-12-15 15:50:22 -08:00
Andrew Casey
9efab94dfd Annotate fewer extracted constants with types
Expose `isContextSensitive` from the checker and omit type annotations
for expressions for which it returns false.
2017-12-15 15:11:17 -08:00
Wesley Wigham
d89d68f426
make jsx attributes mutable locations (#20710) 2017-12-15 10:02:56 -08:00
Wesley Wigham
e1278f091c
Get resolved module exports in symbol chain and not raw exports (#20661)
* Actually get module exports and not module exports sans export stars

* style update

* Trim test a bit
2017-12-13 14:01:23 -08:00
Wesley Wigham
2c6501db52
Allow multiple star-star globs in one pattern (#20639)
* Allow multiple starglobs in one pattern

* Add extra test case
2017-12-13 12:57:16 -08:00
Ryan Cavanaugh
f6603cd9f2
Merge pull request #20545 from RyanCavanaugh/codefixOmnibus
Omnibus fixes for telemetry-sourced crashes
2017-12-13 12:49:58 -08:00
Andy Hanson
ceb0502914 Code review 2017-12-13 12:28:13 -08:00
Andy Hanson
9533c0093d Merge branch 'master' into getRootSymbols 2017-12-13 12:26:57 -08:00
Wesley Wigham
40029a0523
Use TypeFlags.UnionOrIntersection not TypeFlags.Union (#20662) 2017-12-12 16:32:55 -08:00
Andy
8ad4aeece1
Make ChangeTracker#newLineCharacter public, to avoid having to pass newLineCharacter around as a parameter (#20574)
* Make ChangeTracker#newLineCharacter public, to avoid having to pass newLineCharacter around as a parameter

* Don't require newLineCharacter as input to ChangeTracker methods, and make it private again
2017-12-12 12:23:13 -08:00
Nathan Shively-Sanders
43a5a271ee object spreads to {}
Specifically, when spreading `object` on the right, spread now returns the
left of the spread; previously it returned `object`, which loses
everything to the left.
2017-12-12 08:34:36 -08:00
Andy
d53af092c7
Always check a return expression in a generator (#20621) 2017-12-12 07:50:11 -08:00
Charles Pierce
c489dd96f6 Resolve merge conflicts in codeFix 2017-12-11 22:27:56 -08:00
Yuichi Nukiyama
792b8bb78e Fix error messeage (#20601)
* Fix error messeage

* delete extra lint
2017-12-11 18:05:49 -05:00
Wesley Wigham
eba15b5990
Preserve literal types in contextual unions (#19966)
* Cherrypick non-comparability related changes from prolific literals PR

* Renames and other style changes

* Accept changes to new tests

* Exclude the domain root from contextual typing literals except for type variables

* Readd simple preservation fix

* Add huge map test

* Revert changes to widening on destructuring initalizers

* Use tristate for subtype-reduction type

* Rename type and argument

* Move longer-running test to user suite
2017-12-11 18:03:38 -05:00
Wesley Wigham
d01f4d140a
Reimplement #20320 differently to handle multiple check orders better (#20588)
* Reimplement #20320 less elegantly but handle odd check orders better

* Consolidate 2 of 3 conditions
2017-12-11 13:32:16 -05:00
Andy
484758a3d3
Handle ! following a keyword in isClassMemberStart (#20617)
* Handle `!` following a keyword in isClassMemberStart

* Fix test
2017-12-11 09:45:36 -08:00
Andy Hanson
153cc7d059 Fix return type 2017-12-11 06:50:55 -08:00