Commit Graph

15 Commits (master)

Author SHA1 Message Date
Georgii Dolzhykov ab598e6e23
tests: rename duplicate bindings to be ready for #6400 (#6662) 2019-10-15 18:27:39 +03:00
Georgii Dolzhykov 977b828666 Get rid of TSParenthesizedType nodes before proceeding with formatting (#6605)
* get rid of TSParenthesizedType nodes before proceeding with formatting

* fix parens for TSIndexedAccessType, TSFunctionType, TSConditionalType

fixes #6603

* workaround edge cases with one-item unions and intersections

* fix parens for TSInferType

* fix parens for rest elements in tuple types

* refactoring

* fix function types in conditional types

* move tests for rest and optional tuple elements

* fix comment issues

* tests for unions and intersections

* add parens around multiline unions in tuple

* move the parens check for TS nodes closer to the one for Flow nodes

* update CHANGELOG.unreleased.md

* remove dead code

* fix parens for TSConstructorType

* better wording in CHANGELOG.unreleased.md
2019-10-14 15:00:21 +03:00
Martin Donath 385c2dcc4f [typescript, flow]: double indent for unions inside of tuples (#6381) 2019-10-08 17:37:40 +03:00
Sosuke Suzuki 02cbd15ec2 TypeScript: Fix incorrectly removes double parentheses around types (#6604) 2019-10-08 16:56:08 +03:00
Sosuke Suzuki 9e5a5435a1 fix(TypeScript): specific union type breaks after opening parenthesis, but not before closing (#6307) 2019-08-08 16:48:37 +03:00
Ika 4af3dd4b07
test: improve snapshots (#5521)
- before
  ```
  ${input}${"~".repeat(printWidth)}
  ${output}
  ```
- after
  ```
  ===options===
  ${options}
  ${" ".repeat(printWidth)}| printWidth
  ====input====
  ${input}
  ===output====
  ${output}
  =============
  ```
2018-11-25 16:21:14 +08:00
Simen Bekkhus 51b7c02e12 Upgrade jest to 22 (#4782)
* chore: upgrade Jest

* chore: update snapshots

* chore: lock down babel dependency using invalid syntax

* 2 args to test.skip

* use jest 22 for now

* Revert "2 args to test.skip"

This reverts commit 691fdc3f99e320f2303958f2b503f7b4c93fa455.

* remove snapshot name from matcher

* fix standalone tests skips
2018-07-03 03:06:29 -03:00
Brian Ng 38c8286907 Fix closing parens on multi-line intersection/union type (#3436) 2017-12-10 22:32:17 +11:00
Lucas Duailibe f119d4a90f
Change run_spec to have explicit parser list (#3356) 2017-11-30 03:31:52 -03:00
James Henry 987b931215 Fix: Union type with type params regression (#2688) 2017-08-28 18:37:12 -07:00
Lucas Azzola e8f12cf621 TypeScript: Remove parens from type annotations where possible (#2098)
* fix(typescript): remove parens from union types where possible, fixes #1885

* fix(typescript): ensure parenthesis removal is stable

* fix(typescript): don't strip parens around function type
2017-06-11 18:06:47 -07:00
Christopher Chedeau db0be7fd5b fix conflict 2017-06-02 15:44:50 -07:00
Christopher Chedeau 323d64fb84 Port intersection inlining logic to TypeScript (#1919)
Fixes #1880
2017-06-02 15:40:33 -07:00
Christopher Chedeau 0d239477cb Use semi-colon for object separator (#1918)
Looks like the convention for typescript separator is `;` whereas for flow it's `,`. Let's migrate to that.

Fixes #1896
Fixes #1879
Fixes #1874
2017-06-02 15:32:51 -07:00
Christopher Chedeau c8f255d6d5 Port a handful of heuristics we had to work on typescript nodes as well (#1735) 2017-05-25 16:49:25 -07:00