22171 Commits

Author SHA1 Message Date
Ron Buckton
e7bc5f9293 Move seldom used fields to separate object to reduce polymorphism 2020-05-21 18:57:19 -07:00
Ron Buckton
62cef9d800 Remove some megamorphic code in factory and parser 2020-05-20 23:51:15 -07:00
Ron Buckton
d9209fe352 Fix parent pointers in JSDoc 2020-05-20 15:46:22 -07:00
Ron Buckton
3cbd494b1e Inline most setChild/setChildren calls 2020-05-19 20:20:14 -07:00
Ron Buckton
415bc3eec0 Remove skipTransformationFlags 2020-05-19 16:41:10 -07:00
Ron Buckton
67aa311108 Remove TreeStateObserver 2020-05-19 15:21:03 -07:00
Ron Buckton
96e4c24415 Perf investigation 2020-05-18 17:12:12 -07:00
Ron Buckton
6ab6d5f949 Merge branch 'master' into nodeFactory
# Conflicts:
#	src/compiler/binder.ts
#	src/compiler/checker.ts
#	src/compiler/factory.ts
#	src/compiler/transformers/declarations.ts
#	src/compiler/transformers/es2015.ts
#	src/compiler/transformers/module/module.ts
#	src/compiler/transformers/module/system.ts
#	src/compiler/transformers/taggedTemplate.ts
#	src/compiler/transformers/ts.ts
#	src/compiler/utilities.ts
#	src/compiler/visitor.ts
#	src/harness/vfsUtil.ts
#	src/services/codefixes/addMissingAsync.ts
#	src/services/codefixes/convertToMappedObjectType.ts
#	src/services/codefixes/helpers.ts
#	src/services/completions.ts
#	src/services/refactors/generateGetAccessorAndSetAccessor.ts
2020-05-15 14:34:33 -07:00
Ron Buckton
1cbe7ef000
Fix crash in JS declaration emit (#38508)
* Fix crash in JS decl emit

* Emit as class with private ctor
2020-05-15 14:00:59 -07:00
Ron Buckton
9350a5ec44 Merge branch 'master' into nodeFactory-merge
# Conflicts:
#	src/compiler/factoryPublic.ts
#	src/services/codefixes/convertToAsyncFunction.ts
#	src/services/codefixes/helpers.ts
#	src/services/codefixes/inferFromUsage.ts
#	src/services/signatureHelp.ts
#	tests/baselines/reference/api/tsserverlibrary.d.ts
#	tests/baselines/reference/api/typescript.d.ts
2020-05-15 13:58:03 -07:00
Wesley Wigham
7fc456f2d7
Include unknown in spread prop override check (#38577) 2020-05-14 14:36:38 -07:00
Greg Hurrell
cfc4573c82 Fix (cosmetic) typos in checker.ts comments
Just some small things I noticed while looking at some recent PRs.
2020-05-14 19:40:41 +02:00
Anders Hejlsberg
c1f676dd3f
Perform intersection reduction before and after getApparentType (#38565)
* Perform intersection reduction before and after getApparentType

* Add regression tests
2020-05-13 20:57:17 -07:00
Alexander T
71711257ea
fix(33836): allow readonly modifier for a field with only get accessor (#36543) 2020-05-13 13:28:32 -07:00
Wenlu Wang
9725d623ce
Fix build type error (#38525) 2020-05-13 07:44:49 -04:00
Daniel Rosenwasser
b682ee1a8a
Merge pull request #38489 from microsoft/removeDuplicateInfo
Remove duplicate JSDoc comments
2020-05-12 12:52:15 -07:00
Daniel Rosenwasser
c2b559403d
Merge pull request #38502 from alan-agius4/export-star-colon
fix: add missing semi-colon to `__exportStar` unnamed function
2020-05-12 10:59:03 -07:00
Sheetal Nandi
5d6a5d04ea
Fix detecting default project when file is part for more than one project but not part of default configured project (eg because its output of that projet) (#38429)
Fixes #38366
2020-05-12 10:16:59 -07:00
Nathan Shively-Sanders
3f06adf662
Merge pull request #38240 from a-tarasyuk/feat/add-outlining-spans-for-object-destructuring-elements
feat: Add outlining spans for object destructuring elements
2020-05-12 07:35:03 -07:00
Nathan Shively-Sanders
cbf15bb6ed
feat(38225): change diagnostic message for remove braces from arrow function body (#38226) 2020-05-12 07:27:09 -07:00
Alexander T
5895493815
fix(37877): include in NavigationBar default exported child items (#38255) 2020-05-12 07:26:31 -07:00
Alan Agius
7ec21e93fe fix: add missing semi-colon to __exportStar unnamed function
Fixes #38501
2020-05-12 13:27:01 +02:00
csigs
0e37296396 LEGO: check in for master to temporary branch. 2020-05-12 04:10:41 +00:00
Daniel Rosenwasser
f9e1bcd0c4
Merge pull request #38439 from lissein/void-0-template-strings
Changed template strings to emit void 0 instead of undefined (#38430)
2020-05-11 17:09:28 -07:00
Daniel
e9867a7353 Add and use the 'intersperse' helper function. 2020-05-11 22:17:01 +00:00
csigs
27b9daf0a3 LEGO: check in for master to temporary branch. 2020-05-11 22:10:44 +00:00
Ron Buckton
d07e866a28
Fix for jsdoc modifiers on constructor params (#38403)
* Fix for jsdoc modifiers on constructor params

* Update Public API baseline and fix unique symbol grammar check for js
2020-05-11 15:07:43 -07:00
Daniel
74d6d04d70 Don't add duplicates of JSDoc comments. 2020-05-11 21:39:47 +00:00
Nathan Shively-Sanders
1a88430a7e
Improve assert message in binder (#38270)
* Improve assert message in binder

Looking at the code, I don't think the assert can ever fire, but it
clearly does, or did in the past. This will make it easier for people to
create a repro.

* fix lint

* Use BindableStaticNameExpression not BindableStaticAccessExpression

This type does allow identifiers, but those are ruled out earlier, so I added
an assert for that case.
2020-05-11 13:40:54 -07:00
jeffy-g
fd71eb2c85
fix broken regex on "src/services/completions.ts#getCompletionData" (#37546)
* fix broken regex on src/services/completions.ts#840

* update forslash test

breaking changes fourslash test

Temporarily retain the before fix code for easy comparison

* regex

* fourslash test (Temporary code

* regex: more restrictive in terms of jsdoc format

fourslash test

* regex: max indent restriction

* achieved goal by partial match strategy (probably

* cleanup

* apply requested changes

* Change to a version with minimal modifications
2020-05-11 13:02:20 -07:00
Wenqi
1b7b3eb0f7
report error for duplicate @type declaration (#38340) 2020-05-11 12:47:49 -07:00
Alexander T
738b6b5b68
fix(38073): hide 'Extract to function in global scope' action for arrow functions which use 'this' (#38107) 2020-05-11 12:25:25 -07:00
lissein
946abeadb0 Changed template strings to emit void 0 instead of undefined (#38430)
undefined is not a keyword in es5 and es3 so we now emit void 0 instead in template strings.
2020-05-09 04:53:14 +02:00
Wesley Wigham
7b03835b77
Fix js missing type arguments on existing nodes and jsdoc object literal declaration emit (#38368)
* Fix js missing type arguments on existing nodes and jsdoc object literal declaration emit

* Add special lookups test case, rename helper

* Accept slightly modified baselines
2020-05-08 10:46:28 -07:00
csigs
92b7d8b6f2 LEGO: check in for master to temporary branch. 2020-05-08 16:13:19 +00:00
Manuel Thalmann
cbc959ba35
Make isDynamicFileName available publicly (#38269)
* Make isDynamicFileName available publicly

This commit fixes #37987

* Acknowledge Public APIs
2020-05-08 07:31:59 -07:00
csigs
ece47d9d9a LEGO: check in for master to temporary branch. 2020-05-08 04:10:54 +00:00
Ron Buckton
086633f4db Merge branch 'master' into nodeFactory-merge 2020-05-07 19:00:13 -07:00
csigs
9ba861904b LEGO: check in for master to temporary branch. 2020-05-07 22:11:10 +00:00
Anders Hejlsberg
0091fd6c64
Exclude arrays and tuples from full intersection property check (#38395)
* Exclude arrays and tuples from full intersection property check

* Add regression test
2020-05-07 15:03:51 -07:00
Anders Hejlsberg
7798f532df
Fix crash caused by assertion with evolving array type (#38398)
* Properly finalize evolving array type in getTypeAtFlowCall

* Add regression test
2020-05-07 14:05:57 -07:00
csigs
1d2414822d LEGO: check in for master to temporary branch. 2020-05-07 16:10:38 +00:00
Eli Barzilay
29cf049e61 moveToNewFile: handle namespace imports too
Fixes #35591
2020-05-07 11:46:36 -04:00
Jack Williams
05d59a1f1a
Unify logic in typeof narrowing (#33434) 2020-05-06 15:15:24 -07:00
csigs
c08b020ae9 LEGO: check in for master to temporary branch. 2020-05-06 22:10:57 +00:00
Alexander T
683b3ec058
feat(37782): 'declare method' quick fix for adding a private method (#37806)
* feat(37782): add quick-fix action to declare a private method for names that start from underscore

* better merge order in messages json

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-05-06 15:10:02 -07:00
Wenlu Wang
e66ce879a9
expose jsdoc factory (#29539)
* expose jsdoc factory

* refactor jsdoc factory

* correctly jsdoc factory types

* update jsdoc factory

* Add check for delete expression must be optional

* accept new basseline

* Revert "Add check for delete expression must be optional"

This reverts commit 76937c3b1a5c3acbb3da8e449f5f88978be4eed0.

* remove newline

* make linter happy

* Add deprecated comment

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-05-06 15:06:12 -07:00
Wenlu Wang
8d78984558
Add support of contextual quick info (#37451)
* Add support of contextual quick info

* Avoid document comment map

* Make lint happy

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-05-06 15:05:31 -07:00
Nathan Shively-Sanders
35c1ba67ba
Update LKG 2020 05 06 (#38371)
* Update LKG

* remove now-extraneous casts
2020-05-06 14:42:05 -07:00
Josh Goldberg
be2eb8a2e1
Allowed comment directives to be multiline (#38228)
* Allowed comment directives to be multiline

* Added tests, and perhaps fixed a test runner bug?

* I think it's going to need a consistent variable to loop over

* Used dynamically computed indexes in verifies

* Added multiline tests

* Increased flexibility for multiline comment parsing

* Undid a couple of formatting changes; removed backslashes from multiline regexp

* Added baseline tests for multiline comment skipping

Co-authored-by: Orta Therox <orta.therox@gmail.com>
2020-05-06 13:09:29 -07:00