Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 22 additions & 22 deletions flow-typed/environment/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ declare module 'buffer' {
declare var kMaxLength: number;
declare var INSPECT_MAX_BYTES: number;

declare var constants: $ReadOnly<{
declare var constants: Readonly<{
MAX_LENGTH: number,
MAX_STRING_LENGTH: number,
}>;
Expand Down Expand Up @@ -1467,7 +1467,7 @@ declare module 'fs' {
path: string,
options:
| string
| $ReadOnly<{
| Readonly<{
encoding?: string,
recursive?: boolean,
withFileTypes?: false,
Expand All @@ -1477,7 +1477,7 @@ declare module 'fs' {
): void;
declare function readdir(
path: string,
options: $ReadOnly<{
options: Readonly<{
encoding?: string,
recursive?: boolean,
withFileTypes: true,
Expand All @@ -1493,7 +1493,7 @@ declare module 'fs' {
path: string,
options?:
| string
| $ReadOnly<{
| Readonly<{
encoding?: string,
recursive?: boolean,
withFileTypes?: false,
Expand All @@ -1503,7 +1503,7 @@ declare module 'fs' {
path: string,
options?:
| string
| $ReadOnly<{
| Readonly<{
encoding?: string,
recursive?: boolean,
withFileTypes: true,
Expand All @@ -1527,13 +1527,13 @@ declare module 'fs' {
): void;
declare function openAsBlob(
path: string | Buffer | URL,
options?: $ReadOnly<{
options?: Readonly<{
type?: string, // Optional MIME type hint
}>,
): Promise<Blob>;
declare function opendir(
path: string,
options?: $ReadOnly<{
options?: Readonly<{
encoding?: string,
bufferSize?: number,
recursive?: boolean,
Expand All @@ -1542,7 +1542,7 @@ declare module 'fs' {
): void;
declare function opendirSync(
path: string,
options?: $ReadOnly<{
options?: Readonly<{
encoding?: string,
bufferSize?: number,
recursive?: boolean,
Expand Down Expand Up @@ -1770,7 +1770,7 @@ declare module 'fs' {
): void;
declare function watchFile(
filename: string,
options?: $ReadOnly<{
options?: Readonly<{
bigint?: boolean,
persistent?: boolean,
interval?: number,
Expand All @@ -1787,7 +1787,7 @@ declare module 'fs' {
): FSWatcher;
declare function watch(
filename: string,
options?: $ReadOnly<{
options?: Readonly<{
persistent?: boolean,
recursive?: boolean,
encoding?: string,
Expand Down Expand Up @@ -1835,7 +1835,7 @@ declare module 'fs' {
declare function cp(
src: string | URL,
dest: string | URL,
options: $ReadOnly<{
options: Readonly<{
dereference?: boolean,
errorOnExist?: boolean,
filter?: (src: string, dest: string) => boolean | Promise<boolean>,
Expand All @@ -1855,7 +1855,7 @@ declare module 'fs' {
declare function cpSync(
src: string | URL,
dest: string | URL,
options?: $ReadOnly<{
options?: Readonly<{
dereference?: boolean,
errorOnExist?: boolean,
filter?: (src: string, dest: string) => boolean,
Expand Down Expand Up @@ -2022,7 +2022,7 @@ declare module 'fs' {
chown(uid: number, guid: number): Promise<void>;
close(): Promise<void>;
createReadStream(
options?: $ReadOnly<{
options?: Readonly<{
encoding?: string,
autoClose?: boolean,
emitClose?: boolean,
Expand All @@ -2033,7 +2033,7 @@ declare module 'fs' {
}>,
): ReadStream;
createWriteStream(
options?: $ReadOnly<{
options?: Readonly<{
encoding?: string,
autoClose?: boolean,
emitClose?: boolean,
Expand All @@ -2055,12 +2055,12 @@ declare module 'fs' {
...
}>;
readableWebStream(
options?: $ReadOnly<{autoClose?: boolean}>,
options?: Readonly<{autoClose?: boolean}>,
): ReadableStream;
readFile(options: EncodingFlag): Promise<Buffer>;
readFile(options: string): Promise<string>;
readLines(
options?: $ReadOnly<{
options?: Readonly<{
encoding?: string,
autoClose?: boolean,
emitClose?: boolean,
Expand Down Expand Up @@ -2088,7 +2088,7 @@ declare module 'fs' {
): Promise<void>;
write(
buffer: Buffer | Uint8Array | DataView,
options?: $ReadOnly<{
options?: Readonly<{
offset?: number,
length?: number,
position?: number,
Expand Down Expand Up @@ -2119,7 +2119,7 @@ declare module 'fs' {
cp(
src: string | URL,
dest: string | URL,
options?: $ReadOnly<{
options?: Readonly<{
dereference?: boolean,
errorOnExist?: boolean,
filter?: (src: string, dest: string) => boolean | Promise<boolean>,
Expand Down Expand Up @@ -2171,7 +2171,7 @@ declare module 'fs' {
): Promise<FileHandle>,
opendir(
path: string,
options?: $ReadOnly<{
options?: Readonly<{
encoding?: string,
bufferSize?: number,
recursive?: boolean,
Expand All @@ -2192,15 +2192,15 @@ declare module 'fs' {
path: FSPromisePath,
options:
| string
| $ReadOnly<{
| Readonly<{
encoding?: string,
recursive?: boolean,
withFileTypes?: false,
}>,
) => Promise<Array<string>>) &
((
path: FSPromisePath,
options: $ReadOnly<{
options: Readonly<{
encoding?: string,
recursive?: boolean,
withFileTypes: true,
Expand Down Expand Up @@ -2249,7 +2249,7 @@ declare module 'fs' {
): Promise<void>,
watch(
filename: FSPromisePath,
options?: $ReadOnly<{
options?: Readonly<{
persistent?: boolean,
recursive?: boolean,
encoding?: string,
Expand Down
8 changes: 4 additions & 4 deletions flow-typed/npm/@octokit/rest_v22.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ declare module '@octokit/rest' {
declare class Octokit {
constructor(options?: {auth?: string, ...}): this;

repos: $ReadOnly<{
repos: Readonly<{
listReleaseAssets: (
params: $ReadOnly<{
params: Readonly<{
owner: string,
repo: string,
release_id: string,
Expand All @@ -29,13 +29,13 @@ declare module '@octokit/rest' {
...
}>,
uploadReleaseAsset: (
params: $ReadOnly<{
params: Readonly<{
owner: string,
repo: string,
release_id: string,
name: string,
data: Buffer,
headers: $ReadOnly<{
headers: Readonly<{
'content-type': string,
...
}>,
Expand Down
14 changes: 7 additions & 7 deletions flow-typed/npm/babel-traverse_v7.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ declare module '@babel/traverse' {
/** Traverse node with current scope and path. */
traverse<S>(
node: BabelNode | Array<BabelNode>,
opts: $ReadOnly<TraverseOptions<S>>,
opts: Readonly<TraverseOptions<S>>,
state: S,
): void;

Expand Down Expand Up @@ -303,7 +303,7 @@ declare module '@babel/traverse' {
shouldStop: boolean;
removed: boolean;
state: unknown;
+opts: $ReadOnly<TraverseOptions<unknown>> | null;
+opts: Readonly<TraverseOptions<unknown>> | null;
skipKeys: null | {[key: string]: boolean};
parentPath: ?NodePath<>;
context: TraversalContext;
Expand Down Expand Up @@ -346,7 +346,7 @@ declare module '@babel/traverse' {
): TError;

traverse<TState>(
visitor: $ReadOnly<TraverseOptions<TState>>,
visitor: Readonly<TraverseOptions<TState>>,
state: TState,
): void;

Expand Down Expand Up @@ -1444,7 +1444,7 @@ declare module '@babel/traverse' {
| VisitNodeFunction<TNode, TState>
| VisitNodeObject<TNode, TState>;

declare export type Visitor<TState = void> = $ReadOnly<{
declare export type Visitor<TState = void> = Readonly<{
enter?: VisitNodeFunction<BabelNode, TState>,
exit?: VisitNodeFunction<BabelNode, TState>,

Expand Down Expand Up @@ -1872,7 +1872,7 @@ declare module '@babel/traverse' {
explode<TState>(visitor: Visitor<TState>): Visitor<TState>,
verify<TState>(visitor: Visitor<TState>): void,
merge(
visitors: Array<$ReadOnly<Visitor<any>>>,
visitors: Array<Readonly<Visitor<any>>>,
states: Array<any>,
wrapper?: ?Function,
): Array<Visitor<any>>,
Expand All @@ -1891,7 +1891,7 @@ declare module '@babel/traverse' {
declare export type Traverse = {
<TState>(
parent?: BabelNode | Array<BabelNode>,
opts?: $ReadOnly<TraverseOptions<TState>>,
opts?: Readonly<TraverseOptions<TState>>,
scope?: ?Scope,
state: TState,
parentPath?: ?NodePath<BabelNode>,
Expand All @@ -1909,7 +1909,7 @@ declare module '@babel/traverse' {

node<TState>(
node: BabelNode,
opts: $ReadOnly<TraverseOptions<TState>>,
opts: Readonly<TraverseOptions<TState>>,
scope: Scope,
state: TState,
parentPath: NodePath<>,
Expand Down
12 changes: 6 additions & 6 deletions flow-typed/npm/babel_v7.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

'use strict';

type _BabelSourceMap = $ReadOnly<{
type _BabelSourceMap = Readonly<{
file?: string,
mappings: string,
names: Array<string>,
Expand All @@ -28,9 +28,9 @@ type _BabelSourceMapSegment = {
...
};

export type BabelSourceLocation = $ReadOnly<{
start: $ReadOnly<{line: number, column: number}>,
end: $ReadOnly<{line: number, column: number}>,
export type BabelSourceLocation = Readonly<{
start: Readonly<{line: number, column: number}>,
end: Readonly<{line: number, column: number}>,
}>;

declare module '@babel/parser' {
Expand Down Expand Up @@ -330,7 +330,7 @@ declare module '@babel/core' {

constructor(
options: BabelCoreOptions,
input: $ReadOnly<{ast: BabelNode, code: string, inputMap: any}>,
input: Readonly<{ast: BabelNode, code: string, inputMap: any}>,
): File;

getMetadata(): void;
Expand Down Expand Up @@ -1079,7 +1079,7 @@ declare module '@babel/core' {
declare type ValidatedOptions = BabelCoreOptions;

declare class PartialConfig {
+options: $ReadOnly<ValidatedOptions>;
+options: Readonly<ValidatedOptions>;
+babelrc: string | void;
+babelignore: string | void;
+config: string | void;
Expand Down
2 changes: 1 addition & 1 deletion flow-typed/npm/electron-packager_v18.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ declare module '@electron/packager' {

declare export type OsxUniversalOptions = $FlowFixMe;

declare export type Win32MetadataOptions = $ReadOnly<{
declare export type Win32MetadataOptions = Readonly<{
CompanyName?: string,
FileDescription?: string,
OriginalFilename?: string,
Expand Down
14 changes: 7 additions & 7 deletions flow-typed/npm/execa_v5.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,25 @@ declare module 'execa' {
(
file: string,
args?: $ReadOnlyArray<string>,
options?: $ReadOnly<Options>,
options?: Readonly<Options>,
): ExecaPromise;
(file: string, options?: $ReadOnly<Options>): ExecaPromise;
(file: string, options?: Readonly<Options>): ExecaPromise;

command(command: string, options?: $ReadOnly<Options>): ExecaPromise;
commandSync(command: string, options?: $ReadOnly<Options>): ExecaPromise;
command(command: string, options?: Readonly<Options>): ExecaPromise;
commandSync(command: string, options?: Readonly<Options>): ExecaPromise;

node(
path: string,
args?: $ReadOnlyArray<string>,
options?: $ReadOnly<Options>,
options?: Readonly<Options>,
): void;

sync(
file: string,
args?: $ReadOnlyArray<string>,
options?: $ReadOnly<SyncOptions>,
options?: Readonly<SyncOptions>,
): SyncResult;
sync(file: string, options?: $ReadOnly<SyncOptions>): SyncResult;
sync(file: string, options?: Readonly<SyncOptions>): SyncResult;
}

declare module.exports: Execa;
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/jsonc-parser_v2.2.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ declare module 'jsonc-parser' {
/**
* The scanner object, representing a JSON scanner at a position in the input string.
*/
export type JSONScanner = $ReadOnly<{
export type JSONScanner = Readonly<{
/**
* Sets the scan position to a new offset. A call to 'scan' is needed to get the first token.
*/
Expand Down Expand Up @@ -351,7 +351,7 @@ declare module 'jsonc-parser' {
/**
* Options used by {@linkcode format} when computing the formatting edit operations
*/
export type FormattingOptions = $ReadOnly<{
export type FormattingOptions = Readonly<{
/**
* If indentation is based on spaces (`insertSpaces` = true), the number of spaces that make an indent.
*/
Expand Down
2 changes: 1 addition & 1 deletion flow-typed/npm/open_v7.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
declare module 'open' {
import type {ChildProcess} from 'child_process';

declare export type Options = $ReadOnly<{
declare export type Options = Readonly<{
wait?: boolean,
background?: boolean,
newInstance?: boolean,
Expand Down
Loading
Loading