Skip to content

Commit be4c24d

Browse files
committed
Switch to modern flow syntax for utility types and bounds
1 parent c08f6ff commit be4c24d

62 files changed

Lines changed: 733 additions & 714 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.flowconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ module.system.node.resolve_dirname=flow_modules
1818
module.system.node.resolve_dirname=node_modules
1919
react.runtime=automatic
2020

21+
experimental.ts_utility_syntax=true
22+
experimental.deprecated_utilities='$ReadOnlyArray' -> '<PROJECT_ROOT>/'
23+
experimental.deprecated_utilities='$NonMaybeType' -> '<PROJECT_ROOT>/'
24+
experimental.deprecated_utilities='$ReadOnly' -> '<PROJECT_ROOT>/'
25+
experimental.deprecated_utilities='mixed' -> '<PROJECT_ROOT>/'
26+
experimental.deprecated_utilities='$ReadOnlyMap' -> '<PROJECT_ROOT>/'
27+
experimental.deprecated_utilities='$ReadOnlySet' -> '<PROJECT_ROOT>/'
28+
experimental.deprecated_utilities='$Keys' -> '<PROJECT_ROOT>/'
29+
experimental.deprecated_utilities='$Values' -> '<PROJECT_ROOT>/'
30+
experimental.deprecated_colon_extends=<PROJECT_ROOT>/
31+
2132
[strict]
2233
nonstrict-import
2334
sketchy-null

apps/platform-tests/src/components/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { ScrollView } from 'react-native';
1212
import { css, html } from 'react-strict-dom';
1313
import { tokens, themeColors, systemColors } from './tokens.css.js';
1414

15-
type ExampleBlockProps = $ReadOnly<{
15+
type ExampleBlockProps = Readonly<{
1616
title: string,
1717
children: React.Node
1818
}>;

apps/platform-tests/src/components/tokens.css.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type { StyleVars } from 'react-strict-dom';
1212
import { css } from 'react-strict-dom';
1313

1414
export const tokens: StyleVars<
15-
$ReadOnly<{
15+
Readonly<{
1616
squareColor: string,
1717
textColor: string,
1818
inputColor: string,
@@ -29,7 +29,7 @@ export const tokens: StyleVars<
2929
});
3030

3131
export const themeColors: StyleVars<
32-
$ReadOnly<{
32+
Readonly<{
3333
primary100: string,
3434
primary200: string
3535
}>
@@ -39,7 +39,7 @@ export const themeColors: StyleVars<
3939
});
4040

4141
export const systemColors: StyleVars<
42-
$ReadOnly<{
42+
Readonly<{
4343
squareColor: string,
4444
outlineColor: string
4545
}>

0 commit comments

Comments
 (0)