Andy
12163cc02e
Allow to narrow the type of an import ( #16658 )
...
* Allow to narrow the type of an import
* Assume alias is initialized
2017-07-10 09:18:35 -07:00
Andy
ba8e5a7e24
Never return undefined from getExportsOfModule ( #17013 )
2017-07-07 10:06:12 -07:00
Wesley Wigham
4e6b2f3c93
Created a branded type for identifier-escaped strings ( #16915 )
...
* Created a branded type for escaped strings
Then flowed it throughout the compiler, finding and fixing a handful of
bugs relating to underscore-prefixed identifiers in the process.
Includes a test for two cases noticed - diagnostics from conflicting
symbols from export *'s, and enum with underscore prefixed member emit.
* Correctly double underscores WRT mapped types
* Add fourslash tests for other fixed issues
* use function call over cast
* Update forEachEntry type accuracy
* Just use escaped names for ActiveLabel
* Remove casts from getPropertyNameForPropertyNameNode
* This pattern has occurred a few times, could use a helper function.
* Remove duplicated helper
* Remove unneeded check, use helper
* Identifiers list is no longer escaped strings
* Extract repeated string-getting code into helper
* Rename type and associated functions
* Make getName() return UnderscoreEscapedString, add getUnescapedName()
* Add list of internal symbol names to escaped string type to cut back on casting
* Remove outdated comments
* Reassign interned values to nodes, just in case
* Swap to string enum
* Add deprecated aliases to escapeIdentifier and unescapeIdentifier
* Add temp var
* Remove unsafe casts
* Rename escaped string type as per @sandersn's suggestion, fix string enum usages
* Reorganize double underscore tests
* Remove jfreeman from TODO
* Remove unneeded parenthesis
2017-07-06 14:45:50 -07:00
Arthur Ozga
ad291d924d
Merge pull request #16748 from aozgaa/implementOptionCrash
...
visit question token
2017-07-06 13:51:15 -07:00
Arthur Ozga
dc08c5f241
Merge branch 'master' into caretPositionInFourslash
2017-07-06 10:44:59 -07:00
Arthur Ozga
d661622e19
update tests
2017-06-30 19:41:09 -07:00
Nathan Shively-Sanders
9048c0ae47
Merge pull request #16844 from Microsoft/codefix-spelling-correction-for-typeparameters
...
Spelling code fix: suggestions from apparent type
2017-06-30 12:56:18 -07:00
Nathan Shively-Sanders
abec46ce48
Test:spelling suggestions for more types
...
Test spelling suggestions for primitives, unions/intersections and type
parameters with constraints.
2017-06-30 10:12:02 -07:00
Nathan Shively-Sanders
e0bf267029
spelling:getPropertiesOfType instead of objectType
...
This provides suggestions for more types based on their apparent type:
unions, type parameters with constraints, primitives.
2017-06-30 10:11:00 -07:00
Arthur Ozga
4e6e1d1b8b
Merge pull request #16657 from aozgaa/formatOnOpenCurly
...
Format on open curly
2017-06-30 10:04:57 -07:00
Nathan Shively-Sanders
f45df8fb69
Spelling code fix:suggestions from apparent type
...
The code fix for spelling correction needs to provide suggestions based
on the apparent type since sometimes the type at a location will be a type
parameter. One such example is `this`.
Fixes #16744
2017-06-29 16:21:00 -07:00
Ryan Cavanaugh
ec00bb9b72
Merge pull request #16697 from RyanCavanaugh/preserveMethodComments
...
Preserve method comments in JS->ES6 conversion.
2017-06-29 15:40:16 -07:00
Ryan Cavanaugh
277f4592c1
Add tests
2017-06-29 15:14:09 -07:00
Daniel Rosenwasser
22f38b720c
Merge pull request #16704 from charlespierce/namespace_export_default
...
Diagnostics for default class / function export in namespace
2017-06-28 17:10:45 -07:00
Andy
2ccfe502f7
Fix scope of @typedef references ( #16718 )
...
* Fix scope of @typedef references
* Remove unused variables
2017-06-28 13:30:23 -07:00
Arthur Ozga
eae234cab2
disable spaceBeforeOpenCurly if newline rule is enabled
2017-06-28 13:13:53 -07:00
Andy
42e08f5578
findAllRefs: Find string references inside of template strings ( #16723 )
2017-06-28 12:53:12 -07:00
Nathan Shively-Sanders
c51c2aecca
Merge pull request #16736 from DickvdBrink/issue/15208
...
Also check TypeAlias for unused type parameters
2017-06-28 12:37:04 -07:00
Nathan Shively-Sanders
2f5ecf00a1
Merge pull request #16698 from Microsoft/master-16017
...
[Master] Fix 16017 - ordering of promise all method
2017-06-28 10:46:53 -07:00
Andy
18357543c6
Provide better services for incomplete generic calls ( #16535 )
...
* Provide better services for incomplete generic calls
* Use clearer name
* Remove `inferredAnyDefaultTypeArgument` and `getBestGuessSignature`; have `resolveSignature` always get the best signature if !produceDiagnostics
* Update names and comments
2017-06-27 09:14:23 -07:00
Arthur Ozga
45a77c0a2c
visit question token
2017-06-26 12:33:29 -07:00
Arthur Ozga
61af315778
respond to comments
2017-06-26 10:55:04 -07:00
Ryan Cavanaugh
b52747e12c
Add property comments as well
2017-06-26 10:54:18 -07:00
Charles Pierce
386454a255
#16300 #16301 Diagnostics for default export in namespace
2017-06-22 20:20:41 -07:00
Nathan Shively-Sanders
6a111928b4
Merge pull request #16375 from Microsoft/skip-block-scope-for-global-symbol
...
Skip block scope check for global symbol
2017-06-22 15:29:35 -07:00
Kanchalai Tanglertsampan
77d69c8c1d
Add tests and update baselines
2017-06-22 11:56:49 -07:00
Ryan Cavanaugh
04d750f9f8
Preserve method comments in JS->ES6 conversion. Fixes #16622
2017-06-22 11:45:34 -07:00
Yui
3ade89ca0e
Merge pull request #16178 from Microsoft/master-fix13306
...
[Master] Fix #13306 recognize @type on property assignment
2017-06-22 11:25:22 -07:00
Arthur Ozga
f9592b6479
fix and add test
2017-06-22 11:17:38 -07:00
Dick van den Brink
33224747b3
Added test for unused typeparameters in a typealias declaration
2017-06-22 16:45:09 +02:00
Arthur Ozga
28fce55e1f
add and update tests
2017-06-20 11:52:05 -07:00
Yui
47c1563649
Merge pull request #16544 from Microsoft/master-fixIncrementalParsingWithDynamicImport
...
[Master] wip - fix incremental parsing with dynamic import
2017-06-19 16:44:47 -07:00
Kanchalai Tanglertsampan
8038300380
Add tests
2017-06-19 16:18:42 -07:00
Sheetal Nandi
31653de3c3
Merge pull request #16566 from Microsoft/keywordFilters
...
Fix the completion for parameters
2017-06-15 15:44:33 -07:00
Sheetal Nandi
4b3e661aaa
Merge pull request #12336 from Microsoft/ownJsonParsing
...
Use parser to parse tsconfig json instead of using Json.parse
2017-06-15 14:30:42 -07:00
Sheetal Nandi
4ce8af3652
Show public/private/protected/readonly when looking for constructor parameter and otherwise parameter declaration or property declaraiton should result in no completion
...
Fixes #15937
2017-06-15 11:16:35 -07:00
Andy
537695c313
In TypeScript code, never bind JSDoc normally, just set parent pointers ( #16555 )
2017-06-15 10:02:16 -07:00
Sheetal Nandi
09f0b3471a
Merge branch 'master' into ownJsonParsing
2017-06-15 09:59:37 -07:00
Daniel Rosenwasser
5b12a04965
Merge pull request #16213 from charlespierce/await_yield_literals
...
Update special cases for await / yield expression parsing
2017-06-15 00:39:57 -07:00
Yui T
f66ad03459
Add tests
2017-06-14 21:41:19 -07:00
Nathan Shively-Sanders
26ab0cd138
Merge pull request #16530 from Microsoft/excess-property-check-error-span-for-spread-property
...
Improve excess property check error span for spread property
2017-06-14 16:16:20 -07:00
Nathan Shively-Sanders
19c564d48d
Test:error span for spread prop in excess prop check
2017-06-14 11:29:06 -07:00
Nathan Shively-Sanders
657c469d4f
Remove undefined from optional spread properties
...
Fixes #16509 by making the change from #15938 less strict. This is
technically a hole, but it's not as big a hole as before #15938 .
2017-06-14 10:31:11 -07:00
Ron Buckton
fbe002a595
Merge pull request #16502 from Microsoft/fix16211
...
Fix 'extends' with type parameter default returned from superclass construct signature
2017-06-13 19:30:27 -07:00
Mohamed Hegazy
3532875af7
Merge branch 'master' into completionWithMeaning
2017-06-13 17:41:24 -07:00
Kanchalai Tanglertsampan
9df2931aa3
Add tests and update baselines
2017-06-13 15:24:05 -07:00
Nathan Shively-Sanders
57f8648b0f
Merge pull request #16505 from Microsoft/decl-emit-parenthesize-keyof
...
Add parentheses around keyof in declaration emit when needed
2017-06-13 14:17:49 -07:00
Nathan Shively-Sanders
2d2ac6794f
Test:correct parens around keyof in decl emit
2017-06-13 14:00:26 -07:00
Ron Buckton
6370fc8b85
Fix class extends+decorator with new class emit
2017-06-13 13:35:53 -07:00
Nathan Shively-Sanders
9f69cd5a62
Merge pull request #16497 from Microsoft/use-checker-for-decl-emit-of-optional-param-props
...
Use checker for declaration emit of optional, uninitialised parameter properties
2017-06-13 13:21:35 -07:00