Skip to content

Commit b4f58a7

Browse files
marcoww6meta-codesync[bot]
authored andcommitted
Fix a 5 more files 10/n
Summary: We are transforming the following utility types to be more consistent with typescript and better AI integration: * `$NonMaybeType` -> `NonNullable` * `$ReadOnly` -> `Readonly` * `$ReadOnlyArray` -> `ReadonlyArray` * `$ReadOnlyMap` -> `ReadonlyMap` * `$ReadOnlySet` -> `ReadonlySet` * `$Keys` -> `keyof` * `$Values` -> `Values` * `mixed` -> `unknown` See details in https://fb.workplace.com/groups/flowlang/permalink/1837907750148213/. Reviewed By: SamChou19815 Differential Revision: D91147955 fbshipit-source-id: 9cd6b4a551c2abadcc848cd850a595d58f04a16f
1 parent 3a96f2b commit b4f58a7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

packages/metro-babel-register/src/babel-register.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ const escapeRegExp = require('escape-string-regexp');
2121
const fs = require('fs');
2222
const path = require('path');
2323

24-
let _only /*: $ReadOnlyArray<RegExp | string> */ = [];
24+
let _only /*: ReadonlyArray<RegExp | string> */ = [];
2525

2626
function register(
27-
onlyList /*: $ReadOnlyArray<RegExp | string> */,
28-
opts /*: ?$ReadOnly<{earlyPlugins?: BabelCoreOptions['plugins']}> */ = {},
27+
onlyList /*: ReadonlyArray<RegExp | string> */,
28+
opts /*: ?Readonly<{earlyPlugins?: BabelCoreOptions['plugins']}> */ = {},
2929
) {
3030
// NB: `require('@babel/register')` registers Babel as a side-effect, and
3131
// also returns a register function that overrides the first registration
@@ -58,8 +58,8 @@ function register(
5858
}
5959

6060
function config(
61-
onlyList /*: $ReadOnlyArray<RegExp | string> */,
62-
options /*: ?$ReadOnly<{
61+
onlyList /*: ReadonlyArray<RegExp | string> */,
62+
options /*: ?Readonly<{
6363
lazy?: boolean,
6464
earlyPlugins?: BabelCoreOptions['plugins'],
6565
}> */,
@@ -124,8 +124,8 @@ function config(
124124
*/
125125
function buildRegExps(
126126
basePath /*: string */,
127-
dirPaths /*: $ReadOnlyArray<RegExp | string> */,
128-
) /*: $ReadOnlyArray<RegExp> */ {
127+
dirPaths /*: ReadonlyArray<RegExp | string> */,
128+
) /*: ReadonlyArray<RegExp> */ {
129129
return dirPaths.map(folderPath =>
130130
// Babel cares about Windows/Unix paths since v7b44
131131
// https://github.com/babel/babel/issues/8184

0 commit comments

Comments
 (0)