Commit graph

22449 commits

Author SHA1 Message Date
王文璐
dc78c4f4de improve parser and error message if definite assignment assertions in object short hand 2018-04-08 18:03:09 +08:00
Andy
92dfde0067
matchTextChunk: combine a) and b) cases (#23083) 2018-04-02 18:09:09 -07:00
Andy
1e04bd4168
Support completions for members with symbol names (#23091) 2018-04-02 18:08:00 -07:00
Anders Hejlsberg
751eab9eed
Merge pull request #23067 from Microsoft/fixTPReferenceInConditional
Fix type parameter reference checks in conditional types
2018-04-02 17:30:32 -07:00
Mohamed Hegazy
e6fa4e4415
Merge pull request #23043 from alan-agius4/feature/compiler-host-falsy-file
fix: `CompilerHost.getSourceFile` is being called for odd filenames
2018-04-02 17:08:31 -07:00
Andy
955542df8e
Simplify matchTextChunk (#23081) 2018-04-02 16:20:07 -07:00
Wesley Wigham
fd553df3a6
Path completions for import types (#23082)
* Path completions

* Add missing flag to test

* Minify test, fix lint
2018-04-02 16:15:50 -07:00
Andy
7eaad14bf9
Work around bug with global completion with invalid identifier (#23086) 2018-04-02 14:58:08 -07:00
Andy
8e14ac7d51
Improve string literal completions from a signature (#23062) 2018-04-02 13:01:31 -07:00
Andy
65323e046a
Unclosurefy patternMatcher (#23071) 2018-04-02 12:21:48 -07:00
Nathan Shively-Sanders
d3e0929b14
Mark js-assignment functions' symbols as methods (#23078)
This make display more accurate:
1. The functions now print as methods
2. When the type of the function references the class, the type of the
function itself is now printed correctly instead of as `any`.
2018-04-02 12:17:35 -07:00
Andy
72e92a0558
Remove unused properties from patternMatcher (#23076) 2018-04-02 12:02:35 -07:00
Alan Agius
7e482b27fb fix: CompilerHost.getSourceFile is being called for odd filenames besides the one being compiled
Ignore falsy file names from `getDefaultLibraryFileName`

Closes: #13629
2018-04-02 20:58:37 +02:00
Andy
8cdd1aecca
Simplify 'bestMatchKind' (#23073) 2018-04-02 11:57:19 -07:00
Andy
0d063d6161
Update baselines for chained prototype assignments (#23075) 2018-04-02 11:15:17 -07:00
Mohamed Hegazy
5ae14bc038
Merge pull request #23069 from Microsoft/portGenerat3edLibFiles4-2
Port generated lib files
2018-04-02 10:44:48 -07:00
Andy
d5142a7f45
Don't offer import completions in non-module files unless "--module" is set (#22951)
* Don't offer import completions in non-module files unless "--module" is set

* Even smarter shouldOfferImportCompletions
2018-04-02 10:21:14 -07:00
Wesley Wigham
414bc49cc4
Module or import types (#22592)
* Type side of import types

* Value side of import types

* Accept library changes

* Refined implementation, more tests

* Allow resolutions to be performed late if the resolution still results in a file already in the build

* Add another test case

* Add some jsdoc usages

* Allow nodebuilder to use import types where appropriate

* Parse & check generic instantiations

* use import types in nodebuilder for typeof module symbols

* Wire up go to definition for import types

* Accept updated type/symbol baselines now that symbols are wired in

* PR feedback

* Fix changes from merge

* Walk back late import handling

* Remove unused diagnostic

* Remove unrelated changes

* Use recursive function over loop

* Emit type arguments

* undo unrelated change

* Test for and support import type nodes in bundled declaration emit
2018-04-02 10:18:23 -07:00
Mohamed Hegazy
f29a51fd2e Port generated lib files 2018-04-02 10:12:03 -07:00
Nathan Shively-Sanders
5c442419dc
Include arrow functions as javascript initializers (#23068)
This means that they are treated as valid js containers, methods, etc.
2018-04-02 10:11:39 -07:00
Nathan Shively-Sanders
6d9a8250bd
Improve binding and jsdoc of chained special js assignments (#23038)
* Search for jsdoc on chained assignments

* Fix binding of chained binary expression js-assignments

* Test:chained jsdoc+chained prototype assignment

* Improve naming
2018-04-02 09:47:01 -07:00
Anders Hejlsberg
c2f96a3c7d Accept new baselines 2018-04-02 09:23:16 -07:00
Anders Hejlsberg
ec02ccd575 Add regression test 2018-04-02 09:23:00 -07:00
Anders Hejlsberg
d093d6a1f8 Less aggressive test for type parameter references in conditional types 2018-04-02 09:22:46 -07:00
csigs
c02b4f2d7d
LEGO: Merge pull request 23064
LEGO: Merge pull request 23064
2018-04-02 09:10:46 -07:00
csigs
b3b7909a2a LEGO: check in for master to temporary branch. 2018-04-02 16:10:24 +00:00
Andy
ea65f21677
textChanges: Don't crash when inserting type annotation on function with no parens (#23034) 2018-04-02 08:41:22 -07:00
Andy
86a8e269fa
Add 'getNameFromPropertyName' helper (#23036) 2018-04-02 08:14:15 -07:00
csigs
0fd8fb8697
LEGO: Merge pull request 23051
LEGO: Merge pull request 23051
2018-04-01 22:14:09 -07:00
csigs
71b50aad5f LEGO: check in for master to temporary branch. 2018-04-02 05:13:44 +00:00
Anders Hejlsberg
b3829523b2
Merge pull request #23039 from Microsoft/fixConditionalConstraints
Improve conditional type constraints
2018-03-31 11:56:05 -07:00
Wesley Wigham
9b558f9535
Remove _this, _super, and _newTarget name conflict errors (#22890)
* Add new generated name kind for reused transpiler variables

* Remove error on _super or _newTarget conflict

* Add test with super helper conflict

* Remove error on _this conflict

* Fix lint

* Use flags instead of generated kinds, inline some things

* Accept rename

* Remove trailing whitespace

* Move helper emit into printer, rather than emitter"

* passthru module and target

* New test, accept baselines

* Make members private
2018-03-30 17:43:37 -07:00
Wesley Wigham
8543d30372
Add union check to improved error message (#23027) 2018-03-30 16:23:24 -07:00
Anders Hejlsberg
3d91736f6c Accept new baselines 2018-03-30 16:21:23 -07:00
Anders Hejlsberg
b84e05e669 Add tests 2018-03-30 16:21:16 -07:00
Wesley Wigham
a53f9e8ec3
Call ensureModifiers on private property modifiers (#23026) 2018-03-30 16:07:09 -07:00
Arthur Ozga
9dd3ef4205
Merge pull request #22849 from aozgaa/dev/aozgaa/cSharpObjLiteralFormatting
CSharp Style Object Literal Formatting
2018-03-30 15:45:46 -07:00
Anders Hejlsberg
6f681d276a Constraint of 'T extends U ? T : F' should be 'T & U | F' 2018-03-30 15:28:01 -07:00
Andy
e14964169a
Combine getDocumentationComment implementations (#22722) 2018-03-30 09:43:12 -07:00
Andy
a5df301dec
Simplify getPropertySymbolsFromBaseTypes (#23004) 2018-03-30 09:42:49 -07:00
Mohamed Hegazy
31c3ef51d3
Merge pull request #22251 from jack-williams/jack-williams/no-implicit-symbol-to-string
Fix #19666: Check for symbol types in template expressions
2018-03-30 09:32:11 -07:00
Mohamed Hegazy
849ecdf50a
Merge pull request #22981 from a-tarasyuk/bug/advanced-options-do-not-work-with---init
Allow using Advanced_Options with --init
2018-03-30 09:22:49 -07:00
Alexander T
75df5456a2 Allow using Advanced_Options with --init. Exclude all possible Advanced_Options in tsconfig.json which were NOT defined in command line 2018-03-30 07:49:16 +03:00
Anders Hejlsberg
7714a2bb5b
Merge pull request #22989 from Microsoft/fixImpliedConstraint
Fix implied constraints in conditional types
2018-03-29 17:06:16 -07:00
Mohamed Hegazy
b47c1fd5a1
Merge pull request #22593 from Kingwl/module-spelling-fix
add spelling suggestion support for module
2018-03-29 16:56:43 -07:00
Wesley Wigham
6b7bf5e22c
Do not rely on ElementAttributeProperty if it is not present (#22936)
* Do not rely on ElementAttributeProperty if it is not present

* Fix bug

* Fix nits and lint
2018-03-29 16:19:55 -07:00
Wesley Wigham
1ed30c6d4d
Elide type reference comments which are also imported (#22752)
* Elide type reference comments which are also imported

* Explicit undefined

* Accept reordered symbols
2018-03-29 16:15:55 -07:00
Arthur Ozga
8c88ce712b update baselines 2018-03-29 16:11:17 -07:00
Arthur Ozga
95a69cbeb4 Merge branch 'master' into dev/aozgaa/cSharpObjLiteralFormatting 2018-03-29 16:10:33 -07:00
Wesley Wigham
1e5641ba8e
Mangle comment for sorcery (#23006) 2018-03-29 16:05:31 -07:00