Andrew Casey
db09a593d3
Unmangle package names from typings during completion
2018-01-09 16:45:42 -08:00
Wesley Wigham
fdd8a52240
Offer per-member diagnostics for incorrectly implemented inherited members ( #21036 )
...
* Offer per-member diagnostics for incorrectly implemented inherited members on classes
* Revise error message, make containingChain a thunk
* Fix typo in comment
2018-01-09 10:20:07 -08:00
Andy
5ab5694a5b
Don't count self-reference in more cases (skip more nodes when setting lastNonBlockLocation) ( #21095 )
2018-01-09 09:53:39 -08:00
Wenlu Wang
062f97a6fa
allow const enum in type query ( #21083 )
2018-01-09 09:24:00 -08:00
Remo H. Jansen
73e3e8d790
Fixes #20026 ( #20157 )
...
* Added test case for #20026
* Implemented #20026
* Addresed comments at Microsoft/TypeScript/pull/20157#discussion_r152086287
* Fixed merge issues
* Fixed baseline issue
* Merged upstream
2018-01-08 17:25:56 -08:00
Andy
c4d76292f1
Ensure visitor visits the awaitModifier of a ForOfStatement ( #21078 )
2018-01-08 17:22:32 -08:00
Andy
37d4f6a69d
Mark references to dynamically-named properties as used ( #21010 )
...
* Mark references to dynamically-named properties as used
* Avoid showing the symbol ID
* Use symbolToString instead of showSymbol
2018-01-08 16:44:58 -08:00
Wesley Wigham
7e6315075d
Synthesize namespace records for proper esm interop ( #19675 )
...
* Integrate importStar and importDefault helpers
* Accept baselines
* Support dynamic imports, write helpers for umd module (and amd is possible) kinds
* Accept baselines
* Support AMD, use same helper initialization as is normal
* update typechecker to have errors on called imported namespaces and good error recovery with a quickfix
* Overhaul allowSyntheticDefaultExports to be safer
* Put the new behavior behind a flag
* Rename strictESM to ESMInterop
* ESMInterop -> ESModuleInterop, make default for tsc --init
* Rename ESMInterop -> ESModuleInterop in module.ts, add emit test (since fourslash doesnt do that)
* Remove erroneous semicolons from helper
* Reword diagnostic
* Change style
* Edit followup diagnostic
* Add secondary quickfix for call sites, tests forthcoming
* Add synth default to namespace import type, enhance quickfix
* Pair of spare tests for good measure
* Fix typos in diagnostic message
* Improve comment clarity
* Actually accept the updated changes to the esmodule interop description
* ESModule -> esModule
* Use find and not forEach
* Use guard
* Rely on implicit falsiness of Result.False
* These should have been emit flags
2018-01-08 16:36:23 -08:00
Mohamed Hegazy
24114d8c05
Merge branch 'master' of https://github.com/Microsoft/TypeScript
2018-01-08 14:57:26 -08:00
Andy
a23bbe65e6
Use substring instead of substr ( #20578 )
...
* Use substring instead of substr
* Remove unused scanning of SyntaxKind.DotDotDotToken in jsdoc
* Remove other unnecessary jsdoc syntax kinds
* Move all pos++ together
2018-01-08 14:54:18 -08:00
Mohamed Hegazy
1235f78232
Merge branch 'issue20410' of https://github.com/benbraou/TypeScript into benbraou-issue20410
2018-01-08 14:42:51 -08:00
Wesley Wigham
b1a0261575
If declaration emit input is a module, output should be a module ( #20626 )
2018-01-08 13:58:34 -08:00
Wesley Wigham
b2f2610b85
Use getInternalName not getLocalName ( #20168 )
2018-01-08 13:55:50 -08:00
Mohamed Hegazy
c632e44350
Merge branch 'master' into issue20410
2018-01-08 13:28:59 -08:00
Daniel Rosenwasser
6d596c058e
Merge pull request #20726 from kujon/indexable_types
...
Improved error messaging for index signature parameters
2018-01-08 13:23:39 -08:00
Wenlu Wang
0ecdc876f3
imporve conditional operator if missing colon token ( #20498 )
...
f2
2018-01-08 13:16:17 -08:00
Wenlu Wang
a82d1f8580
ignore Initial check if left of DestructuringAsignment ( #20906 )
2018-01-08 13:13:23 -08:00
Wenlu Wang
06c9a28b36
fix narrowType check with template literals ( #21024 )
2018-01-08 13:06:58 -08:00
Andy
6d361f89e3
Move isObjectLiteralElement to public utilities ( #20605 )
2018-01-08 12:29:21 -08:00
Wesley Wigham
b5fda4970d
Use emptyObjectType for omitted members instead of unknownType ( #20940 )
...
* Use emptyObjectType for omitted members instead of unknownType
* Use similar logic as is used for empty arrays for missing elements
2018-01-08 12:27:11 -08:00
Andy
20c846d671
Add helper functions to simplify getCompletionEntryDisplayNameForSymbol ( #20552 )
2018-01-08 11:48:25 -08:00
Andy
50fa0f61f5
Fix bug: Resolve module symbol before checking whether module export is a re-export ( #20989 )
...
* Fix bug: Resolve module symbol before checking whether module export is a re-export
* Remove unnecessary @nolib
2018-01-08 11:33:57 -08:00
Andy
fef7ad4986
Remove unncessary existence check ( #21029 )
2018-01-08 11:30:36 -08:00
Andy
fc18f08e63
Remove 'indexOf' helper, use 'arr.indexOf()' ( #20194 )
2018-01-08 10:39:52 -08:00
Andy
f83283c068
Improve parse error for double comma somewhere inside a call expression ( #20399 )
2018-01-08 10:38:55 -08:00
Andy
7e150a914e
Remove mutually-recursive functions ( #20425 )
2018-01-08 10:38:11 -08:00
Andy
76eafe0e75
Fix invalid cast ( #20426 )
2018-01-08 10:37:48 -08:00
Andy
6f2ba15446
Start linting for double spaces ( #20820 )
...
* Start linting for double spaces
* Code review
* Fix cases that were excluded by countDoubleSpaces
* Remove extraneous closing parenthesis
2018-01-08 08:52:13 -08:00
Daniel Rosenwasser
1041f09c27
Merge pull request #20941 from mariusschulz/stringCompletionsForIndexedAccessTypes
...
Return string completions for indexed access types
2018-01-06 21:07:00 -08:00
Klaus Meinhardt
bc2983def9
API: fix types to undefined union ( #20909 )
2018-01-05 17:36:33 -08:00
Nathan Shively-Sanders
e78ac47208
Merge pull request #20711 from Microsoft/defer-inference-for-recursive-mapped-types
...
Defer inference for homomorphic mapped types
2018-01-05 16:01:26 -08:00
Nathan Shively-Sanders
f8c86552bc
Better name for deferred mapped type:ReverseMapped
2018-01-05 15:44:38 -08:00
Andy
c6e4373403
In checkAndAggregateReturnExpressionTypes, treat MethodDeclaration in an object literal same as a FunctionExpression ( #20052 )
...
* In checkAndAggregateReturnExpressionTypes, treat MethodDeclaration in an object literal same as a FunctionExpression
* Add original test case
2018-01-05 12:34:01 -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
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
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
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
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
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
Nathan Shively-Sanders
7393433593
Merge branch 'master' into defer-inference-for-recursive-mapped-types
2018-01-03 12:19:21 -08:00