mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update Community CLI Flow types (#49866)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49866 Scope down type definitions to the subset of CLI we are currently explicitly referencing. Rename/bump to `19.x`. Related to: - https://github.com/facebook/react-native/pull/45380 - https://github.com/react-native-community/cli/pull/2584 - (others) Changelog: [Internal] Reviewed By: rshest Differential Revision: D70699083 fbshipit-source-id: 43af1b529d9b95f3d8ba955588af6a09367cdcea
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2cbb54e956
commit
ab9f501c24
-2
@@ -42,6 +42,4 @@ declare module '@react-native-community/cli-server-api' {
|
||||
},
|
||||
...
|
||||
};
|
||||
|
||||
declare export const indexPageMiddleware: NextHandleFunction;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
declare module '@react-native-community/cli-tools' {
|
||||
declare export class CLIError extends Error {
|
||||
constructor(msg: string, originalError?: Error | mixed | string): this;
|
||||
}
|
||||
|
||||
declare export const logger: $ReadOnly<{
|
||||
debug: (...message: Array<string>) => void,
|
||||
error: (...message: Array<string>) => void,
|
||||
log: (...message: Array<string>) => void,
|
||||
info: (...message: Array<string>) => void,
|
||||
warn: (...message: Array<string>) => void,
|
||||
...
|
||||
}>;
|
||||
|
||||
declare export const version: $ReadOnly<{
|
||||
logIfUpdateAvailable: (projectRoot: string) => Promise<void>,
|
||||
}>;
|
||||
}
|
||||
+3
-3
@@ -10,15 +10,15 @@
|
||||
*/
|
||||
|
||||
declare module '@react-native-community/cli-types' {
|
||||
declare export type CommandFunction<Args = Object> = (
|
||||
declare type CommandFunction<Args = Object> = (
|
||||
argv: Array<string>,
|
||||
ctx: Config,
|
||||
args: Args,
|
||||
) => Promise<void> | void;
|
||||
|
||||
declare export type OptionValue = string | boolean | number;
|
||||
declare type OptionValue = string | boolean | number;
|
||||
|
||||
declare export type CommandOption<T = (ctx: Config) => OptionValue> = {
|
||||
declare type CommandOption<T = (ctx: Config) => OptionValue> = {
|
||||
name: string,
|
||||
description?: string,
|
||||
parse?: (val: string) => any,
|
||||
Reference in New Issue
Block a user