Commit Graph

26317 Commits

Author SHA1 Message Date
csigs 9d8b61256f LEGO: check in for master to temporary branch. 2020-06-05 22:10:52 +00:00
Sheetal Nandi 0dc338281a Deprecate reloadFs so the tests are more clear in what they are achieving and its easier to track changed behaviour (#38954) 2020-06-05 13:43:34 -07:00
csigs 9d4327f0f4 LEGO: check in for master to temporary branch. 2020-06-05 16:10:39 +00:00
csigs 4933bdb55e LEGO: check in for master to temporary branch. 2020-06-05 04:10:43 +00:00
Eli Barzilay 3151e2a365 Make hasCorrectArity handle tuples properly
This completes the work that started in PR #33069, and fixes #32835.

There are probably two additional related changes that are needed to
make this more complete:

* Fix the code that composes the error message (see the first two
  `FIXME`s in `callWithSpread3.ts`).

* Fix the code that checks the argument types (second two `FIXME`s).

* There is also an error in `genericRestParameters1.ts` which changed
  but should not be an error in the first place.  Added a `FIXME` there
  too.  (Probably will work if the previous iterm is done.)

In addition, `getEffectiveCallArguments` munges the arguments in case of
a spread in the last argument which might be better to avoid.  (I think
that there are cases where it wouldn't work anyway, such as a spread of
an array followed by a spread of an empty array.)
2020-06-04 23:46:56 -04:00
rchaser53 261386d48b fix error when use spread arguments twice 2020-06-04 23:46:56 -04:00
Eli Barzilay 4ee013d1a7 Fix merging of JS value & TS type decl
Fixes #38383
2020-06-04 19:28:33 -04:00
csigs 68315a0e29 LEGO: check in for master to temporary branch. 2020-06-04 22:10:50 +00:00
Eli Barzilay a4c14a2cdc getSymbolDisplayPartsDocumentationAndSymbolKind: use actual symbol.flags for getAliasedSymbol
Fixes #35347.
2020-06-04 13:50:33 -04:00
csigs 3a55473eb1 LEGO: check in for master to temporary branch. 2020-06-04 16:10:54 +00:00
csigs fdae7ee0ea LEGO: check in for master to temporary branch. 2020-06-04 04:10:42 +00:00
Jesse Trinity 3b15b35b37 Merge pull request #38378 from jessetrinity/refactorTriggerReason
Add RefactorTriggerReason
2020-06-03 11:18:08 -07:00
csigs d8091de532 LEGO: check in for master to temporary branch. 2020-06-03 04:10:42 +00:00
Jesse Trinity d88ea4e1f8 address PR comments 2020-06-02 19:06:12 -07:00
Jesse Trinity 463f8e10b9 Merge pull request #38734 from a-tarasyuk/bug/34934
fix(34934): Completions for private members appear in JavaScript files
2020-06-02 12:47:17 -07:00
Sheetal Nandi 9fbcb99a33 Emit build info even on noEmitOnError or tsc --build (#38853)
* Emit buildinfo when there are errors with noEmitOnError?
TODO: --build mode

* Always emit tsbuild info even if there are non syntax errors in tsc --build mode

* Sort affectedFilesPendingEmit for consistent build info text
2020-06-02 12:38:40 -07:00
Sheetal Nandi f0da6d1203 Some changes to tsc baselines for clarity (#38850)
* Baseline programs in tsc -b and tsc -incremental mode as well

* Refactor outFile

* Tests

* Distinct input and output

* Add helper to baseline serialized invocations of tsc on incremental edits

* Input and output in watch mode

* Update src/testRunner/unittests/tsbuild/helpers.ts

Co-authored-by: Wesley Wigham <wewigham@microsoft.com>

Co-authored-by: Wesley Wigham <wewigham@microsoft.com>
2020-06-02 11:49:21 -07:00
csigs eb01d0c701 LEGO: check in for master to temporary branch. 2020-06-02 16:10:34 +00:00
Alexander T bc502c8c3c fix(38081): allow transforming object binding to named imports 2020-06-02 11:23:56 +03:00
Jesse Trinity 1d1c1673bf add support to convert lambda to function and vice-versa (#28250)
* add skeleton

* add getAvailableActions

* add working getEditsForAction

* add multi vardecl

* fix multi decl bug

* change refactor name

* add tests for ToAnon, ToArrow and available arrow

* add tests for ToNamed and available anon

* add tests for ReturnType and available Arrow as FnParam

* fix bug modifiers by toNamed

* add tests for modifiers

* fix for tslint error

* adapt one test case

* refactor getInfo getAvailableActions

* refactor small progress

* extract creation of block

* extract creation of funcDeclaration

* make guideline compliant

* apply feedback from pr

* add testcase and apply feedback from pr

* apply feedback from pr

* add newline

* rename testcases

* Make conditions more expressive

* fix for unnecessary duplication of comment

* apply feedback from pr

* update getAvailableActions

* check if functionExpression name is used

* add more testcases

* do not provide refactoring when it contains this
because this behaves differently in arrow than in function

* exclude nested functions and classes at containingThis check

* fix linting error

* fix line endings

Co-authored-by: BigAru <arooran@indikon.ch>
Co-authored-by: bigaru <bigaru@users.noreply.github.com>
Co-authored-by: Jesse Trinity <42591254+jessetrinity@users.noreply.github.com>
Co-authored-by: Jesse Trinity <jetrinit@microsoft.com>
2020-06-01 15:26:45 -07:00
csigs db85857d2b LEGO: check in for master to temporary branch. 2020-06-01 22:10:41 +00:00
Wesley Wigham b36b803cdd Skip default when initially iterating exports in __importStar, same as __exportStar (#38808)
* Skip default when iterating exports in __importStar, same as __exportStar

* Accept baselines
2020-06-01 14:52:24 -07:00
Jesse Trinity fb3a84c4f1 fix line endings 2020-06-01 14:15:02 -07:00
Jesse Trinity 52dad733db Merge branch 'master' into m-lambda-to-fn 2020-06-01 13:53:19 -07:00
Jack Works 8e290e5aae Improve error range for ts2657 (jsx expr must have parent element), add code fix for it (#37917)
* fix: range of ts2657 (jsx expr must have parent) and remove 2695 (LHS expr of comma has no side effects)

* feat: add code fix for 2657

* fix: resolve review

* chore: hoist a var

* chore: add test for skipTrivia

* fix: rebase error

* Update src/compiler/diagnosticMessages.json

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>

* Update src/services/codefixes/wrapJsxInFragment.ts

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>

Co-authored-by: Andrew Branch <andrew@wheream.io>
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2020-06-01 12:22:44 -07:00
Alexander T 4f0b81d415 fix(32341): add prefix name for module exports properties (#38541) 2020-06-01 11:45:05 -07:00
Alexander T fa49ac0b78 fix(19385): add space after brace in the multiline string template (#38742) 2020-06-01 10:30:52 -07:00
Alexander T 68d2ee055c fix(38815): dive in arrow functions to check only this usage instead of checking all statements (#38865) 2020-06-01 10:27:11 -07:00
csigs 85cb8e14f4 LEGO: check in for master to temporary branch. 2020-06-01 16:10:38 +00:00
csigs 287cdbf079 LEGO: check in for master to temporary branch. 2020-06-01 10:10:57 +00:00
csigs cd64b13faf LEGO: check in for master to temporary branch. 2020-06-01 04:10:40 +00:00
csigs 82f84e5411 LEGO: check in for master to temporary branch. 2020-05-31 04:10:39 +00:00
csigs 7f98da0837 LEGO: check in for master to temporary branch. 2020-05-30 10:10:59 +00:00
csigs 8caaf2f01f LEGO: check in for master to temporary branch. 2020-05-30 04:10:38 +00:00
csigs 8325a0f3ea LEGO: check in for master to temporary branch. 2020-05-29 22:10:46 +00:00
Jesse Trinity ca58c0e03c fix merge conflicts 2020-05-29 14:04:07 -07:00
Jesse Trinity 06d2461cd0 convert import trigger reason only 2020-05-29 13:03:05 -07:00
Jesse Trinity a7c07d67d8 convert export cursor only changes 2020-05-29 13:02:57 -07:00
Jesse Trinity a07a79b772 remove unused test method 2020-05-29 13:02:49 -07:00
Jesse Trinity e565931392 fix up some bools 2020-05-29 13:01:33 -07:00
Jesse Trinity 85e0d8b14a add refactorNotAvailableForTriggerReason 2020-05-29 12:55:35 -07:00
Jesse Trinity f3751fbdf3 change type of RefactorTriggerReason 2020-05-29 12:54:59 -07:00
Jesse Trinity 23f4dc9bd9 use enum for RefactorTriggerReason 2020-05-29 12:49:41 -07:00
Jesse Trinity f1127e6e94 extract symbol 2020-05-29 12:45:57 -07:00
Jesse Trinity 602ee995d0 fix lint errors 2020-05-29 12:45:54 -07:00
Jesse Trinity 55880ee5e0 extractType explicitCursorRequest 2020-05-29 12:41:28 -07:00
Jesse Trinity 0296254a60 extractType 2020-05-29 12:41:22 -07:00
Jesse Trinity 1efcffc915 convertImport 2020-05-29 12:41:18 -07:00
Jesse Trinity c3828ed086 loosen convertExport conditions 2020-05-29 12:41:14 -07:00
Jesse Trinity 02fa39a6a9 enable explicit requests for addOrRemoveBracesToArrowFunction 2020-05-29 12:41:10 -07:00