Benjamin Lichtman
5bd477e441
Merge pull request #20924 from uniqueiniquity/jsxSpreadAttributeFormatting
...
Jsx spread attribute formatting
2018-01-05 10:27:47 -08:00
Marius Schulz
25c5e57091
Return string completions for indexed access types
2018-01-05 18:14:06 +01:00
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
Andrew Casey
a961d7aa04
Only replace implements with a comma if the heritage clauses are sensible
2018-01-04 18:05:58 -08:00
Andrew Casey
afae97ce6e
Refine extends-to-implements code fix
...
1. Retain surrounding trivia when swapping the keyword.
2. Insert commas at the full-starts, rather than starts, of existing
keywords when merging with existing implements clauses.
Fixes #18794
2018-01-04 17:55:12 -08:00
Mohamed Hegazy
4eb633e0d9
Fix version of @types/node to 8.5.5 ( #21019 )
2018-01-04 17:46:09 -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
Herrington Darkholme
67eabb98bc
fix #20449 , insert space between decorators ( #20491 )
2018-01-04 16:57:27 -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
Josh Goldberg
85b32ed221
Added localization instructions to CONTRIBUTING.md ( #20451 )
...
* Added localization instructions to CONTRIBUTING.md
Fixes #20418
* Corrected mention of generated ts file
* Mentioned coding guidelines
2018-01-04 16:52:32 -08:00
uniqueiniquity
624f68a8e1
Simplify marker names
2018-01-04 16:51:19 -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
Matt Bierner
12d5063e4c
Add kindModifier to mark if a completion item is for an optional field ( #20839 )
...
* Add kindModifier to mark if a completion item is for an optional field
For #12458
Adds a new KindModifier for completion items to mark when a property is optional. This can be used by editors to either change the item icon or add a `?` to the item text
* Add method test
* Baseline-accept
2018-01-04 16:36:31 -08:00
Andrew Casey
50e3044ed2
Correct fullDisplayName returned from rename
...
The regular displayName had special handling for `as` clauses in imports
and exports but the fullDisplayName did not. They should be consistent.
(The impact of this change is very minor - it only affects the root node
of the tree control in the rename preview, which is off by default.)
Bonus: Eliminate `getDeclaredName` which is only called by rename.
Note: Special handling of default exports was not preserved since
`default` cannot be renamed.
2018-01-04 15:34:20 -08:00
Andrew Casey
f0d9cb3fbf
Add explanatory comment to FAR call-site
2018-01-04 15:34:20 -08:00
Andrew Casey
1e93967ec4
Add regression tests
2018-01-04 15:34:19 -08:00
Andrew Casey
ff58f1f2f9
Handle different default export forms the same way in import code fixes
...
`export default C` and `export { C as default }` should be handled the
same as `export default class C { }`.
Fixes #19115
2018-01-04 15:34:19 -08:00
benbraou
b36d614b56
bug(esnext): add definition for promise.finally ( #20511 )
...
Fixes #20411
2018-01-04 15:31:59 -08:00
Benjamin Lichtman
96530719ac
Merge pull request #20912 from uniqueiniquity/jsxFragmentFormatting
...
Fix formatting for JSX fragment tags
2018-01-04 15:27:36 -08:00
Matt Bierner
8ed4e666e8
Log TS Server version and process args ( #20847 )
...
* Print TS Server version and args in logs
Fixes #18867
Adds basic logging of the version of tsserver being run and the full command line arguments used to run it
* Don't check log level for logging versions/args
2018-01-04 15:18:41 -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
Nathan Shively-Sanders
0834732cd1
Update fourslash baselines too
2018-01-04 12:53:03 -08:00
Wenlu Wang
2ea5f58d60
quick fix of indexed access type ( #20956 )
2018-01-04 12:45:16 -08:00
Nathan Shively-Sanders
5e7ce21a9e
Print inferred mapped property types as any not {}
...
This makes them compatible in d.ts and slightly less misleading in
services.
2018-01-04 12:34:01 -08:00
Andy
0427d0a72b
Use 'mapDefined' array helper ( #21006 )
2018-01-04 12:25:00 -08:00
Andy
aab5c262c2
Remove unnecessary existence check ( #21005 )
2018-01-04 12:24:41 -08:00
Andy
db82a5604a
Improve find-all-references for redeclared property in a derived interface ( #21002 )
2018-01-04 10:58:14 -08:00
Nathan Shively-Sanders
cc7710c71c
Add fourslash tests and update missed baselines
2018-01-04 10:55:41 -08:00
Justin Bay
56fc112d8d
add more information to quickinfo for imported symbols
2018-01-04 01:17:23 -05: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
Nathan Shively-Sanders
b9fb4cce88
Fix quickinfo display of deferred mapped types
2018-01-03 16:26:23 -08:00
Nathan Shively-Sanders
9aa5443bbc
Fix printing of deferred mapped types' index signatures
2018-01-03 16:10:26 -08:00
Nathan Shively-Sanders
81a601bb49
Test:deferred mapped types
2018-01-03 15:54:43 -08:00
Nathan Shively-Sanders
8616170060
Fix printing of deferred mapped types
...
A deferred mapped type with a source that has an index signature now
prints {} as the type of the index signature. This avoids an infinite
recursion.
2018-01-03 15:49:09 -08:00
Andy
7de8c6bcaa
For export default foo, use 'foo' for the completion identifier name, not the module name ( #20987 )
2018-01-03 14:56:59 -08:00
Nathan Shively-Sanders
a43adad080
Simplify DeferredMappedType construction
2018-01-03 14:44:34 -08:00
Nathan Shively-Sanders
35244230d5
Add deferred mapped types
...
This allows index signature inference to be inferred as well.
2018-01-03 14:20:14 -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
Ryan Cavanaugh
dde7f03914
Merge pull request #20854 from mjbvz/global-plugins-for-inferred
...
Load global plugins for inferred projects
2018-01-03 12:39:49 -08:00
Nathan Shively-Sanders
7393433593
Merge branch 'master' into defer-inference-for-recursive-mapped-types
2018-01-03 12:19:21 -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
Anders Hejlsberg
bb23bb2a92
Propagate both TypeFlags and ObjectFlags in getSpreadType
2018-01-03 11:29:21 -08:00
Anders Hejlsberg
abc8110e9b
Merge branch 'master' into conditionalTypes
...
# Conflicts:
# src/compiler/checker.ts
2018-01-03 10:56:45 -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
Andy
74b8160430
In import fixes, use a ".js" extension if other imports do ( #20624 )
...
* In import fixes, use a ".js" extension if other imports do
* Code review
2018-01-03 08:20:53 -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
csigs
696b0f8d43
LEGO: Merge pull request 20978
...
LEGO: Merge pull request 20978
2018-01-02 16:04:31 -08:00
csigs
2002d10a98
LEGO: check in for master to temporary branch.
2018-01-03 00:04:05 +00: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