Skip to content

Commit fa1b6e5

Browse files
marcoww6meta-codesync[bot]
authored andcommitted
[flow] Make ts_utility_syntax default to true [PickRequest:2257211811458630]
Summary: I think relay has some open source customers so we should make ts_utility_syntax to default to true so it passed open source build check (e.g. relay-opensource-build-check signal in D86245770) Changelog: [internal] Reviewed By: panagosg7 Differential Revision: D86252752 Merged By: marcoww Merged Revision: c7b08ef1a9fcb2a2555f481bf8742659b4737db0 fbshipit-source-id: 25893fadd2f70b92f3fe2534144accb684970232
1 parent ff18cdf commit fa1b6e5

24 files changed

Lines changed: 24 additions & 262 deletions

newtests/lsp/code-action/quickfix/__snapshots__/quickfix-add-annotation-for-invariant-subtyping-error-1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"character": 29
5353
}
5454
},
55-
"newText": "$ReadOnly<{ v: string | number }>"
55+
"newText": "Readonly<{ v: string | number }>"
5656
}
5757
]
5858
}

newtests/lsp/code-action/quickfix/__snapshots__/quickfix-add-annotation-for-invariant-subtyping-error-2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"character": 51
5353
}
5454
},
55-
"newText": "$ReadOnly<{ v1: string | number, v2: string | number }>"
55+
"newText": "Readonly<{ v1: string | number, v2: string | number }>"
5656
}
5757
]
5858
}

