flow: add libdefs that have clean updates (#1311)
Summary: Generated by running `flow-typed install --skip --overwrite` and reverting a minimal set of libdefs such that the change does not introduce any Flow errors (except Prettier, which is covered by #1307). Addresses parts of #1308. Changes: - `chalk`: upgraded v1.x.x to v2.x.x - `flow-bin`: no-op; explicit Flow window widening - `isomorphic-fetch`: no-op; formatting change - `jest`: updates for Flow v0.104.x (explicit inexact objects), and also some functional additions - `object-assign`: no-op; explicit Flow window widening - `rimraf`: added new at v2.x.x Test Plan: Flow passes, by construction. wchargin-branch: libdefs-clean
This commit is contained in:
parent
158dc0b831
commit
ecd15ed3c4
|
@ -1,114 +0,0 @@
|
|||
// flow-typed signature: f965116cdb881170be8c42b10554e195
|
||||
// flow-typed version: da30fe6876/chalk_v1.x.x/flow_>=v0.25.x
|
||||
|
||||
type $npm$chalk$StyleElement = {
|
||||
open: string,
|
||||
close: string
|
||||
};
|
||||
|
||||
type $npm$chalk$Chain = $npm$chalk$Style & ((...text: any[]) => string);
|
||||
|
||||
type $npm$chalk$Style = {
|
||||
// General
|
||||
reset: $npm$chalk$Chain,
|
||||
bold: $npm$chalk$Chain,
|
||||
dim: $npm$chalk$Chain,
|
||||
italic: $npm$chalk$Chain,
|
||||
underline: $npm$chalk$Chain,
|
||||
inverse: $npm$chalk$Chain,
|
||||
strikethrough: $npm$chalk$Chain,
|
||||
|
||||
// Text colors
|
||||
black: $npm$chalk$Chain,
|
||||
red: $npm$chalk$Chain,
|
||||
green: $npm$chalk$Chain,
|
||||
yellow: $npm$chalk$Chain,
|
||||
blue: $npm$chalk$Chain,
|
||||
magenta: $npm$chalk$Chain,
|
||||
cyan: $npm$chalk$Chain,
|
||||
white: $npm$chalk$Chain,
|
||||
gray: $npm$chalk$Chain,
|
||||
grey: $npm$chalk$Chain,
|
||||
|
||||
// Background colors
|
||||
bgBlack: $npm$chalk$Chain,
|
||||
bgRed: $npm$chalk$Chain,
|
||||
bgGreen: $npm$chalk$Chain,
|
||||
bgYellow: $npm$chalk$Chain,
|
||||
bgBlue: $npm$chalk$Chain,
|
||||
bgMagenta: $npm$chalk$Chain,
|
||||
bgCyan: $npm$chalk$Chain,
|
||||
bgWhite: $npm$chalk$Chain
|
||||
};
|
||||
|
||||
type $npm$chalk$StyleMap = {
|
||||
// General
|
||||
reset: $npm$chalk$StyleElement,
|
||||
bold: $npm$chalk$StyleElement,
|
||||
dim: $npm$chalk$StyleElement,
|
||||
italic: $npm$chalk$StyleElement,
|
||||
underline: $npm$chalk$StyleElement,
|
||||
inverse: $npm$chalk$StyleElement,
|
||||
strikethrough: $npm$chalk$StyleElement,
|
||||
|
||||
// Text colors
|
||||
black: $npm$chalk$StyleElement,
|
||||
red: $npm$chalk$StyleElement,
|
||||
green: $npm$chalk$StyleElement,
|
||||
yellow: $npm$chalk$StyleElement,
|
||||
blue: $npm$chalk$StyleElement,
|
||||
magenta: $npm$chalk$StyleElement,
|
||||
cyan: $npm$chalk$StyleElement,
|
||||
white: $npm$chalk$StyleElement,
|
||||
gray: $npm$chalk$StyleElement,
|
||||
|
||||
// Background colors
|
||||
bgBlack: $npm$chalk$StyleElement,
|
||||
bgRed: $npm$chalk$StyleElement,
|
||||
bgGreen: $npm$chalk$StyleElement,
|
||||
bgYellow: $npm$chalk$StyleElement,
|
||||
bgBlue: $npm$chalk$StyleElement,
|
||||
bgMagenta: $npm$chalk$StyleElement,
|
||||
bgCyan: $npm$chalk$StyleElement,
|
||||
bgWhite: $npm$chalk$StyleElement
|
||||
};
|
||||
|
||||
declare module "chalk" {
|
||||
declare var enabled: boolean;
|
||||
declare var supportsColor: boolean;
|
||||
declare var styles: $npm$chalk$StyleMap;
|
||||
|
||||
declare function stripColor(value: string): any;
|
||||
declare function hasColor(str: string): boolean;
|
||||
|
||||
// General
|
||||
declare var reset: $npm$chalk$Chain;
|
||||
declare var bold: $npm$chalk$Chain;
|
||||
declare var dim: $npm$chalk$Chain;
|
||||
declare var italic: $npm$chalk$Chain;
|
||||
declare var underline: $npm$chalk$Chain;
|
||||
declare var inverse: $npm$chalk$Chain;
|
||||
declare var strikethrough: $npm$chalk$Chain;
|
||||
|
||||
// Text colors
|
||||
declare var black: $npm$chalk$Chain;
|
||||
declare var red: $npm$chalk$Chain;
|
||||
declare var green: $npm$chalk$Chain;
|
||||
declare var yellow: $npm$chalk$Chain;
|
||||
declare var blue: $npm$chalk$Chain;
|
||||
declare var magenta: $npm$chalk$Chain;
|
||||
declare var cyan: $npm$chalk$Chain;
|
||||
declare var white: $npm$chalk$Chain;
|
||||
declare var gray: $npm$chalk$Chain;
|
||||
declare var grey: $npm$chalk$Chain;
|
||||
|
||||
// Background colors
|
||||
declare var bgBlack: $npm$chalk$Chain;
|
||||
declare var bgRed: $npm$chalk$Chain;
|
||||
declare var bgGreen: $npm$chalk$Chain;
|
||||
declare var bgYellow: $npm$chalk$Chain;
|
||||
declare var bgBlue: $npm$chalk$Chain;
|
||||
declare var bgMagenta: $npm$chalk$Chain;
|
||||
declare var bgCyan: $npm$chalk$Chain;
|
||||
declare var bgWhite: $npm$chalk$Chain;
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
// flow-typed signature: 8af4d93597d645140f12c00de2a323bc
|
||||
// flow-typed version: c6154227d1/chalk_v2.x.x/flow_>=v0.104.x
|
||||
|
||||
// From: https://github.com/chalk/chalk/blob/master/index.js.flow
|
||||
|
||||
declare module "chalk" {
|
||||
declare type TemplateStringsArray = $ReadOnlyArray<string>;
|
||||
|
||||
declare type Level = $Values<{
|
||||
None: 0,
|
||||
Basic: 1,
|
||||
Ansi256: 2,
|
||||
TrueColor: 3,
|
||||
...
|
||||
}>;
|
||||
|
||||
declare type ChalkOptions = {|
|
||||
enabled?: boolean,
|
||||
level?: Level
|
||||
|};
|
||||
|
||||
declare type ColorSupport = {|
|
||||
level: Level,
|
||||
hasBasic: boolean,
|
||||
has256: boolean,
|
||||
has16m: boolean
|
||||
|};
|
||||
|
||||
declare interface Chalk {
|
||||
(...text: string[]): string,
|
||||
(text: TemplateStringsArray, ...placeholders: string[]): string,
|
||||
constructor(options?: ChalkOptions): Chalk,
|
||||
enabled: boolean,
|
||||
level: Level,
|
||||
rgb(r: number, g: number, b: number): Chalk,
|
||||
hsl(h: number, s: number, l: number): Chalk,
|
||||
hsv(h: number, s: number, v: number): Chalk,
|
||||
hwb(h: number, w: number, b: number): Chalk,
|
||||
bgHex(color: string): Chalk,
|
||||
bgKeyword(color: string): Chalk,
|
||||
bgRgb(r: number, g: number, b: number): Chalk,
|
||||
bgHsl(h: number, s: number, l: number): Chalk,
|
||||
bgHsv(h: number, s: number, v: number): Chalk,
|
||||
bgHwb(h: number, w: number, b: number): Chalk,
|
||||
hex(color: string): Chalk,
|
||||
keyword(color: string): Chalk,
|
||||
|
||||
+reset: Chalk,
|
||||
+bold: Chalk,
|
||||
+dim: Chalk,
|
||||
+italic: Chalk,
|
||||
+underline: Chalk,
|
||||
+inverse: Chalk,
|
||||
+hidden: Chalk,
|
||||
+strikethrough: Chalk,
|
||||
|
||||
+visible: Chalk,
|
||||
|
||||
+black: Chalk,
|
||||
+red: Chalk,
|
||||
+green: Chalk,
|
||||
+yellow: Chalk,
|
||||
+blue: Chalk,
|
||||
+magenta: Chalk,
|
||||
+cyan: Chalk,
|
||||
+white: Chalk,
|
||||
+gray: Chalk,
|
||||
+grey: Chalk,
|
||||
+blackBright: Chalk,
|
||||
+redBright: Chalk,
|
||||
+greenBright: Chalk,
|
||||
+yellowBright: Chalk,
|
||||
+blueBright: Chalk,
|
||||
+magentaBright: Chalk,
|
||||
+cyanBright: Chalk,
|
||||
+whiteBright: Chalk,
|
||||
|
||||
+bgBlack: Chalk,
|
||||
+bgRed: Chalk,
|
||||
+bgGreen: Chalk,
|
||||
+bgYellow: Chalk,
|
||||
+bgBlue: Chalk,
|
||||
+bgMagenta: Chalk,
|
||||
+bgCyan: Chalk,
|
||||
+bgWhite: Chalk,
|
||||
+bgBlackBright: Chalk,
|
||||
+bgRedBright: Chalk,
|
||||
+bgGreenBright: Chalk,
|
||||
+bgYellowBright: Chalk,
|
||||
+bgBlueBright: Chalk,
|
||||
+bgMagentaBright: Chalk,
|
||||
+bgCyanBright: Chalk,
|
||||
+bgWhiteBrigh: Chalk,
|
||||
|
||||
supportsColor: ColorSupport
|
||||
}
|
||||
|
||||
declare module.exports: Chalk;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
// flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583
|
||||
// flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x
|
||||
// flow-typed signature: 28fdff7f110e1c75efab63ff205dda30
|
||||
// flow-typed version: c6154227d1/flow-bin_v0.x.x/flow_>=v0.104.x
|
||||
|
||||
declare module "flow-bin" {
|
||||
declare module.exports: string;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
// flow-typed signature: 47370d221401bec823c43c3598266e26
|
||||
// flow-typed version: ec28077c25/isomorphic-fetch_v2.x.x/flow_>=v0.25.x
|
||||
// flow-typed signature: 03bcd2195d27d9c7b8ea57265f6673cd
|
||||
// flow-typed version: c6154227d1/isomorphic-fetch_v2.x.x/flow_>=v0.104.x
|
||||
|
||||
|
||||
declare module 'isomorphic-fetch' {
|
||||
declare module.exports: (input: string | Request | URL, init?: RequestOptions) => Promise<Response>;
|
||||
declare module "isomorphic-fetch" {
|
||||
declare module.exports: (
|
||||
input: string | Request | URL,
|
||||
init?: RequestOptions
|
||||
) => Promise<Response>;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
// flow-typed signature: 0163683fe464be718f5e440cbb72d8b0
|
||||
// flow-typed version: 62c71f6105/object-assign_v4.x.x/flow_>=v0.25.x
|
||||
// flow-typed signature: f3107da4bbfb4bddf9eb6bd0c81bd577
|
||||
// flow-typed version: c6154227d1/object-assign_v4.x.x/flow_>=v0.104.x
|
||||
|
||||
declare module "object-assign" {
|
||||
declare module.exports: Object$Assign;
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
// flow-typed signature: 8b21843f43134917177d82a3b993b609
|
||||
// flow-typed version: c6154227d1/rimraf_v2.x.x/flow_>=v0.104.x
|
||||
|
||||
declare module 'rimraf' {
|
||||
declare type Options = {
|
||||
maxBusyTries?: number,
|
||||
emfileWait?: number,
|
||||
glob?: boolean,
|
||||
disableGlob?: boolean,
|
||||
...
|
||||
};
|
||||
|
||||
declare type Callback = (err: ?Error, path: ?string) => void;
|
||||
|
||||
declare module.exports: {
|
||||
(f: string, opts?: Options | Callback, callback?: Callback): void,
|
||||
sync(path: string, opts?: Options): void,
|
||||
...
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue