forked from prettier/prettier
/
jsfmt.spec.js.snap
32 lines (29 loc) · 1.1 KB
/
jsfmt.spec.js.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`optional-indexed-access.js - {"trailingComma":"all"} format 1`] = `
====================================options=====================================
parsers: ["flow", "babel"]
printWidth: 80
trailingComma: "all"
| printWidth
=====================================input======================================
type A = Obj?.['foo'];
type B = Obj?.['foo']['bar'];
type C = Obj['foo']?.['bar'];
type D = (Obj?.['foo'])['bar'];
type E = (T & S)?.['bar'];
type F = (T | S)?.['bar'];
type G = (?T)?.['bar'];
type H = (typeof x)?.['bar'];
type I = (string => void)?.['bar'];
=====================================output=====================================
type A = Obj?.["foo"];
type B = Obj?.["foo"]["bar"];
type C = Obj["foo"]?.["bar"];
type D = (Obj?.["foo"])["bar"];
type E = (T & S)?.["bar"];
type F = (T | S)?.["bar"];
type G = (?T)?.["bar"];
type H = (typeof x)?.["bar"];
type I = ((string) => void)?.["bar"];
================================================================================
`;