newtests/lsp/code-action/quickfix/__snapshots__/quickfix-add-annotation-for-invariant-subtyping-error-3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"character": 21
5353
}
5454
},
55-
"newText": "$ReadOnly<{ v?: string }>"
55+
"newText": "Readonly<{ v?: string }>"
5656
}
5757
]
5858
}
Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
11
{
22
"method": "textDocument/codeAction",
3-
"result": [
4-
{
5-
"title": "Convert to `$Keys<T>`",
6-
"kind": "quickfix",
7-
"diagnostics": [],
8-
"edit": {
9-
"changes": {
10-
"<PLACEHOLDER_PROJECT_URL>/fix-keyof.js": [
11-
{
12-
"range": {
13-
"start": {
14-
"line": 2,
15-
"character": 9
16-
},
17-
"end": {
18-
"line": 2,
19-
"character": 16
20-
}
21-
},
22-
"newText": "$Keys<O>"
23-
}
24-
]
25-
}
26-
},
27-
"command": {
28-
"title": "",
29-
"command": "log:org.flow:<PLACEHOLDER_PROJECT_URL>",
30-
"arguments": [
31-
"textDocument/codeAction",
32-
"convert_keyof_type",
33-
"Convert to `$Keys<T>`"
34-
]
35-
}
36-
}
37-
]
3+
"result": []
384
}
Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
11
{
22
"method": "textDocument/codeAction",
3-
"result": [
4-
{
5-
"title": "Convert to `$NonMaybeType`",
6-
"kind": "quickfix",
7-
"diagnostics": [],
8-
"edit": {
9-
"changes": {
10-
"<PLACEHOLDER_PROJECT_URL>/fix-nonnullable-type.js": [
11-
{
12-
"range": {
13-
"start": {
14-
"line": 1,
15-
"character": 9
16-
},
17-
"end": {
18-
"line": 1,
19-
"character": 20
20-
}
21-
},
22-
"newText": "$NonMaybeType"
23-
}
24-
]
25-
}
26-
},
27-
"command": {
28-
"title": "",
29-
"command": "log:org.flow:<PLACEHOLDER_PROJECT_URL>",
30-
"arguments": [
31-
"textDocument/codeAction",
32-
"convert_NonNullable_type",
33-
"Convert to `$NonMaybeType`"
34-
]
35-
}
36-
}
37-
]
3+
"result": []
384
}
Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
11
{
22
"method": "textDocument/codeAction",
3-
"result": [
4-
{
5-
"title": "Convert to `$ReadOnlyArray`",
6-
"kind": "quickfix",
7-
"diagnostics": [],
8-
"edit": {
9-
"changes": {
10-
"<PLACEHOLDER_PROJECT_URL>/fix-readonlyarray-type.js": [
11-
{
12-
"range": {
13-
"start": {
14-
"line": 1,
15-
"character": 9
16-
},
17-
"end": {
18-
"line": 1,
19-
"character": 22
20-
}
21-
},
22-
"newText": "$ReadOnlyArray"
23-
}
24-
]
25-
}
26-
},
27-
"command": {
28-
"title": "",
29-
"command": "log:org.flow:<PLACEHOLDER_PROJECT_URL>",
30-
"arguments": [
31-
"textDocument/codeAction",
32-
"convert_ReadonlyArray_type",
33-
"Convert to `$ReadOnlyArray`"
34-
]
35-
}
36-
}
37-
]
3+
"result": []
384
}
Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
11
{
22
"method": "textDocument/codeAction",
3-
"result": [
4-
{
5-
"title": "Convert to `$ReadOnlyMap`",
6-
"kind": "quickfix",
7-
"diagnostics": [],
8-
"edit": {
9-
"changes": {
10-
"<PLACEHOLDER_PROJECT_URL>/fix-readonlymap-type.js": [
11-
{
12-
"range": {
13-
"start": {
14-
"line": 1,
15-
"character": 9
16-
},
17-
"end": {
18-
"line": 1,
19-
"character": 20
20-
}
21-
},
22-
"newText": "$ReadOnlyMap"
23-
}
24-
]
25-
}
26-
},
27-
"command": {
28-
"title": "",
29-
"command": "log:org.flow:<PLACEHOLDER_PROJECT_URL>",
30-
"arguments": [
31-
"textDocument/codeAction",
32-
"convert_ReadonlyMap_type",
33-
"Convert to `$ReadOnlyMap`"
34-
]
35-
}
36-
}
37-
]
3+
"result": []
384
}
Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
11
{
22
"method": "textDocument/codeAction",
3-
"result": [
4-
{
5-
"title": "Convert to `$ReadOnlySet`",
6-
"kind": "quickfix",
7-
"diagnostics": [],
8-
"edit": {
9-
"changes": {
10-
"<PLACEHOLDER_PROJECT_URL>/fix-readonlyset-type.js": [
11-
{
12-
"range": {
13-
"start": {
14-
"line": 1,
15-
"character": 9
16-
},
17-
"end": {
18-
"line": 1,
19-
"character": 20
20-
}
21-
},
22-
"newText": "$ReadOnlySet"
23-
}
24-
]
25-
}
26-
},
27-
"command": {
28-
"title": "",
29-
"command": "log:org.flow:<PLACEHOLDER_PROJECT_URL>",
30-
"arguments": [
31-
"textDocument/codeAction",
32-
"convert_ReadonlySet_type",
33-
"Convert to `$ReadOnlySet`"
34-
]
35-
}
36-
}
37-
]
3+
"result": []
384
}
Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
11
{
22
"method": "textDocument/codeAction",
3-
"result": [
4-
{
5-
"title": "Convert to `$ReadOnly`",
6-
"kind": "quickfix",
7-
"diagnostics": [],
8-
"edit": {
9-
"changes": {
10-
"<PLACEHOLDER_PROJECT_URL>/fix-readonly-type.js": [
11-
{
12-
"range": {
13-
"start": {
14-
"line": 1,
15-
"character": 9
16-
},
17-
"end": {
18-
"line": 1,
19-
"character": 17
20-
}
21-
},
22-
"newText": "$ReadOnly"
23-
}
24-
]
25-
}
26-
},
27-
"command": {
28-
"title": "",
29-
"command": "log:org.flow:<PLACEHOLDER_PROJECT_URL>",
30-
"arguments": [
31-
"textDocument/codeAction",
32-
"convert_Readonly_type",
33-
"Convert to `$ReadOnly`"
34-
]
35-
}
36-
}
37-
]
3+
"result": []
384
}
Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
11
{
22
"method": "textDocument/codeAction",
3-
"result": [
4-
{
5-
"title": "Convert to `mixed`",
6-
"kind": "quickfix",
7-
"diagnostics": [],
8-
"edit": {
9-
"changes": {
10-
"<PLACEHOLDER_PROJECT_URL>/fix-unknown-type.js": [
11-
{
12-
"range": {
13-
"start": {
14-
"line": 2,
15-
"character": 9
16-
},
17-
"end": {
18-
"line": 2,
19-
"character": 16
20-
}
21-
},
22-
"newText": "mixed"
23-
}
24-
]
25-
}
26-
},
27-
"command": {
28-
"title": "",
29-
"command": "log:org.flow:<PLACEHOLDER_PROJECT_URL>",
30-
"arguments": [
31-
"textDocument/codeAction",
32-
"convert_unknown_type",
33-
"Convert to `mixed`"
34-
]
35-
}
36-
}
37-
]
3+
"result": []
384
}

0 commit comments

Comments
 (0)