Andy
fe3a05e89a
A function should be context-sensitive if its return expression is ( #17697 )
...
* A function should be context-sensitive if its return expression is
* Remove outdated comment
* Fix typo
2017-08-10 07:08:24 -07:00
Wesley Wigham
8fde483393
Add test for #16144 ( #17712 )
2017-08-10 00:10:36 -07:00
Nathan Shively-Sanders
a59f77ffb4
Test:type predicate uses correct index to report errors
2017-08-09 15:45:28 -07:00
Andy
e1ba65ae64
Add simple version of chooseOverload for common case of single non-generic signature ( #17589 )
...
* Add simple version of `chooseOverload` for common case of single non-generic signature
* Use a single function
2017-08-09 14:41:38 -07:00
Andy
37b20ee670
For duplicate source files of the same package, make one redirect to the other ( #16274 )
...
* For duplicate source files of the same package, make one redirect to the other
* Add reuseProgramStructure tests
* Copy `sourceFileToPackageId` and `isSourceFileTargetOfRedirect` only if we completely reuse old structure
* Use fallthrough instead of early exit from loop
* Use a set to efficiently detect duplicate package names
* Move map setting outside of createRedirectSourceFile
* Correctly handle seenPackageNames set
* sourceFileToPackageId -> sourceFileToPackageName
* Renames
* Respond to PR comments
* Fix bug where `oldSourceFile !== newSourceFile` because oldSourceFile was a redirect
* Clean up redirectInfo
* Respond to PR comments
2017-08-09 14:39:06 -07:00
Wesley Wigham
6221d7089e
Fix import addition location ( #17327 )
...
* Add test with bug
* Fix for import placement
* Consolidate comment recognition functions into utilities
* Add another test with all 3 kinds
* Recognize path directives as part of triple slash directives
* Also handle no-default-lib triple-slash comments
* Test for all the triple-slash kinds
* Keep import-placement logic in the quickfix, since its not really a node start; accept new baselines
* Work in not-ES6, use a real no-lib comment
* Remove no default lib triple slash comment, it disables checking and thereby quick fixes
* Copy regex rather than have a regex copy
2017-08-09 14:03:37 -07:00
Andy
e73d58e21c
findAllReferences: Type parameter is not globally visible ( #16419 )
...
* findAllReferences: Type parameter is not globally visible
* Add test for merged interface
* Clean up comment
2017-08-09 13:53:54 -07:00
Yui
39e0cc61a7
Fix 16628: "undefined" exception when name of binding element in binding pattern is empty ( #17132 )
...
* Handle the case where binding pattern name element is empty
* Update tests and baselines
* Feedback from PR
* Handle empty binding patterns more generally in emitter
* Dont simply handling fo empty binding patterns and stay spec compliant
* PR feedback
2017-08-09 13:47:44 -07:00
Wesley Wigham
c399230767
Retain comments inside return statements ( #17557 )
...
* Retain comments inside return statements by including the return keyword in the parse tree
* Revert "Retain comments inside return statements by including the return keyword in the parse tree"
This reverts commit 5d2142edb1ffb9f6cb150b815aff6e627ae80449.
* Readd test
* Function for handling printing comments on a token
2017-08-08 19:53:53 -07:00
Wesley Wigham
43e758e1a9
Create synthetic default exports for dynamic imports ( #17492 )
...
* Create synthetic default exports for dynamic imports
* Slightly better solution
* Actually accept baselines
* Slightly adjust synthetic type
* Cache synthetic type
* Inline variables, remove non-required calls
* Rename function
2017-08-08 17:01:18 -07:00
Nathan Shively-Sanders
847d7fe3c8
Merge pull request #17404 from Microsoft/use-type-param-constraints-for-computed-prop-types
...
Use type parameter constraints for computed property types
2017-08-08 16:29:28 -07:00
Ron Buckton
75c8ecb2f1
Merge pull request #17517 from tinganho/IgnoredCatchParameter
...
Ignored catch parameter
2017-08-08 16:15:18 -07:00
Wesley Wigham
d2625678f9
Add test case from #14439 ( #17627 )
2017-08-08 14:44:41 -07:00
Nathan Shively-Sanders
e494d73b29
Merge branch 'master' into use-type-param-constraints-for-computed-prop-types
2017-08-08 13:26:24 -07:00
Wesley Wigham
af20adb137
Add tests for #15358 ( #17664 )
2017-08-08 13:06:12 -07:00
Ron Buckton
83ae8afef8
Merge pull request #17394 from vvakame/openParentFormatting
...
Add SpaceBetweenOpenParens formatting rule
2017-08-08 13:04:13 -07:00
Nathan Shively-Sanders
a2c66c3262
Merge pull request #17660 from Microsoft/weak-type-errors-on-signature-only-types
...
Weak type errors on signature-only types
2017-08-08 12:40:50 -07:00
Nathan Shively-Sanders
7ff1d8e797
Add specific weak type error for callable types
...
"Did you mean to call it?"
2017-08-08 11:25:32 -07:00
Andy
94518e8533
Don't count self-reference when setting isReferenced ( #17495 )
...
* Don't count self-reference when setting `isReferenced`
* Improve comment
2017-08-08 11:18:20 -07:00
Nathan Shively-Sanders
781da2332d
Merge branch 'master' into weak-type-errors-on-signature-only-types
2017-08-08 10:45:52 -07:00
Ron Buckton
cacc3006c7
Merge branch 'master' into implicitlyExcludeNodeModules
2017-08-07 18:17:05 -07:00
Ron Buckton
31230b9176
Merge pull request #16953 from charlespierce/destructure_completion_nonpublic
...
Remove nonpublic members from destructuring completion lists
2017-08-07 14:24:47 -07:00
Anders Hejlsberg
aa0fc0b885
Merge pull request #17633 from Microsoft/indexSignatureMappedType
...
Mapped type and string index signature relations
2017-08-07 14:17:29 -07:00
Anders Hejlsberg
3118e81297
Merge pull request #17634 from Microsoft/fixSignatureStackOverflow
...
Fix stack overflow related to contextual signature instantiations
2017-08-07 14:00:14 -07:00
Anders Hejlsberg
3efeb1e27f
Address CR feedback
2017-08-07 13:59:52 -07:00
Nathan Shively-Sanders
068cb8d5d0
Update weakType test + baselines
2017-08-07 10:58:07 -07:00
Wesley Wigham
a453eff575
Restrict parsing of literals and their expressions a _lot_ more ( #17628 )
2017-08-07 09:16:12 -07:00
Anders Hejlsberg
313c93c861
Merge pull request #17521 from Microsoft/deferLookupTypeResolution
...
Defer indexed access type resolution
2017-08-07 08:25:06 -07:00
Anders Hejlsberg
a4a37ea086
Add regression test
2017-08-05 12:40:40 -07:00
Anders Hejlsberg
c938a2acdc
Add tests
2017-08-05 10:17:20 -07:00
Yui
d7fff8ebe9
[Master] fix 12985 emit leading and trailing comment around binary operator ( #16584 )
...
* Emit leading and trailing on binary operator
* Add tests and baselines
* Update baselines
2017-08-04 19:12:13 -07:00
Nathan Shively-Sanders
8f7a582fc5
Merge branch 'master' into inferFromRelatedTypesOnly
2017-08-04 15:21:17 -07:00
Ron Buckton
b747c2dd96
exclude node_modules unless explicitly included
2017-08-03 18:48:27 -07:00
Nathan Shively-Sanders
0d7f0e0e19
Test:infer from related types only
2017-08-03 09:14:59 -07:00
Daniel Rosenwasser
1552761982
Merge pull request #17425 from ikatyang/fix-17392
...
Retain literal type for prefix plus on number literal
2017-08-02 18:41:21 -07:00
Wesley Wigham
c06a30ae68
JSDoc Instantiation Fixes ( #17553 )
...
* Fix #17383 - issue an error when jsdoc attempts to instantiate a builtin as a generic
* Fix comment
* Fix #17377 - only get type parameters from reference target if the type is a reference
* Fix #17525 - Add SyntaxKind.AsteriskToken to isStartOfType
2017-08-02 13:55:14 -07:00
Anders Hejlsberg
467245780d
Merge pull request #17455 from Microsoft/mappedTypeFixes
...
Mapped and indexed access type fixes
2017-08-02 13:36:37 -07:00
Anders Hejlsberg
98f6761590
Add tests
2017-08-02 12:07:09 -07:00
Tingan Ho
4f3e13ab8c
Typo
2017-08-02 20:55:19 +02:00
Tingan Ho
f9e85ec091
Adds missing test cases
2017-08-02 20:48:31 +02:00
Nathan Shively-Sanders
a0333b55e5
Merge branch 'master' into use-type-param-constraints-for-computed-prop-types
2017-08-02 10:40:16 -07:00
Nathan Shively-Sanders
aed386c796
Add regression test cases and rename test
2017-08-02 10:33:15 -07:00
Andy
4f13bcfac1
Fix find-all-references for destructured getter ( #17483 )
...
* Fix find-all-references for destructured getter
* Handle setter too
* Use SymbolFlags.Accessor
2017-08-02 06:51:26 -07:00
Tingan Ho
192628510f
Fixes CR comments
2017-08-02 12:05:10 +02:00
Tingan Ho
81fb3f702a
Addresses CR feedback
2017-08-01 22:10:12 +02:00
Mine Starks
84c579586c
Merge pull request #17536 from minestarks/fix15223
...
Missing import codefix: Take scoped packages (@foo/bar) into consideration
2017-07-31 14:09:37 -07:00
Mine Starks
16112c358d
Missing import codefix: Take scoped packages (@foo/bar) into consideration
2017-07-31 13:28:55 -07:00
Wesley Wigham
c73fdc87d0
Allow JSXAttribute to be IdentifierName ( #17466 )
...
* Add test
* Fix #17452 - Allow JSXAttribute names to be IdentifierNames
* Move check into isIdentifierName
2017-07-31 13:03:26 -07:00
Anders Hejlsberg
9cb14feef5
Add tests
2017-07-30 18:08:10 -07:00
Tingan Ho
58c8a2c03d
adds test for try-catch-finally
2017-07-30 23:27:27 +02:00