Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Update flow version to latest #413

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
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
9 changes: 1 addition & 8 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<PROJECT_ROOT>/build/.*

[untyped]
<PROJECT_ROOT>/lib/flowNonLSP/pkg/commons-node
<PROJECT_ROOT>/lib/flowNonLSP/pkg/flow-base/lib/FlowHelpers.js

[include]
Expand All @@ -13,13 +12,7 @@
flow-libs

[options]
suppress_comment=.*\\$FlowFixMe.*
suppress_comment=.*\\$FlowIssue.*
suppress_comment=\\(.\\|\n\\)*\\$FlowDisableNextLine

suppress_type=$FixMe

experimental.lsp.code_actions=true

[version]
^0.107.0
^0.146.0
55 changes: 45 additions & 10 deletions flow-libs/vscode.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -4666,12 +4666,7 @@ declare module 'vscode' {
+focused: boolean;
}

/**
* Namespace for dealing with the current window of the editor. That is visible
* and active editors, as well as, UI elements to show messages, selections, and
* asking for user input.
*/
declare export var window: {
declare export interface Window{

/**
* The currently active editor or `undefined`. The active editor is the one
Expand Down Expand Up @@ -4794,7 +4789,18 @@ declare module 'vscode' {
* @param items A set of items that will be rendered as actions in the message.
* @return A thenable that resolves to the selected item or `undefined` when being dismissed.
*/
showInformationMessage<T: MessageItem>(message: string, options?: MessageOptions, ...items: T[]): Thenable<?T>;
showInformationMessage<T = MessageItem>(message: string, options?: MessageOptions, ...items: T[]): Thenable<?T>;

/**
* Show an information message.
*
* @see [showInformationMessage](#window.showInformationMessage)
*
* @param message The message to show.
* @param items A set of items that will be rendered as actions in the message.
* @return A thenable that resolves to the selected item or `undefined` when being dismissed.
*/
showInformationMessage<T = MessageItem>(message: string, ...items: T[]): Thenable<?T>;

/**
* Show a warning message.
Expand All @@ -4818,7 +4824,18 @@ declare module 'vscode' {
* @param items A set of items that will be rendered as actions in the message.
* @return A thenable that resolves to the selected item or `undefined` when being dismissed.
*/
showWarningMessage<T: MessageItem>(message: string, options?: MessageOptions, ...items: T[]): Thenable<?T>;
showWarningMessage<T = MessageItem>(message: string, options?: MessageOptions, ...items: T[]): Thenable<?T>;

/**
* Show a warning message.
*
* @see [showInformationMessage](#window.showInformationMessage)
*
* @param message The message to show.
* @param items A set of items that will be rendered as actions in the message.
* @return A thenable that resolves to the selected item or `undefined` when being dismissed.
*/
showWarningMessage<T = MessageItem>(message: string, ...items: T[]): Thenable<?T>;

/**
* Show an error message.
Expand All @@ -4842,7 +4859,18 @@ declare module 'vscode' {
* @param items A set of items that will be rendered as actions in the message.
* @return A thenable that resolves to the selected item or `undefined` when being dismissed.
*/
showErrorMessage<T: MessageItem>(message: string, options?: MessageOptions, ...items: T[]): Thenable<?T>;
showErrorMessage<T = MessageItem>(message: string, options?: MessageOptions, ...items: T[]): Thenable<?T>;

/**
* Show an error message.
*
* @see [showInformationMessage](#window.showInformationMessage)
*
* @param message The message to show.
* @param items A set of items that will be rendered as actions in the message.
* @return A thenable that resolves to the selected item or `undefined` when being dismissed.
*/
showErrorMessage<T = MessageItem>(message: string, ...items: T[]): Thenable<?T>;

/**
* Shows a selection list.
Expand All @@ -4862,7 +4890,7 @@ declare module 'vscode' {
* @param token A token that can be used to signal cancellation.
* @return A promise that resolves to the selected item or `undefined`.
*/
showQuickPick<T: QuickPickItem>(items: T[] | Thenable<T[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<?T>;
showQuickPick<T = QuickPickItem>(items: T[] | Thenable<T[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<?T>;

/**
* Shows a selection list of [workspace folders](#workspace.workspaceFolders) to pick from.
Expand Down Expand Up @@ -4995,6 +5023,13 @@ declare module 'vscode' {
/* END PROPOSED *********************************************************************************/
}

/**
* Namespace for dealing with the current window of the editor. That is visible
* and active editors, as well as, UI elements to show messages, selections, and
* asking for user input.
*/
declare export var window: Window;

/**
* A data provider that provides tree data
*/
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/@babel/cli_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 62d70546ee0bc28c87e627de7c99b5bf
// flow-typed version: <<STUB>>/@babel/cli_v^7.5.5/flow_v0.103.0
// flow-typed signature: 64a764c4bb8affe259acebccbc31111c
// flow-typed version: <<STUB>>/@babel/cli_v^7.6.0/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/@babel/core_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 7659818783cdee1aa133f7685dd0a0e1
// flow-typed version: <<STUB>>/@babel/core_v^7.5.5/flow_v0.103.0
// flow-typed signature: 1f916ae6674a92541d14c279350cb009
// flow-typed version: <<STUB>>/@babel/core_v^7.6.0/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 0956f2158bf9b5110fa48112f584d1ee
// flow-typed version: <<STUB>>/@babel/plugin-proposal-class-properties_v^7.5.5/flow_v0.103.0
// flow-typed signature: 4ed10463afe3212275dcfc8b264b7b2e
// flow-typed version: <<STUB>>/@babel/plugin-proposal-class-properties_v^7.5.5/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/@babel/preset-env_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 3b32674d4044cb4178ea0b594a5b0b25
// flow-typed version: <<STUB>>/@babel/preset-env_v^7.5.5/flow_v0.103.0
// flow-typed signature: 381740185408981fa5291f234370a0ff
// flow-typed version: <<STUB>>/@babel/preset-env_v^7.6.0/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/@babel/preset-flow_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 7d1692b7a9550dfb9bbdcf87bacd88a3
// flow-typed version: <<STUB>>/@babel/preset-flow_v^7.0.0/flow_v0.103.0
// flow-typed signature: ee6d984f0632f5d9cd56e910582dd20d
// flow-typed version: <<STUB>>/@babel/preset-flow_v^7.0.0/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/babel-jest_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: e4b85cd0c2288ebfc5fdd90a2a2bcfc1
// flow-typed version: <<STUB>>/babel-jest_v24.8.0/flow_v0.103.0
// flow-typed signature: 225e5671844ccfe83a7ac0f26bdbbc63
// flow-typed version: <<STUB>>/babel-jest_v24.9.0/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/bin-version_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 5cfa3a8c9f7440ea8a2dd7938294390c
// flow-typed version: <<STUB>>/bin-version_v4.0.0/flow_v0.103.0
// flow-typed signature: f85933aa7917f22789d543d5eec25a2f
// flow-typed version: <<STUB>>/bin-version_v4.0.0/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/builtin-modules_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 8e8bc7834188f7cebab3b26b4cc9ddb9
// flow-typed version: <<STUB>>/builtin-modules_v3.1.0/flow_v0.103.0
// flow-typed signature: 4515b5527230c3feabf5318adae01c17
// flow-typed version: <<STUB>>/builtin-modules_v3.1.0/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/cross-spawn_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 81e899ab0265089213c30f75f76f6f19
// flow-typed version: <<STUB>>/cross-spawn_v^6.0.5/flow_v0.103.0
// flow-typed signature: 91d874a2d1064fbb3c28313934833049
// flow-typed version: <<STUB>>/cross-spawn_v^6.0.5/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/dequeue_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: a1b693033e813607fb772240c7bb0dd2
// flow-typed version: <<STUB>>/dequeue_v^1.0.5/flow_v0.103.0
// flow-typed signature: c020941cb6d3087e7b276196f04e7dd5
// flow-typed version: <<STUB>>/dequeue_v^1.0.5/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
35 changes: 4 additions & 31 deletions flow-typed/npm/elegant-spinner_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,6 @@
// flow-typed signature: 9e21284ffc14d712204443b55f4b9330
// flow-typed version: <<STUB>>/elegant-spinner_v^1.0.1/flow_v0.103.0

/**
* This is an autogenerated libdef stub for:
*
* 'elegant-spinner'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'elegant-spinner' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/


// Filename aliases
declare module 'elegant-spinner/index' {
declare module.exports: $Exports<'elegant-spinner'>;
}
declare module 'elegant-spinner/index.js' {
declare module.exports: $Exports<'elegant-spinner'>;
declare module.exports: {|
(): () => string,
+frames: Array<string>,
|};
}
4 changes: 2 additions & 2 deletions flow-typed/npm/eslint-plugin-import_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 34da2a9c22ae5244033fc89c928d92a8
// flow-typed version: <<STUB>>/eslint-plugin-import_v2.18.2/flow_v0.103.0
// flow-typed signature: 41458262d52199417fd9b6b0a961ed93
// flow-typed version: <<STUB>>/eslint-plugin-import_v2.18.2/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/eslint-plugin-playlyfe_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: c0c09d0f38da5e69962ef48c05824294
// flow-typed version: <<STUB>>/eslint-plugin-playlyfe_v7.0.1/flow_v0.104.0
// flow-typed signature: a318023726977f70163187b134fe8752
// flow-typed version: <<STUB>>/eslint-plugin-playlyfe_v7.0.1/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
11 changes: 9 additions & 2 deletions flow-typed/npm/eslint_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 42371106170f00325ab46a405f8ca775
// flow-typed version: <<STUB>>/eslint_v6.1.0/flow_v0.104.0
// flow-typed signature: c129cc42ab7e36091fb09a145a59451c
// flow-typed version: <<STUB>>/eslint_v6.3.0/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down Expand Up @@ -414,6 +414,10 @@ declare module 'eslint/lib/rules/func-style' {
declare module.exports: any;
}

declare module 'eslint/lib/rules/function-call-argument-newline' {
declare module.exports: any;
}

declare module 'eslint/lib/rules/function-paren-newline' {
declare module.exports: any;
}
Expand Down Expand Up @@ -1789,6 +1793,9 @@ declare module 'eslint/lib/rules/func-names.js' {
declare module 'eslint/lib/rules/func-style.js' {
declare module.exports: $Exports<'eslint/lib/rules/func-style'>;
}
declare module 'eslint/lib/rules/function-call-argument-newline.js' {
declare module.exports: $Exports<'eslint/lib/rules/function-call-argument-newline'>;
}
declare module 'eslint/lib/rules/function-paren-newline.js' {
declare module.exports: $Exports<'eslint/lib/rules/function-paren-newline'>;
}
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/event-kit_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 7a9e82c276ee4c4559f004a013a70d1f
// flow-typed version: <<STUB>>/event-kit_v^2.5.3/flow_v0.103.0
// flow-typed signature: 09ec0dfb2371d32ee92bd62872e38bc6
// flow-typed version: <<STUB>>/event-kit_v^2.5.3/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/flow-bin_v0.x.x.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/fs-plus_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 4cb2034a1b9975cc504473db90da4e27
// flow-typed version: <<STUB>>/fs-plus_v^3.1.1/flow_v0.103.0
// flow-typed signature: 3b5d77751bddd174c8fc97e13fe3b94d
// flow-typed version: <<STUB>>/fs-plus_v^3.1.1/flow_v0.146.0

/**
* This is an autogenerated libdef stub for:
Expand Down
6 changes: 4 additions & 2 deletions flow-typed/npm/fuzzaldrin_v2.x.x.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// flow-typed signature: 14e5e212dd7ed5c1db95d28a9d629409
// flow-typed version: 94e9f7e0a4/fuzzaldrin_v2.x.x/flow_>=v0.25.x
// flow-typed signature: e93785ee18dd58c4d2996b0b0ec61179
// flow-typed version: c6154227d1/fuzzaldrin_v2.x.x/flow_>=v0.104.x

declare module 'fuzzaldrin' {
declare module.exports: {
score(string: string, query: string): number,
filter<T: string|Object>(candidates: Array<T>, query: string, options?: {
key?: string,
maxResults?: number,
...
}): Array<T>,
...
}
}
36 changes: 30 additions & 6 deletions flow-typed/npm/jest_v24.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 27f8467378a99b6130bd20f54f31a644
// flow-typed version: 6cb9e99836/jest_v24.x.x/flow_>=v0.104.x
// flow-typed signature: 7b77dfa87943ca37c25723daf183427e
// flow-typed version: 7afca48d86/jest_v24.x.x/flow_>=v0.104.x

type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
(...args: TArguments): TReturn,
Expand Down Expand Up @@ -533,13 +533,36 @@ type JestExtendedMatchersType = {
...
};

// Diffing snapshot utility for Jest (snapshot-diff)
// https://github.com/jest-community/snapshot-diff
type SnapshotDiffType = {
/**
* Compare the difference between the actual in the `expect()`
* vs the object inside `valueB` with some extra options.
*/
toMatchDiffSnapshot(
valueB: any,
options?: {|
expand?: boolean;
colors?: boolean;
contextLines?: number;
stablePatchmarks?: boolean;
aAnnotation?: string;
bAnnotation?: string;
|},
testName?: string
): void,
...
}

interface JestExpectType {
not: JestExpectType &
EnzymeMatchersType &
DomTestingLibraryType &
JestJQueryMatchersType &
JestStyledComponentsMatchersType &
JestExtendedMatchersType;
JestExtendedMatchersType &
SnapshotDiffType;
/**
* If you have a mock function, you can use .lastCalledWith to test what
* arguments it was last called with.
Expand Down Expand Up @@ -810,7 +833,7 @@ type JestObjectType = {
* Returns the actual module instead of a mock, bypassing all checks on
* whether the module should receive a mock implementation or not.
*/
requireActual(moduleName: string): any,
requireActual<T>(m: $Flow$ModuleRef<T> | string): T,
/**
* Returns a mock module instead of the actual module, bypassing all checks
* on whether the module should be required normally or not.
Expand Down Expand Up @@ -901,7 +924,7 @@ type JestObjectType = {
type JestSpyType = { calls: JestCallsType, ... };

type JestDoneFn = {|
(): void,
(error?: Error): void,
fail: (error: Error) => void,
|};

Expand Down Expand Up @@ -1130,7 +1153,8 @@ declare var expect: {
DomTestingLibraryType &
JestJQueryMatchersType &
JestStyledComponentsMatchersType &
JestExtendedMatchersType,
JestExtendedMatchersType &
SnapshotDiffType,
/** Add additional Jasmine matchers to Jest's roster */
extend(matchers: { [name: string]: JestMatcher, ... }): void,
/** Add a module that formats application-specific data structures. */
Expand Down
Loading