Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
* @format
*/

let plugins = ['prettier-plugin-hermes-parser'];
try {
plugins = require('./.prettier-plugins.fb.js');
} catch {}

module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
Expand All @@ -20,7 +15,6 @@ module.exports = {
singleQuote: true,
trailingComma: 'all',
endOfLine: 'lf',
plugins,
overrides: [
{
files: ['*.code-workspace'],
Expand All @@ -31,7 +25,7 @@ module.exports = {
{
files: ['*.js', '*.js.flow'],
options: {
parser: 'hermes',
parser: 'flow',
},
},
{
Expand Down
48 changes: 15 additions & 33 deletions flow-typed/environment/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,7 @@ declare class child_process$ChildProcessTyped<
TStdin extends stream$Writable | null,
TStdout extends stream$Readable | null,
TStderr extends stream$Readable | null,
> extends events$EventEmitter
{
> extends events$EventEmitter {
+stdin: TStdin;
+stdout: TStdout;
+stderr: TStderr;
Expand Down Expand Up @@ -578,8 +577,7 @@ declare module 'child_process' {
declare function execFile(
file: string,
argsOrCallback?:
| ReadonlyArray<string>
| child_process$execFileCallback<string>,
ReadonlyArray<string> | child_process$execFileCallback<string>,
callback?: child_process$execFileCallback<string>,
): child_process$ChildProcessTyped<
stream$Writable,
Expand Down Expand Up @@ -928,14 +926,7 @@ type crypto$key =

declare class crypto$KeyObject {
+asymmetricKeyType?:
| 'rsa'
| 'rsa-pss'
| 'dsa'
| 'ec'
| 'ed25519'
| 'ed448'
| 'x25519'
| 'x448';
'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
+asymmetricKeySize?: number;
+symmetricKeySize?: number;
+type: 'secret' | 'public' | 'private';
Expand Down Expand Up @@ -2560,9 +2551,9 @@ declare class http$Agent<+SocketT = net$Socket> {
sockets: {[name: string]: ReadonlyArray<SocketT>, ...};
}

declare class http$IncomingMessage<SocketT = net$Socket>
extends stream$Readable
{
declare class http$IncomingMessage<
SocketT = net$Socket,
> extends stream$Readable {
headers: Object;
rawHeaders: Array<string>;
httpVersion: string;
Expand All @@ -2578,9 +2569,9 @@ declare class http$IncomingMessage<SocketT = net$Socket>
rawTrailers: Array<string>;
}

declare class http$ClientRequest<+SocketT = net$Socket>
extends stream$Writable
{
declare class http$ClientRequest<
+SocketT = net$Socket,
> extends stream$Writable {
abort(): void;
aborted: boolean;
+connection: SocketT | null;
Expand Down Expand Up @@ -2878,10 +2869,7 @@ declare class net$Socket extends stream$Duplex {
destroyed: boolean;
end(
chunkOrEncodingOrCallback?:
| Buffer
| Uint8Array
| string
| ((data: any) => void),
Buffer | Uint8Array | string | ((data: any) => void),
encodingOrCallback?: string | ((data: any) => void),
callback?: (data: any) => void,
): this;
Expand Down Expand Up @@ -3211,9 +3199,9 @@ declare module 'perf_hooks' {
+detail?: T;
}

declare export class PerformanceMeasure<T = unknown>
extends PerformanceEntry
{
declare export class PerformanceMeasure<
T = unknown,
> extends PerformanceEntry {
+entryType: 'measure';
+detail?: T;
}
Expand Down Expand Up @@ -3398,11 +3386,7 @@ declare module 'querystring' {
*/
declare module 'node:sqlite' {
declare export type SupportedValueType =
| null
| number
| bigint
| string
| Uint8Array;
null | number | bigint | string | Uint8Array;

declare export type DatabaseSyncOptions = Readonly<{
open?: boolean,
Expand Down Expand Up @@ -5565,9 +5549,7 @@ declare module 'repl' {
writer?: (object: any, options?: util$InspectOptions) => string,
completer?: readline$InterfaceCompleter,
replMode?:
| $SymbolReplModeMagic
| $SymbolReplModeSloppy
| $SymbolReplModeStrict,
$SymbolReplModeMagic | $SymbolReplModeSloppy | $SymbolReplModeStrict,
breakEvalOnSigint?: boolean,
...
}): REPLServer;
Expand Down
18 changes: 3 additions & 15 deletions flow-typed/npm/babel-traverse_v7.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,7 @@ declare module '@babel/traverse' {
}

declare export type BindingKind =
| 'var'
| 'let'
| 'const'
| 'module'
| 'hoisted'
| 'unknown';
'var' | 'let' | 'const' | 'module' | 'hoisted' | 'unknown';

declare export class Binding {
constructor(opts: {
Expand Down Expand Up @@ -435,13 +430,7 @@ declare module '@babel/traverse' {
isBaseType(baseName: string, soft?: boolean): boolean;
couldBeBaseType(
name:
| 'string'
| 'number'
| 'boolean'
| 'any'
| 'mixed'
| 'empty'
| 'void',
'string' | 'number' | 'boolean' | 'any' | 'mixed' | 'empty' | 'void',
): boolean;
baseTypeStrictlyMatches(right: NodePath<>): ?boolean;
isGenericType(genericName: string): boolean;
Expand Down Expand Up @@ -1446,8 +1435,7 @@ declare module '@babel/traverse' {
}>;

declare export type VisitNode<-TNode extends BabelNode, TState> =
| VisitNodeFunction<TNode, TState>
| VisitNodeObject<TNode, TState>;
VisitNodeFunction<TNode, TState> | VisitNodeObject<TNode, TState>;

declare export type Visitor<TState = void> = Readonly<{
enter?: VisitNodeFunction<BabelNode, TState>,
Expand Down
3 changes: 1 addition & 2 deletions flow-typed/npm/babel_v7.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -1293,8 +1293,7 @@ declare module '@babel/template' {
};

declare export type PublicReplacements =
| {[string]: ?BabelNode}
| Array<?BabelNode>;
{[string]: ?BabelNode} | Array<?BabelNode>;

declare export type TemplateBuilder<T> = {
// Build a new builder, merging the given options with the previous ones.
Expand Down
8 changes: 2 additions & 6 deletions flow-typed/npm/commander_v12.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

declare module 'commander' {
declare type LiteralUnion<LiteralType, BaseType: string | number> =
| LiteralType
| {...BaseType, ...{[key: empty]: empty, ...}};
LiteralType | {...BaseType, ...{[key: empty]: empty, ...}};

declare export class CommanderError mixins Error {
code: string;
Expand Down Expand Up @@ -335,10 +334,7 @@ declare module 'commander' {
outputError?: (str: string, write: (str: string) => void) => void;
}
export type AddHelpTextPosition =
| 'beforeAll'
| 'before'
| 'after'
| 'afterAll';
'beforeAll' | 'before' | 'after' | 'afterAll';
export type HookEvent = 'preSubcommand' | 'preAction' | 'postAction';
export type OptionValueSource = LiteralUnion<
'default' | 'config' | 'env' | 'cli' | 'implied',
Expand Down
11 changes: 2 additions & 9 deletions flow-typed/npm/electron-packager_v20.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,14 @@ declare module '@electron/packager' {
ProductName?: string,
InternalName?: string,
'requested-execution-level'?:
| 'asInvoker'
| 'highestAvailable'
| 'requireAdministrator',
'asInvoker' | 'highestAvailable' | 'requireAdministrator',
'application-manifest'?: string,
}>;

declare export type WindowsSignOptions = $FlowFixMe;

declare export type OfficialArch =
| 'ia32'
| 'x64'
| 'armv7l'
| 'arm64'
| 'mips64el'
| 'universal';
'ia32' | 'x64' | 'armv7l' | 'arm64' | 'mips64el' | 'universal';

declare export type OfficialPlatform = 'linux' | 'win32' | 'darwin' | 'mas';

Expand Down
10 changes: 2 additions & 8 deletions flow-typed/npm/execa_v5.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@

declare module 'execa' {
declare type StdIoOption =
| 'pipe'
| 'ipc'
| 'ignore'
| 'inherit'
| stream$Stream
| number;
'pipe' | 'ipc' | 'ignore' | 'inherit' | stream$Stream | number;

declare type CommonOptions = {
argv0?: string,
Expand Down Expand Up @@ -74,8 +69,7 @@ declare module 'execa' {
};

declare interface ExecaPromise
extends Promise<Result>,
child_process$ChildProcess {}
extends Promise<Result>, child_process$ChildProcess {}

declare interface ExecaError extends ErrnoError {
stdout: string;
Expand Down
5 changes: 1 addition & 4 deletions flow-typed/npm/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,7 @@ type FakeTimersConfig = {
*/

type JestStyledComponentsMatcherValue =
| string
| JestAsymmetricEqualityType
| RegExp
| void;
string | JestAsymmetricEqualityType | RegExp | void;

type JestStyledComponentsMatcherOptions = {
media?: string,
Expand Down
8 changes: 1 addition & 7 deletions flow-typed/npm/jsonc-parser_v2.2.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,7 @@ declare module 'jsonc-parser' {
| 'InvalidCharacter'
| '<unknown ParseErrorCode>';
export type NodeType =
| 'object'
| 'array'
| 'property'
| 'string'
| 'number'
| 'boolean'
| 'null';
'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null';
export type Node = {
type: NodeType,
value?: any,
Expand Down
14 changes: 2 additions & 12 deletions flow-typed/npm/node-fetch_v2.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,7 @@ declare module 'node-fetch' {
}

declare type ResponseType =
| 'basic'
| 'cors'
| 'default'
| 'error'
| 'opaque'
| 'opaqueredirect';
'basic' | 'cors' | 'default' | 'error' | 'opaque' | 'opaqueredirect';

declare interface ResponseInit {
headers?: HeaderInit;
Expand All @@ -172,12 +167,7 @@ declare module 'node-fetch' {

declare type HeaderInit = Headers | Array<string>;
declare type BodyInit =
| string
| null
| Buffer
| Blob
| Readable
| URLSearchParams;
string | null | Buffer | Blob | Readable | URLSearchParams;

declare function fetch(
url: string | URL | Request,
Expand Down
4 changes: 1 addition & 3 deletions flow-typed/npm/pretty-format_v29.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ declare type PrettyFormatPlugin =

declare module 'pretty-format' {
declare export type CompareKeys =
| ((a: string, b: string) => number)
| null
| void;
((a: string, b: string) => number) | null | void;
declare export function format(
value: unknown,
options?: ?{
Expand Down
26 changes: 11 additions & 15 deletions flow-typed/npm/rxjs_v6.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
declare interface rxjs$UnaryFunction<T, R> {
(source: T): R;
}
declare interface rxjs$OperatorFunction<T, R>
extends rxjs$UnaryFunction<rxjs$Observable<T>, rxjs$Observable<R>> {}
declare interface rxjs$OperatorFunction<T, R> extends rxjs$UnaryFunction<
rxjs$Observable<T>,
rxjs$Observable<R>,
> {}
declare type rxjs$FactoryOrValue<T> = T | (() => T);
declare interface rxjs$MonoTypeOperatorFunction<T>
extends rxjs$OperatorFunction<T, T> {}
declare interface rxjs$MonoTypeOperatorFunction<
T,
> extends rxjs$OperatorFunction<T, T> {}
declare interface rxjs$Timestamp<T> {
value: T;
timestamp: number;
Expand Down Expand Up @@ -47,9 +50,7 @@ declare interface rxjs$Subscribable<T> {
): rxjs$Unsubscribable;
}
declare type rxjs$ObservableInput<T> =
| rxjs$SubscribableOrPromise<T>
| Array<T>
| Iterable<T>;
rxjs$SubscribableOrPromise<T> | Array<T> | Iterable<T>;

declare type rxjs$InteropObservable<T> = {
[string | unknown]: () => rxjs$Subscribable<T>,
Expand Down Expand Up @@ -588,8 +589,7 @@ declare module 'rxjs' {
(<T>(...sources: rxjs$ObservableInput<T>[]) => rxjs$Observable<T[]>),
from<T>(
input:
| rxjs$ObservableInput<T>
| rxjs$ObservableInput<rxjs$ObservableInput<T>>,
rxjs$ObservableInput<T> | rxjs$ObservableInput<rxjs$ObservableInput<T>>,
scheduler?: rxjs$SchedulerLike,
): rxjs$Observable<T>,
ArgumentOutOfRangeError: ArgumentOutOfRangeError,
Expand Down Expand Up @@ -630,9 +630,7 @@ declare module 'rxjs' {
) => rxjs$Observable<T>) &
(<T, R>(
...observables: (
| rxjs$ObservableInput<any>
| rxjs$SchedulerLike
| number
rxjs$ObservableInput<any> | rxjs$SchedulerLike | number
)[]
) => rxjs$Observable<R>) &
(<T>(
Expand Down Expand Up @@ -3349,9 +3347,7 @@ declare module 'rxjs/webSocket' {
_output: rxjs$Subject<T>;
constructor(
urlConfigOrSource:
| string
| WebSocketSubjectConfig<T>
| rxjs$Observable<T>,
string | WebSocketSubjectConfig<T> | rxjs$Observable<T>,
destination?: rxjs$Observer<T>,
): void;
lift<R>(operator: rxjs$Operator<T, R>): WebSocketSubject<R>;
Expand Down
Loading
Loading