diff --git a/.agents/rules/landing-the-plane.md b/.agents/rules/landing-the-plane.md index 7170b11a7c..13b786f307 100644 --- a/.agents/rules/landing-the-plane.md +++ b/.agents/rules/landing-the-plane.md @@ -301,8 +301,8 @@ This rule should be used in conjunction with: - **Test command**: `mise run test` or `./node_modules/.bin/jest` - **Lint command**: `mise run lint` or ESLint directly -- **Flow check**: `mise run flow` or `./node_modules/.bin/flow` -- **Prettier**: `mise run pretty` or `./node_modules/.bin/pretty-quick` +- **Type check**: `mise run typecheck` or `./node_modules/.bin/tsc --noEmit` +- **Prettier**: `mise run prettier` - **Build validation**: `mise run build` (if changes affect build process) - **Issue prefix**: Use `gobbldygook-` for all issue IDs in this project - **Branch naming**: Follow existing patterns (e.g., `feature/`, `fix/`, `chore/`) diff --git a/.flowconfig b/.flowconfig deleted file mode 100644 index 0cc3c1f76d..0000000000 --- a/.flowconfig +++ /dev/null @@ -1,38 +0,0 @@ -[ignore] -; stuffs -.*/node_modules/html-entities/.* -.*/node_modules/jest-validate -.*/node_modules/@codemirror/lang-javascript/.* -.*/node_modules/@codemirror/theme-one-dark/.* -.*/node_modules/hermes-eslint/.* -.*/node_modules/hermes-estree/.* -.*/node_modules/hermes-parser/.* -.*/node_modules/react-window/.* - -[libs] -./config/decls - -[lints] -# all=off by default -; all=warn -; untyped-type-import=error -; sketchy-null-bool=off -; sketchy-number=error - -[options] -emoji=true -; include_warnings=true - -; allow requiring non-js files (like webpack does) -module.name_mapper.extension='css' -> '/config/flow/css' -module.name_mapper.extension='scss' -> '/config/flow/css' -module.name_mapper.extension='jpg' -> '/config/flow/file' -module.name_mapper.extension='png' -> '/config/flow/file' -module.name_mapper.extension='svg' -> '/config/flow/file' -module.name_mapper.extension='woff' -> '/config/flow/file' -module.name_mapper.extension='woff2' -> '/config/flow/file' - -suppress_type=$FlowIssue - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7074d1b8d3..e193d09ced 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,8 @@ on: workflow_dispatch: jobs: - flow: - name: Flow Type Checking + typecheck: + name: TypeScript Type Checking runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 @@ -21,8 +21,8 @@ jobs: - name: Install dependencies run: npm ci - - name: Run Flow - run: mise run flow check --quiet + - name: Run TypeScript + run: mise run typecheck test: name: Jest Tests @@ -77,7 +77,7 @@ jobs: - name: Check formatting run: | - mise run pretty + mise run prettier git diff --exit-code build: @@ -99,3 +99,48 @@ jobs: with: name: web-build path: ./modules/gob-web/build + + e2e: + name: End-to-End Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + - uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2 + + - name: Install dependencies + run: npm ci + + - name: Install Playwright Browsers + run: npx playwright install --with-deps chromium + + - name: Run Playwright tests + run: mise run test:e2e + + - name: Upload Playwright Report + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 + + check-peg-parser: + name: Check PEG Parser is Up-to-Date + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + - uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2 + + - name: Install dependencies + run: npm ci + + - name: Build PEG parser + run: mise run build-peg + + - name: Check for changes + run: | + if ! git diff --exit-code modules/gob-hanson-format/parse-hanson-string.js; then + echo "Error: parse-hanson-string.js is not up-to-date!" + echo "Please run 'mise run build-peg' and commit the changes." + exit 1 + fi diff --git a/.gitignore b/.gitignore index 0e3bfc1e0e..194f38ffcd 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,7 @@ node_modules/ build*/ coverage/ flow-coverage*/ + +# Playwright test artifacts +test-results/ +playwright-report/ diff --git a/AGENTS.md b/AGENTS.md index c2a32801d8..0dcac06ad7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,7 +34,7 @@ Repository tasks (build, test, lint, etc.) are defined in `mise.toml`. Use `mise - `mise run lint` - Run ESLint - `mise run flow` - Run Flow type checker - `mise run test` - Run Jest tests -- `mise run pretty` - Format code with Prettier +- `mise run prettier` - Format code with Prettier - `mise run build` - Build the web application Run `mise tasks` to see all available tasks. diff --git a/babel.config.js b/babel.config.js index 0ed6486c45..0ca8ba7918 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,7 +1,7 @@ module.exports = { presets: [ "@babel/preset-react", - "@babel/preset-flow", + "@babel/preset-typescript", [ "@babel/preset-env", { diff --git a/e2e/gobbldygook.spec.ts b/e2e/gobbldygook.spec.ts new file mode 100644 index 0000000000..9e2ff80c7a --- /dev/null +++ b/e2e/gobbldygook.spec.ts @@ -0,0 +1,6 @@ +import { test, expect } from '@playwright/test'; + +test('homepage loads with Gobbldygook text', async ({ page }) => { + await page.goto('http://localhost:3000/'); + await expect(page.locator('body')).toContainText('Gobbldygook', { ignoreCase: true }); +}); diff --git a/eslint.config.js b/eslint.config.js index f3f3bb1089..c3ca34b364 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,7 +1,8 @@ // @ts-check const babelParser = require("@babel/eslint-parser") +const tseslint = require("@typescript-eslint/eslint-plugin") +const tsParser = require("@typescript-eslint/parser") const react = require("eslint-plugin-react") -const ftFlow = require("eslint-plugin-ft-flow") const importPlugin = require("eslint-plugin-import") const prettierConfig = require("eslint-config-prettier") const js = require("@eslint/js") @@ -18,11 +19,11 @@ module.exports = [ "**/.cache/**", "**/*.min.js", "**/parse-hanson-string.js", // Generated parser file - "**/flow-typed/**", + "**/parse-hanson-string.ts", // Generated parser file ], }, - // Base configuration for all JS files + // Base configuration for legacy JS files (if any remain) { files: ["**/*.js", "**/*.jsx"], languageOptions: { @@ -30,11 +31,7 @@ module.exports = [ parserOptions: { requireConfigFile: false, babelOptions: { - presets: [ - "@babel/preset-react", - "@babel/preset-flow", - "@babel/preset-env", - ], + presets: ["@babel/preset-react", "@babel/preset-env"], }, }, ecmaVersion: 2021, @@ -53,35 +50,67 @@ module.exports = [ }, plugins: { react, - "ft-flow": ftFlow, import: importPlugin, }, settings: { react: { version: "16.5", - flowVersion: "0.81", }, }, }, - // ESLint recommended rules - js.configs.recommended, + // TypeScript configuration + { + files: ["**/*.ts", "**/*.tsx"], + languageOptions: { + parser: tsParser, + parserOptions: { + ecmaVersion: 2021, + sourceType: "module", + }, + globals: { + ...globals.browser, + ...globals.node, - // React recommended rules (flat config) - react.configs.flat.recommended, + // Webpack DefinePlugin + VERSION: "readonly", + APP_BASE: "readonly", - // Flow type rules (manual config since no flat config available) - { - files: ["**/*.js", "**/*.jsx"], + // Test globals + TESTING: "readonly", + }, + }, + plugins: { + "@typescript-eslint": tseslint, + react, + import: importPlugin, + }, + settings: { + react: { + version: "16.5", + }, + }, rules: { - ...ftFlow.configs.recommended.rules, - "ft-flow/no-types-missing-file-annotation": "off", + ...tseslint.configs.recommended.rules, + // Allow any types for now during migration + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-require-imports": "off", + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/prefer-as-const": "off", + "@typescript-eslint/no-unused-expressions": "off", }, }, - // Custom project rules + // ESLint recommended rules + js.configs.recommended, + + // React recommended rules (flat config) + react.configs.flat.recommended, + + // Custom project rules for all files { - files: ["**/*.js", "**/*.jsx"], + files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"], rules: { // Best practices "array-callback-return": "warn", @@ -113,16 +142,7 @@ module.exports = [ "no-underscore-dangle": "off", "no-unmodified-loop-condition": "error", "no-unused-labels": "error", - "no-unused-vars": [ - "warn", - { - args: "after-used", - varsIgnorePattern: "^_", - argsIgnorePattern: "^_", - caughtErrorsIgnorePattern: "^_", - ignoreRestSiblings: true, - }, - ], + "no-unused-vars": "off", // Disabled in favor of TypeScript's unused variable checking "no-useless-constructor": "error", "no-var": "error", "prefer-spread": "warn", @@ -139,12 +159,29 @@ module.exports = [ }, }, + // TypeScript-specific rules + { + files: ["**/*.ts", "**/*.tsx"], + rules: { + "@typescript-eslint/no-unused-vars": [ + "warn", + { + args: "after-used", + varsIgnorePattern: "^_", + argsIgnorePattern: "^_", + caughtErrorsIgnorePattern: "^_", + ignoreRestSiblings: true, + }, + ], + }, + }, + // CLI-specific configuration { files: [ - "modules/gob-cli/**/*.js", - "modules/gob-hanson-format-cli/**/*.js", - "modules/gob-search-queries-cli/**/*.js", + "modules/gob-cli/**/*.{js,ts}", + "modules/gob-hanson-format-cli/**/*.{js,ts}", + "modules/gob-search-queries-cli/**/*.{js,ts}", ], rules: { "no-process-exit": "off", @@ -154,7 +191,12 @@ module.exports = [ // Web Worker-specific configuration { - files: ["**/*.worker.js", "**/workers/**/*.js"], + files: ["**/*.worker.{js,ts}", "**/workers/**/*.{js,ts}"], + languageOptions: { + globals: { + DedicatedWorkerGlobalScope: "readonly", + }, + }, rules: { "consistent-this": "off", }, @@ -162,7 +204,11 @@ module.exports = [ // Test-specific configuration { - files: ["**/__tests__/**/*.js", "**/*.test.js", "**/*.spec.js"], + files: [ + "**/__tests__/**/*.{js,ts,tsx}", + "**/*.test.{js,ts,tsx}", + "**/*.spec.{js,ts,tsx}", + ], languageOptions: { globals: { ...globals.jest, diff --git a/flow-typed/npm/@babel/polyfill_v7.x.x.js b/flow-typed/npm/@babel/polyfill_v7.x.x.js deleted file mode 100644 index 4bde222b29..0000000000 --- a/flow-typed/npm/@babel/polyfill_v7.x.x.js +++ /dev/null @@ -1,4 +0,0 @@ -// flow-typed signature: ebc6e7724cd1da0d1a8b10de36bd7a94 -// flow-typed version: 7b122e75af/@babel/polyfill_v7.x.x/flow_>=v0.30.x - -declare module '@babel/polyfill' {} diff --git a/flow-typed/npm/@babel/runtime_vx.x.x.js b/flow-typed/npm/@babel/runtime_vx.x.x.js deleted file mode 100644 index b3836e0232..0000000000 --- a/flow-typed/npm/@babel/runtime_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: d8755af359ae4bb91bfd2d4d02f488d7 -// flow-typed version: <>/@babel/runtime_v^7.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * '@babel/runtime' - * - * 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 '@babel/runtime' { - declare module.exports: any; -} diff --git a/flow-typed/npm/@reach/router_v1.1.x.js b/flow-typed/npm/@reach/router_v1.1.x.js deleted file mode 100644 index c61eb83dc1..0000000000 --- a/flow-typed/npm/@reach/router_v1.1.x.js +++ /dev/null @@ -1,117 +0,0 @@ -// flow-typed signature: 6648e735c32d007093bd62caedb09be8 -// flow-typed version: 433baa7877/@reach/router_v1.1.x/flow_>=v0.63.x - -// @flow - -declare module '@reach/router' { - declare type NavigateFn = (to: string, options?: NavigateOptions<{}>) => void; - declare export var navigate: NavigateFn; - - declare export type HistoryListener = () => void; - declare export type HistoryUnlistener = () => void; - - declare export interface History { - location: string; - transitioning: boolean; - listen: (listener: HistoryListener) => HistoryUnlistener; - navigate: NavigateFn; - } - - declare export interface HistorySource { - location: typeof location; - addEventListener(name: string, listener: (event: Event) => void): void; - removeEventListener(name: string, listener: (event: Event) => void): void; - - history: { - state: any, - pushState(state: any, title: string, uri: string): void, - replaceState(state: any, title: string, uri: string): void, - }; - } - - declare export interface NavigateOptions { - state?: State; - replace?: boolean; - } - - declare type CommonRouteProps = {| - children?: React$Node, - location?: typeof location, - navigate?: NavigateFn, - uri?: string, - |}; - - declare export type DefaultRouteProps = { - ...CommonRouteProps, - default: boolean, - }; - - declare export type RouteProps = { - ...CommonRouteProps, - path: string, - }; - - declare export type LocationProviderRenderFn = (context: {| - location: typeof location, - navigate: NavigateFn, - |}) => React$Node; - - declare export class Router extends React$Component<{| - children?: React$Node, - basepath?: string, - primary?: boolean, - location?: typeof location, - |}> {} - - declare export class Link extends React$Component<{ - ...$Shape, - children: React$Node, - getProps?: (props: { - isCurrent: boolean, - isPartiallyCurrent: boolean, - href: string, - location: typeof location, - }) => {}, - state?: State, - to?: string, - replace?: boolean, - href?: empty, // remove href, as it's ignored by the router - }> {} - - declare export class Redirect extends React$Component<{| - from?: string, - to: string, - noThrow?: boolean, - |}> {} - - declare export class Match extends React$Component<{| - path: string, - children: (props: {| - match: null | ({ uri: string, path: string } & Params), - location: typeof location, - navigate: NavigateFn, - |}) => React$Node, - |}> {} - - declare export class Location extends React$Component<{| - children: LocationProviderRenderFn, - |}> {} - - declare export class LocationProvider extends React$Component<{| - history: History, - children?: React$Node | LocationProviderRenderFn, - |}> {} - - declare export class ServerLocation extends React$Component<{| - url: string, - children?: React$Node, - |}> {} - - declare export function createHistory(source: HistorySource): History; - declare export function createMemorySource( - initialPath: string, - ): HistorySource; - - declare export function isRedirect(error: any): $Exact<{ uri: string }>; - declare export function redirectTo(uri: string): void; -} diff --git a/flow-typed/npm/appdirs_vx.x.x.js b/flow-typed/npm/appdirs_vx.x.x.js deleted file mode 100644 index 435ed42bef..0000000000 --- a/flow-typed/npm/appdirs_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 150c164432c207ae0c53a2d7144e2b82 -// flow-typed version: <>/appdirs_v^1.1.0/flow_v0.77.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'appdirs' - * - * 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 'appdirs' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-core_vx.x.x.js b/flow-typed/npm/babel-core_vx.x.x.js deleted file mode 100644 index bf3256d71e..0000000000 --- a/flow-typed/npm/babel-core_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: e3ca7ce5dbf00d0da563f8d8dff29af7 -// flow-typed version: <>/babel-core_v^6.26.3/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-core' - * - * 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 'babel-core' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-eslint_vx.x.x.js b/flow-typed/npm/babel-eslint_vx.x.x.js deleted file mode 100644 index f0463033d2..0000000000 --- a/flow-typed/npm/babel-eslint_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 01c50bcb93f43275311bf9a03aac898a -// flow-typed version: <>/babel-eslint_v^8.2.6/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-eslint' - * - * 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 'babel-eslint' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-jest_vx.x.x.js b/flow-typed/npm/babel-jest_vx.x.x.js deleted file mode 100644 index 3f4115ea60..0000000000 --- a/flow-typed/npm/babel-jest_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 62a01aa8a6e30435bd2cffa8d2645872 -// flow-typed version: <>/babel-jest_v^23.4.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-jest' - * - * 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 'babel-jest' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-loader_vx.x.x.js b/flow-typed/npm/babel-loader_vx.x.x.js deleted file mode 100644 index 45a55d90ef..0000000000 --- a/flow-typed/npm/babel-loader_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 40044c0184e3af014cead78601ddf354 -// flow-typed version: <>/babel-loader_v^8.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-loader' - * - * 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 'babel-loader' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-plugin-lodash_vx.x.x.js b/flow-typed/npm/babel-plugin-lodash_vx.x.x.js deleted file mode 100644 index 646fa49787..0000000000 --- a/flow-typed/npm/babel-plugin-lodash_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 15c0dc22e78addd6eed45c6139d9ebc7 -// flow-typed version: <>/babel-plugin-lodash_v^3.3.4/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-lodash' - * - * 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 'babel-plugin-lodash' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-plugin-styled-components_vx.x.x.js b/flow-typed/npm/babel-plugin-styled-components_vx.x.x.js deleted file mode 100644 index 7e503af5ea..0000000000 --- a/flow-typed/npm/babel-plugin-styled-components_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 40c77f62e01bb4c338ab671253638585 -// flow-typed version: <>/babel-plugin-styled-components_v^1.5.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-styled-components' - * - * 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 'babel-plugin-styled-components' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-plugin-transform-class-properties_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-class-properties_vx.x.x.js deleted file mode 100644 index e5ebd73d04..0000000000 --- a/flow-typed/npm/babel-plugin-transform-class-properties_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 9165228798b81da9ce7a49c83ea9d917 -// flow-typed version: <>/babel-plugin-transform-class-properties_v^6.24.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-transform-class-properties' - * - * 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 'babel-plugin-transform-class-properties' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-plugin-transform-es2015-modules-commonjs_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-es2015-modules-commonjs_vx.x.x.js deleted file mode 100644 index a32b420bea..0000000000 --- a/flow-typed/npm/babel-plugin-transform-es2015-modules-commonjs_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: c80ae2f91b004a8008511df56a1dbc22 -// flow-typed version: <>/babel-plugin-transform-es2015-modules-commonjs_v^6.26.2/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-transform-es2015-modules-commonjs' - * - * 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 'babel-plugin-transform-es2015-modules-commonjs' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-plugin-transform-inline-environment-variables_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-inline-environment-variables_vx.x.x.js deleted file mode 100644 index 71f7946f2e..0000000000 --- a/flow-typed/npm/babel-plugin-transform-inline-environment-variables_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 3d76753e15936d8b688b1c3f4dda575a -// flow-typed version: <>/babel-plugin-transform-inline-environment-variables_v^6.8.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-transform-inline-environment-variables' - * - * 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 'babel-plugin-transform-inline-environment-variables' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-plugin-transform-object-rest-spread_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-object-rest-spread_vx.x.x.js deleted file mode 100644 index e9192c698b..0000000000 --- a/flow-typed/npm/babel-plugin-transform-object-rest-spread_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: d7f6e5d4e663f8abbea5a70953e19d04 -// flow-typed version: <>/babel-plugin-transform-object-rest-spread_v^6.26.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-transform-object-rest-spread' - * - * 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 'babel-plugin-transform-object-rest-spread' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-plugin-transform-react-constant-elements_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-react-constant-elements_vx.x.x.js deleted file mode 100644 index bf57c2fe95..0000000000 --- a/flow-typed/npm/babel-plugin-transform-react-constant-elements_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: e3e0762de26c8ae0adacca59176c23cb -// flow-typed version: <>/babel-plugin-transform-react-constant-elements_v^6.23.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-transform-react-constant-elements' - * - * 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 'babel-plugin-transform-react-constant-elements' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-plugin-transform-react-display-name_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-react-display-name_vx.x.x.js deleted file mode 100644 index 7ab98a1e4c..0000000000 --- a/flow-typed/npm/babel-plugin-transform-react-display-name_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 5bee0615fe6f493380b771499c74e9a2 -// flow-typed version: <>/babel-plugin-transform-react-display-name_v^6.25.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-transform-react-display-name' - * - * 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 'babel-plugin-transform-react-display-name' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-plugin-transform-react-inline-elements_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-react-inline-elements_vx.x.x.js deleted file mode 100644 index 4829801714..0000000000 --- a/flow-typed/npm/babel-plugin-transform-react-inline-elements_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 9470f30a308e13969d3371d932e09859 -// flow-typed version: <>/babel-plugin-transform-react-inline-elements_v^6.22.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-transform-react-inline-elements' - * - * 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 'babel-plugin-transform-react-inline-elements' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-plugin-transform-runtime_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-runtime_vx.x.x.js deleted file mode 100644 index 705ae320f9..0000000000 --- a/flow-typed/npm/babel-plugin-transform-runtime_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 5153e3dc162c941b6e1ad8a39180c083 -// flow-typed version: <>/babel-plugin-transform-runtime_v^6.23.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-transform-runtime' - * - * 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 'babel-plugin-transform-runtime' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-preset-env_vx.x.x.js b/flow-typed/npm/babel-preset-env_vx.x.x.js deleted file mode 100644 index f609832d86..0000000000 --- a/flow-typed/npm/babel-preset-env_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: d322700fc7a2b8bb69e320de2730a39d -// flow-typed version: <>/babel-preset-env_v^1.7.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-preset-env' - * - * 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 'babel-preset-env' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-preset-flow_vx.x.x.js b/flow-typed/npm/babel-preset-flow_vx.x.x.js deleted file mode 100644 index 48927d388d..0000000000 --- a/flow-typed/npm/babel-preset-flow_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 4456a94ea394b3ec6eeffbab8563e958 -// flow-typed version: <>/babel-preset-flow_v^6.23.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-preset-flow' - * - * 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 'babel-preset-flow' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-preset-react_vx.x.x.js b/flow-typed/npm/babel-preset-react_vx.x.x.js deleted file mode 100644 index 6ee1740f9e..0000000000 --- a/flow-typed/npm/babel-preset-react_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 64b1b4d3a59712b94e38bdfa036ac83d -// flow-typed version: <>/babel-preset-react_v^6.24.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-preset-react' - * - * 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 'babel-preset-react' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-register_v6.x.x.js b/flow-typed/npm/babel-register_v6.x.x.js deleted file mode 100644 index 9977d67bb6..0000000000 --- a/flow-typed/npm/babel-register_v6.x.x.js +++ /dev/null @@ -1,44 +0,0 @@ -// flow-typed signature: d39f8c42e21629554940dda3bcbe90e6 -// flow-typed version: b80967946f/babel-register_v6.x.x/flow_>=v0.30.x - -declare module 'babel-register' { - declare type Options = {| - ast?: boolean, - auxiliaryCommentAfter?: ?string, - auxiliaryCommentBefore?: ?string, - babelrc?: boolean, - code?: boolean, - comments?: boolean, - compact?: 'auto' | boolean, - env?: Object, - extends?: ?string, - filename?: string, - filenameRelative?: string, - generatorOpts?: Object, - getModuleId?: void | null | (moduleName: string) => string, - highlightCode?: boolean, - ignore?: boolean | string | RegExp | (filename: string) => boolean, - inputSourceMap?: Object, - minified?: boolean, - moduleId?: string, - moduleIds?: boolean, - moduleRoot?: string, - only?: RegExp, - parserOpts?: Object, - plugins?: Array<[string, Object] | string>, - presets?: Array, - retainLines?: boolean, - resolveModuleSource?: null | (source: string, filename: string) => boolean, - shouldPrintComment?: null | (commentContents: string) => string, - sourceFileName?: string, - sourceMaps?: boolean | 'inline' | 'both', - sourceMapTarget?: string, - sourceRoot?: string, - sourceType?: 'script' | 'module' | 'unambiguous', - wrapPluginVisitorMethod?: null | (pluginAlias: string, visitorType: string, callback: Function) => boolean, - extensions?: Array, - cache?: boolean, - |}; - - declare module.exports: (options?: Options) => void; -} diff --git a/flow-typed/npm/babel-runtime_vx.x.x.js b/flow-typed/npm/babel-runtime_vx.x.x.js deleted file mode 100644 index 9ac5a82e6d..0000000000 --- a/flow-typed/npm/babel-runtime_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 3aba6af54d306eb558b654fed0a008ce -// flow-typed version: <>/babel-runtime_v6.26.0/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-runtime' - * - * 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 'babel-runtime' { - declare module.exports: any; -} diff --git a/flow-typed/npm/babel-stdin_vx.x.x.js b/flow-typed/npm/babel-stdin_vx.x.x.js deleted file mode 100644 index ce0e85eabb..0000000000 --- a/flow-typed/npm/babel-stdin_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 8ac2f4df4a1951b2f5430790a221a418 -// flow-typed version: <>/babel-stdin_v^1.1.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-stdin' - * - * 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 'babel-stdin' { - declare module.exports: any; -} diff --git a/flow-typed/npm/brwsr_vx.x.x.js b/flow-typed/npm/brwsr_vx.x.x.js deleted file mode 100644 index 53b4aa95dd..0000000000 --- a/flow-typed/npm/brwsr_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 5550bc249b4ed8d134c5e42751595240 -// flow-typed version: <>/brwsr_v1.0.1/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'brwsr' - * - * 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 'brwsr' { - declare module.exports: any; -} diff --git a/flow-typed/npm/bugsnag-js_vx.x.x.js b/flow-typed/npm/bugsnag-js_vx.x.x.js deleted file mode 100644 index ce0fa6b013..0000000000 --- a/flow-typed/npm/bugsnag-js_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: c620576fe314bfc82c7d56cf6bc514db -// flow-typed version: <>/bugsnag-js_v^4.7.3/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'bugsnag-js' - * - * 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 'bugsnag-js' { - declare module.exports: any; -} diff --git a/flow-typed/npm/case-sensitive-paths-webpack-plugin_vx.x.x.js b/flow-typed/npm/case-sensitive-paths-webpack-plugin_vx.x.x.js deleted file mode 100644 index 0f7ceedef6..0000000000 --- a/flow-typed/npm/case-sensitive-paths-webpack-plugin_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 6286b8e8c56508e81bb5a2df71e13b8c -// flow-typed version: <>/case-sensitive-paths-webpack-plugin_v^2.1.2/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'case-sensitive-paths-webpack-plugin' - * - * 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 'case-sensitive-paths-webpack-plugin' { - declare module.exports: any; -} diff --git a/flow-typed/npm/chalk_v2.x.x.js b/flow-typed/npm/chalk_v2.x.x.js deleted file mode 100644 index 43548785fc..0000000000 --- a/flow-typed/npm/chalk_v2.x.x.js +++ /dev/null @@ -1,98 +0,0 @@ -// flow-typed signature: db5b2cdde8db39d47e27cc8ab84f89bf -// flow-typed version: d662d43161/chalk_v2.x.x/flow_>=v0.25.x - -// From: https://github.com/chalk/chalk/blob/master/index.js.flow - -declare module "chalk" { - declare type TemplateStringsArray = $ReadOnlyArray; - - 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; -} diff --git a/flow-typed/npm/classnames_v2.x.x.js b/flow-typed/npm/classnames_v2.x.x.js deleted file mode 100644 index 2307243eeb..0000000000 --- a/flow-typed/npm/classnames_v2.x.x.js +++ /dev/null @@ -1,23 +0,0 @@ -// flow-typed signature: cf86673cc32d185bdab1d2ea90578d37 -// flow-typed version: 614bf49aa8/classnames_v2.x.x/flow_>=v0.25.x - -type $npm$classnames$Classes = - | string - | { [className: string]: * } - | false - | void - | null; - -declare module "classnames" { - declare module.exports: ( - ...classes: Array<$npm$classnames$Classes | $npm$classnames$Classes[]> - ) => string; -} - -declare module "classnames/bind" { - declare module.exports: $Exports<"classnames">; -} - -declare module "classnames/dedupe" { - declare module.exports: $Exports<"classnames">; -} diff --git a/flow-typed/npm/clean-webpack-plugin_vx.x.x.js b/flow-typed/npm/clean-webpack-plugin_vx.x.x.js deleted file mode 100644 index 456e72f498..0000000000 --- a/flow-typed/npm/clean-webpack-plugin_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: bb112ae62c651861750c9e7e5d5c0058 -// flow-typed version: <>/clean-webpack-plugin_v^0.1.19/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'clean-webpack-plugin' - * - * 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 'clean-webpack-plugin' { - declare module.exports: any; -} diff --git a/flow-typed/npm/codemirror_vx.x.x.js b/flow-typed/npm/codemirror_vx.x.x.js deleted file mode 100644 index 4e36f3797e..0000000000 --- a/flow-typed/npm/codemirror_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: e1cb673be72ed796a3779228a75ba2d3 -// flow-typed version: <>/codemirror_v^5.40.2/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'codemirror' - * - * 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 'codemirror' { - declare module.exports: any; -} diff --git a/flow-typed/npm/copy-webpack-plugin_vx.x.x.js b/flow-typed/npm/copy-webpack-plugin_vx.x.x.js deleted file mode 100644 index 6c94066f36..0000000000 --- a/flow-typed/npm/copy-webpack-plugin_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: ec28f332b333281781b5f860c1af491a -// flow-typed version: <>/copy-webpack-plugin_v^4.5.2/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'copy-webpack-plugin' - * - * 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 'copy-webpack-plugin' { - declare module.exports: any; -} diff --git a/flow-typed/npm/coveralls_vx.x.x.js b/flow-typed/npm/coveralls_vx.x.x.js deleted file mode 100644 index eb4d002380..0000000000 --- a/flow-typed/npm/coveralls_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 2389c107d90c5839d5f7624eb830b002 -// flow-typed version: <>/coveralls_v^3.0.2/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'coveralls' - * - * 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 'coveralls' { - declare module.exports: any; -} diff --git a/flow-typed/npm/cross-env_vx.x.x.js b/flow-typed/npm/cross-env_vx.x.x.js deleted file mode 100644 index fdd5c5a99b..0000000000 --- a/flow-typed/npm/cross-env_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: fa36ee0be2d8338eddcf35c942e386ab -// flow-typed version: <>/cross-env_v^5.2.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'cross-env' - * - * 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 'cross-env' { - declare module.exports: any; -} diff --git a/flow-typed/npm/css-loader_vx.x.x.js b/flow-typed/npm/css-loader_vx.x.x.js deleted file mode 100644 index ac045494ae..0000000000 --- a/flow-typed/npm/css-loader_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 52f68e3874a2d38b961a422f4801717b -// flow-typed version: <>/css-loader_v^1.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'css-loader' - * - * 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 'css-loader' { - declare module.exports: any; -} diff --git a/flow-typed/npm/dart-sass_vx.x.x.js b/flow-typed/npm/dart-sass_vx.x.x.js deleted file mode 100644 index fdd07a1a8e..0000000000 --- a/flow-typed/npm/dart-sass_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 279b144803b9b303e498768931a15fc7 -// flow-typed version: <>/dart-sass_v^1.14.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'dart-sass' - * - * 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 'dart-sass' { - declare module.exports: any; -} diff --git a/flow-typed/npm/debug_v3.x.x.js b/flow-typed/npm/debug_v3.x.x.js deleted file mode 100644 index 62c3db243e..0000000000 --- a/flow-typed/npm/debug_v3.x.x.js +++ /dev/null @@ -1,30 +0,0 @@ -// flow-typed signature: da5374f88debab76c20fc67be7295ba7 -// flow-typed version: da30fe6876/debug_v3.x.x/flow_>=v0.28.x - -declare module "debug" { - declare type Debugger = { - (...args: Array): void, - (formatter: string, ...args: Array): void, - (err: Error, ...args: Array): void, - enabled: boolean, - log: () => {}, - namespace: string - }; - - declare module.exports: (namespace: string) => Debugger; - - declare var names: Array; - declare var skips: Array; - declare var colors: Array; - - declare function disable(): void; - declare function enable(namespaces: string): void; - declare function enabled(name: string): boolean; - declare function humanize(): void; - declare function useColors(): boolean; - declare function log(): void; - - declare var formatters: { - [formatter: string]: () => {} - }; -} diff --git a/flow-typed/npm/debug_vx.x.x.js b/flow-typed/npm/debug_vx.x.x.js deleted file mode 100644 index 1a5ce30ebf..0000000000 --- a/flow-typed/npm/debug_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: d5614df0b89636430f826a09b6437665 -// flow-typed version: <>/debug_v^4.0.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'debug' - * - * 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 'debug' { - declare module.exports: any; -} diff --git a/flow-typed/npm/del_v3.x.x.js b/flow-typed/npm/del_v3.x.x.js deleted file mode 100644 index 8ed4440307..0000000000 --- a/flow-typed/npm/del_v3.x.x.js +++ /dev/null @@ -1,50 +0,0 @@ -// flow-typed signature: 4d9e8253b9b9c1a25b55cc2d1f40b40e -// flow-typed version: 77852b4474/del_v3.x.x/flow_>=v0.25.x - -type $npm$del$Patterns = string[] | string; - -type $npm$del$Options = { - force?: boolean, - dryRun?: boolean, - concurrency?: number, - - // remaining options are passed through to node-glob: - cwd?: string, - root?: string, - dot?: boolean, - nomount?: boolean, - mark?: boolean, - nosort?: boolean, - stat?: boolean, - silent?: boolean, - strict?: boolean, - cache?: Object, - statCache?: Object, - symlinks?: Object, - realpathCache?: Object, - nounique?: boolean, - nonull?: boolean, - debug?: boolean, - nobrace?: boolean, - noglobstar?: boolean, - noext?: boolean, - nocase?: boolean, - matchBase?: boolean, - nodir?: boolean, - ignore?: string | string[], - follow?: boolean, - realpath?: boolean, - absolute?: boolean -}; - -declare module "del" { - declare class Del { - ( - patterns: $npm$del$Patterns, - options?: $npm$del$Options - ): Promise, - sync(patterns: $npm$del$Patterns, options?: $npm$del$Options): string[] - } - - declare module.exports: Del; -} diff --git a/flow-typed/npm/delay_vx.x.x.js b/flow-typed/npm/delay_vx.x.x.js deleted file mode 100644 index 8872093c80..0000000000 --- a/flow-typed/npm/delay_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 7001c7cf12f781e97d3ddba2b12f26ed -// flow-typed version: <>/delay_v^2.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'delay' - * - * 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 'delay' { - declare module.exports: any; -} diff --git a/flow-typed/npm/duplicate-package-checker-webpack-plugin_vx.x.x.js b/flow-typed/npm/duplicate-package-checker-webpack-plugin_vx.x.x.js deleted file mode 100644 index 8ada4c6a41..0000000000 --- a/flow-typed/npm/duplicate-package-checker-webpack-plugin_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 7bd03e3d60caea193cd30d109ec90ac7 -// flow-typed version: <>/duplicate-package-checker-webpack-plugin_v^3.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'duplicate-package-checker-webpack-plugin' - * - * 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 'duplicate-package-checker-webpack-plugin' { - declare module.exports: any; -} diff --git a/flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js b/flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js deleted file mode 100644 index 1d487493b4..0000000000 --- a/flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 8d43d6da060c9cefc135d41d8dd55627 -// flow-typed version: <>/enzyme-adapter-react-16_v^1.5.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'enzyme-adapter-react-16' - * - * 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 'enzyme-adapter-react-16' { - declare module.exports: any; -} diff --git a/flow-typed/npm/enzyme_v3.x.x.js b/flow-typed/npm/enzyme_v3.x.x.js deleted file mode 100644 index 1105094a8f..0000000000 --- a/flow-typed/npm/enzyme_v3.x.x.js +++ /dev/null @@ -1,129 +0,0 @@ -// flow-typed signature: e50486ad88c5bbfcdfde9fef4fc4c5d1 -// flow-typed version: ab187b275b/enzyme_v3.x.x/flow_>=v0.53.x - -import * as React from "react"; - -declare module "enzyme" { - declare type PredicateFunction = ( - wrapper: T, - index: number - ) => boolean; - declare type NodeOrNodes = React.Node | Array; - declare type EnzymeSelector = string | Class> | Object; - - // CheerioWrapper is a type alias for an actual cheerio instance - // TODO: Reference correct type from cheerio's type declarations - declare type CheerioWrapper = any; - - declare class Wrapper { - find(selector: EnzymeSelector): this, - findWhere(predicate: PredicateFunction): this, - filter(selector: EnzymeSelector): this, - filterWhere(predicate: PredicateFunction): this, - hostNodes(): this, - contains(nodeOrNodes: NodeOrNodes): boolean, - containsMatchingElement(node: React.Node): boolean, - containsAllMatchingElements(nodes: NodeOrNodes): boolean, - containsAnyMatchingElements(nodes: NodeOrNodes): boolean, - dive(option?: { context?: Object }): this, - exists(): boolean, - isEmptyRender(): boolean, - matchesElement(node: React.Node): boolean, - hasClass(className: string): boolean, - is(selector: EnzymeSelector): boolean, - isEmpty(): boolean, - not(selector: EnzymeSelector): this, - children(selector?: EnzymeSelector): this, - childAt(index: number): this, - parents(selector?: EnzymeSelector): this, - parent(): this, - closest(selector: EnzymeSelector): this, - render(): CheerioWrapper, - unmount(): this, - text(): string, - html(): string, - get(index: number): React.Node, - getDOMNode(): HTMLElement | HTMLInputElement, - at(index: number): this, - first(): this, - last(): this, - state(key?: string): any, - context(key?: string): any, - props(): Object, - prop(key: string): any, - key(): string, - simulate(event: string, ...args: Array): this, - slice(begin?: number, end?: number): this, - setState(state: {}, callback?: Function): this, - setProps(props: {}): this, - setContext(context: Object): this, - instance(): React.Component<*, *>, - update(): this, - debug(options?: Object): string, - type(): string | Function | null, - name(): string, - forEach(fn: (node: this, index: number) => mixed): this, - map(fn: (node: this, index: number) => T): Array, - reduce( - fn: (value: T, node: this, index: number) => T, - initialValue?: T - ): Array, - reduceRight( - fn: (value: T, node: this, index: number) => T, - initialValue?: T - ): Array, - some(selector: EnzymeSelector): boolean, - someWhere(predicate: PredicateFunction): boolean, - every(selector: EnzymeSelector): boolean, - everyWhere(predicate: PredicateFunction): boolean, - length: number - } - - declare class ReactWrapper extends Wrapper { - constructor(nodes: NodeOrNodes, root: any, options?: ?Object): ReactWrapper, - mount(): this, - ref(refName: string): this, - detach(): void - } - - declare class ShallowWrapper extends Wrapper { - constructor( - nodes: NodeOrNodes, - root: any, - options?: ?Object - ): ShallowWrapper, - equals(node: React.Node): boolean, - shallow(options?: { context?: Object }): ShallowWrapper, - getElement(): React.Node, - getElements(): Array - } - - declare function shallow( - node: React.Node, - options?: { context?: Object, disableLifecycleMethods?: boolean } - ): ShallowWrapper; - declare function mount( - node: React.Node, - options?: { - context?: Object, - attachTo?: HTMLElement, - childContextTypes?: Object - } - ): ReactWrapper; - declare function render( - node: React.Node, - options?: { context?: Object } - ): CheerioWrapper; - - declare module.exports: { - configure(options: { - Adapter?: any, - disableLifecycleMethods?: boolean - }): void, - render: typeof render, - mount: typeof mount, - shallow: typeof shallow, - ShallowWrapper: typeof ShallowWrapper, - ReactWrapper: typeof ReactWrapper - }; -} diff --git a/flow-typed/npm/es6-promise_vx.x.x.js b/flow-typed/npm/es6-promise_vx.x.x.js deleted file mode 100644 index 57f9a88fc6..0000000000 --- a/flow-typed/npm/es6-promise_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 369203f4c9e6fc6861597891c434d1a0 -// flow-typed version: <>/es6-promise_v^4.2.5/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'es6-promise' - * - * 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 'es6-promise' { - declare module.exports: any; -} diff --git a/flow-typed/npm/eslint-config-prettier_vx.x.x.js b/flow-typed/npm/eslint-config-prettier_vx.x.x.js deleted file mode 100644 index 6b2a6f8965..0000000000 --- a/flow-typed/npm/eslint-config-prettier_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 0fa2a3dd08a03682f97bb901302617cb -// flow-typed version: <>/eslint-config-prettier_v^3.0.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'eslint-config-prettier' - * - * 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 'eslint-config-prettier' { - declare module.exports: any; -} diff --git a/flow-typed/npm/eslint-plugin-babel_vx.x.x.js b/flow-typed/npm/eslint-plugin-babel_vx.x.x.js deleted file mode 100644 index 8447d22629..0000000000 --- a/flow-typed/npm/eslint-plugin-babel_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 7567e7a8670361d9cbf4ca68ad55bc7f -// flow-typed version: <>/eslint-plugin-babel_v^5.1.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'eslint-plugin-babel' - * - * 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 'eslint-plugin-babel' { - declare module.exports: any; -} diff --git a/flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js b/flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js deleted file mode 100644 index dd98dfeacc..0000000000 --- a/flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 22a63ce9ed22d4808d5e55798d1ac0f6 -// flow-typed version: <>/eslint-plugin-flowtype_v^2.50.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'eslint-plugin-flowtype' - * - * 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 'eslint-plugin-flowtype' { - declare module.exports: any; -} diff --git a/flow-typed/npm/eslint-plugin-import_vx.x.x.js b/flow-typed/npm/eslint-plugin-import_vx.x.x.js deleted file mode 100644 index 236be56d73..0000000000 --- a/flow-typed/npm/eslint-plugin-import_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: da072873d8fa04b5c1fd51226c3fac0c -// flow-typed version: <>/eslint-plugin-import_v^2.13.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'eslint-plugin-import' - * - * 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 'eslint-plugin-import' { - declare module.exports: any; -} diff --git a/flow-typed/npm/eslint-plugin-react_vx.x.x.js b/flow-typed/npm/eslint-plugin-react_vx.x.x.js deleted file mode 100644 index e275881b3d..0000000000 --- a/flow-typed/npm/eslint-plugin-react_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 5cea4bdb34a7dc437a20eb83d35cb4fd -// flow-typed version: <>/eslint-plugin-react_v^7.10.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'eslint-plugin-react' - * - * 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 'eslint-plugin-react' { - declare module.exports: any; -} diff --git a/flow-typed/npm/eslint_vx.x.x.js b/flow-typed/npm/eslint_vx.x.x.js deleted file mode 100644 index 8426c1ab17..0000000000 --- a/flow-typed/npm/eslint_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: f4a04da1019d65eb270a99ba3c8e96c2 -// flow-typed version: <>/eslint_v^5.1.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'eslint' - * - * 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 'eslint' { - declare module.exports: any; -} diff --git a/flow-typed/npm/esm_vx.x.x.js b/flow-typed/npm/esm_vx.x.x.js deleted file mode 100644 index acd65aaa6a..0000000000 --- a/flow-typed/npm/esm_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 44a0b65dda35e54aadac1f304c748b94 -// flow-typed version: <>/esm_v^3.0.84/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'esm' - * - * 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 'esm' { - declare module.exports: any; -} diff --git a/flow-typed/npm/extract-text-webpack-plugin_vx.x.x.js b/flow-typed/npm/extract-text-webpack-plugin_vx.x.x.js deleted file mode 100644 index 4d0b503098..0000000000 --- a/flow-typed/npm/extract-text-webpack-plugin_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: fc8f11910af2645a4c21ec57232dd5fd -// flow-typed version: <>/extract-text-webpack-plugin_v3.0.2/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'extract-text-webpack-plugin' - * - * 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 'extract-text-webpack-plugin' { - declare module.exports: any; -} diff --git a/flow-typed/npm/fake-indexeddb_vx.x.x.js b/flow-typed/npm/fake-indexeddb_vx.x.x.js deleted file mode 100644 index 0b93f56099..0000000000 --- a/flow-typed/npm/fake-indexeddb_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: fe8348ef1a63e6eeabba4867d2970d42 -// flow-typed version: <>/fake-indexeddb_v^2.0.4/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'fake-indexeddb' - * - * 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 'fake-indexeddb' { - declare module.exports: any; -} diff --git a/flow-typed/npm/file-loader_vx.x.x.js b/flow-typed/npm/file-loader_vx.x.x.js deleted file mode 100644 index 7ae659b13b..0000000000 --- a/flow-typed/npm/file-loader_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 1c8d789ae508854fcfadd18b2ac21742 -// flow-typed version: <>/file-loader_v^2.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'file-loader' - * - * 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 'file-loader' { - declare module.exports: any; -} diff --git a/flow-typed/npm/flow-bin_v0.x.x.js b/flow-typed/npm/flow-bin_v0.x.x.js deleted file mode 100644 index c538e2086f..0000000000 --- a/flow-typed/npm/flow-bin_v0.x.x.js +++ /dev/null @@ -1,6 +0,0 @@ -// flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 -// flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x - -declare module "flow-bin" { - declare module.exports: string; -} diff --git a/flow-typed/npm/flow-remove-types_vx.x.x.js b/flow-typed/npm/flow-remove-types_vx.x.x.js deleted file mode 100644 index 265a31a7e6..0000000000 --- a/flow-typed/npm/flow-remove-types_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 3309ea870c5100e820bbe4317daedff4 -// flow-typed version: <>/flow-remove-types_v^1.2.3/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'flow-remove-types' - * - * 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 'flow-remove-types' { - declare module.exports: any; -} diff --git a/flow-typed/npm/fuzzysearch_vx.x.x.js b/flow-typed/npm/fuzzysearch_vx.x.x.js deleted file mode 100644 index 3f32d7068f..0000000000 --- a/flow-typed/npm/fuzzysearch_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: a6a182f0ad40baca7a084cf3c23bdcca -// flow-typed version: <>/fuzzysearch_v^1.0.3/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'fuzzysearch' - * - * 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 'fuzzysearch' { - declare module.exports: any; -} diff --git a/flow-typed/npm/get-stdin_v5.x.x.js b/flow-typed/npm/get-stdin_v5.x.x.js deleted file mode 100644 index 74cfd60604..0000000000 --- a/flow-typed/npm/get-stdin_v5.x.x.js +++ /dev/null @@ -1,9 +0,0 @@ -// flow-typed signature: 95596051d0a57cf80949ae52d6e517c5 -// flow-typed version: b43dff3e0e/get-stdin_v5.x.x/flow_>=v0.25.x - -declare module 'get-stdin' { - declare module.exports: { - (): Promise, - buffer(): Promise, - }; -} diff --git a/flow-typed/npm/get-stdin_vx.x.x.js b/flow-typed/npm/get-stdin_vx.x.x.js deleted file mode 100644 index 1aa3378c26..0000000000 --- a/flow-typed/npm/get-stdin_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: fb463b1d601bbb0d928bf4437c27e7f4 -// flow-typed version: <>/get-stdin_v^6.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'get-stdin' - * - * 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 'get-stdin' { - declare module.exports: any; -} diff --git a/flow-typed/npm/glob_vx.x.x.js b/flow-typed/npm/glob_vx.x.x.js deleted file mode 100644 index f90f7ef881..0000000000 --- a/flow-typed/npm/glob_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 54d2507ce60ae6df32b73db0069fe45a -// flow-typed version: <>/glob_v^7.1.2/flow_v0.77.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'glob' - * - * 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 'glob' { - declare module.exports: any; -} diff --git a/flow-typed/npm/got_vx.x.x.js b/flow-typed/npm/got_vx.x.x.js deleted file mode 100644 index 05e28583d0..0000000000 --- a/flow-typed/npm/got_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 1e789b3fcbca7d2bc57aa17e153efd46 -// flow-typed version: <>/got_v^9.2.2/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'got' - * - * 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 'got' { - declare module.exports: any; -} diff --git a/flow-typed/npm/graceful-fs_v4.1.x.js b/flow-typed/npm/graceful-fs_v4.1.x.js deleted file mode 100644 index 9c6b08b297..0000000000 --- a/flow-typed/npm/graceful-fs_v4.1.x.js +++ /dev/null @@ -1,199 +0,0 @@ -// flow-typed signature: dddffa88c6bf519f7077a44e489c05c9 -// flow-typed version: 1b3bf95731/graceful-fs_v4.1.x/flow_>=v0.28.x - -declare module "graceful-fs" { - declare interface ErrnoError extends Error { - errno?: number; - code?: string; - path?: string; - syscall?: string; - } - declare class Stats { - dev: number; - ino: number; - mode: number; - nlink: number; - uid: number; - gid: number; - rdev: number; - size: number; - blksize: number; - blocks: number; - atime: Date; - mtime: Date; - ctime: Date; - - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - } - - declare class FSWatcher extends events$EventEmitter { - close(): void - } - - declare class ReadStream extends stream$Readable { - close(): void - } - - declare class WriteStream extends stream$Writable { - close(): void - } - - declare function gracefulify(fs: Object): void; - declare function rename(oldPath: string, newPath: string, callback?: (err: ?ErrnoError) => void): void; - declare function renameSync(oldPath: string, newPath: string): void; - declare function ftruncate(fd: number, len: number, callback?: (err: ?ErrnoError) => void): void; - declare function ftruncateSync(fd: number, len: number): void; - declare function truncate(path: string, len: number, callback?: (err: ?ErrnoError) => void): void; - declare function truncateSync(path: string, len: number): void; - declare function chown(path: string, uid: number, gid: number, callback?: (err: ?ErrnoError) => void): void; - declare function chownSync(path: string, uid: number, gid: number): void; - declare function fchown(fd: number, uid: number, gid: number, callback?: (err: ?ErrnoError) => void): void; - declare function fchownSync(fd: number, uid: number, gid: number): void; - declare function lchown(path: string, uid: number, gid: number, callback?: (err: ?ErrnoError) => void): void; - declare function lchownSync(path: string, uid: number, gid: number): void; - declare function chmod(path: string, mode: number | string, callback?: (err: ?ErrnoError) => void): void; - declare function chmodSync(path: string, mode: number | string): void; - declare function fchmod(fd: number, mode: number | string, callback?: (err: ?ErrnoError) => void): void; - declare function fchmodSync(fd: number, mode: number | string): void; - declare function lchmod(path: string, mode: number | string, callback?: (err: ?ErrnoError) => void): void; - declare function lchmodSync(path: string, mode: number | string): void; - declare function stat(path: string, callback?: (err: ?ErrnoError, stats: Stats) => any): void; - declare function statSync(path: string): Stats; - declare function fstat(fd: number, callback?: (err: ?ErrnoError, stats: Stats) => any): void; - declare function fstatSync(fd: number): Stats; - declare function lstat(path: string, callback?: (err: ?ErrnoError, stats: Stats) => any): void; - declare function lstatSync(path: string): Stats; - declare function link(srcpath: string, dstpath: string, callback?: (err: ?ErrnoError) => void): void; - declare function linkSync(srcpath: string, dstpath: string): void; - declare function symlink(srcpath: string, dtspath: string, type?: string, callback?: (err: ?ErrnoError) => void): void; - declare function symlinkSync(srcpath: string, dstpath: string, type: string): void; - declare function readlink(path: string, callback: (err: ?ErrnoError, linkString: string) => void): void; - declare function readlinkSync(path: string): string; - declare function realpath(path: string, cache?: Object, callback?: (err: ?ErrnoError, resolvedPath: string) => void): void; - declare function realpathSync(path: string, cache?: Object): string; - declare function unlink(path: string, callback?: (err: ?ErrnoError) => void): void; - declare function unlinkSync(path: string): void; - declare function rmdir(path: string, callback?: (err: ?ErrnoError) => void): void; - declare function rmdirSync(path: string): void; - declare function mkdir(path: string, mode: number, callback: (err: ?ErrnoError) => void): void; - declare function mkdir(path: string, callback: (err: ?ErrnoError) => void): void; - declare function mkdirSync(path: string, mode?: number): void; - declare function mkdtemp(prefix: string, callback: (err: ?ErrnoError, folderPath: string) => void): void; - declare function mkdtempSync(prefix: string): string; - declare function readdir(path: string, callback: (err: ?ErrnoError, files: Array) => void): void; - declare function readdir( - path: string, - options: string | { encoding: string }, - callback: (err: ?ErrnoError, files: Array) => void): void; - declare function readdirSync(path: string, options?: string | { encoding: string }, ): Array; - declare function close(fd: number, callback?: (err: ?ErrnoError) => void): void; - declare function closeSync(fd: number): void; - declare function open( - path: string | Buffer, - flags: string | number, - mode: number, - callback: (err: ?ErrnoError, fd: number) => void - ): void; - declare function open( - path: string | Buffer, - flags: string | number, - callback: (err: ?ErrnoError, fd: number) => void - ): void; - declare function openSync(path: string | Buffer, flags: string | number, mode?: number): number; - declare function utimes(path: string, atime: number, mtime: number, callback?: (err: ?ErrnoError) => void): void; - declare function utimesSync(path: string, atime: number, mtime: number): void; - declare function futimes(fd: number, atime: number, mtime: number, callback?: (err: ?ErrnoError) => void): void; - declare function futimesSync(fd: number, atime: number, mtime: number): void; - declare function fsync(fd: number, callback?: (err: ?ErrnoError) => void): void; - declare function fsyncSync(fd: number): void; - declare var write: (fd: number, buffer: Buffer, offset: number, length: number, position?: mixed, callback?: (err: ?ErrnoError, write: number, str: string) => void) => void - | (fd: number, data: mixed, position?: mixed, encoding?: string, callback?: (err: ?ErrnoError, write: number, str: string) => void) => void; - declare var writeSync: (fd: number, buffer: Buffer, offset: number, length: number, position?: number) => number - | (fd: number, data: mixed, position?: mixed, encoding?: string) => number; - declare function read( - fd: number, - buffer: Buffer, - offset: number, - length: number, - position: ?number, - callback?: (err: ?ErrnoError, bytesRead: number, buffer: Buffer) => void - ): void; - declare function readSync( - fd: number, - buffer: Buffer, - offset: number, - length: number, - position: number - ): number; - declare function readFile( - filename: string, - callback: (err: ?ErrnoError, data: Buffer) => void - ): void; - declare function readFile( - filename: string, - encoding: string, - callback: (err: ?ErrnoError, data: string) => void - ): void; - declare function readFile( - filename: string, - options: { encoding: string; flag?: string }, - callback: (err: ?ErrnoError, data: string) => void - ): void; - declare function readFile( - filename: string, - options: { flag?: string }, - callback: (err: ?ErrnoError, data: Buffer) => void - ): void; - declare function readFileSync(filename: string, _: void): Buffer; - declare function readFileSync(filename: string, encoding: string): string; - declare function readFileSync(filename: string, options: { encoding: string, flag?: string }): string; - declare function readFileSync(filename: string, options: { encoding?: void, flag?: string }): Buffer; - declare function writeFile( - filename: string, - data: Buffer | string, - options: Object | string, - callback?: (err: ?ErrnoError) => void - ): void; - declare function writeFile( - filename: string, - data: Buffer | string, - callback?: (err: ?ErrnoError) => void - ): void; - declare function writeFileSync( - filename: string, - data: Buffer | string, - options?: Object | string - ): void; - declare function appendFile( - filename: string, - data: string | Buffer, - callback: (err: ?ErrnoError) => void - ): void; - declare function appendFile( - filename: string, - data: string | Buffer, - options: string | Object, - callback: (err: ?ErrnoError) => void - ): void; - declare function appendFileSync(filename: string, data: string | Buffer, options?: Object): void; - declare function watchFile(filename: string, options?: Object, listener?: (curr: Stats, prev: Stats) => void): void; - declare function unwatchFile(filename: string, listener?: (curr: Stats, prev: Stats) => void): void; - declare function watch(filename: string, options?: Object, listener?: (event: string, filename: string) => void): FSWatcher; - declare function exists(path: string, callback?: (exists: boolean) => void): void; - declare function existsSync(path: string): boolean; - declare function access(path: string, mode?: any, callback?: (err: ?ErrnoError) => void): void; - declare function accessSync(path: string, mode?: any): void; - declare function createReadStream(path: string, options?: Object): ReadStream; - declare function createWriteStream(path: string, options?: Object): WriteStream; - - declare var F_OK: number; - declare var R_OK: number; - declare var W_OK: number; - declare var X_OK: number; -} diff --git a/flow-typed/npm/history_vx.x.x.js b/flow-typed/npm/history_vx.x.x.js deleted file mode 100644 index e418782615..0000000000 --- a/flow-typed/npm/history_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 52d357bcb5d5535c09696b235f143c2c -// flow-typed version: <>/history_v3.3.0/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'history' - * - * 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 'history' { - declare module.exports: any; -} diff --git a/flow-typed/npm/html-entities_vx.x.x.js b/flow-typed/npm/html-entities_vx.x.x.js deleted file mode 100644 index 9fcfe61cd0..0000000000 --- a/flow-typed/npm/html-entities_vx.x.x.js +++ /dev/null @@ -1,6 +0,0 @@ -// flow-typed signature: 00000000000000000000000000000000 -// flow-typed version: <>/html-entities_vx.x.x/flow_v0.82.0 - -declare module 'html-entities' { - declare module.exports: any; -} diff --git a/flow-typed/npm/idb-range_vx.x.x.js b/flow-typed/npm/idb-range_vx.x.x.js deleted file mode 100644 index 20a6a81fa3..0000000000 --- a/flow-typed/npm/idb-range_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 60226781baabe63f0cffc1953745488e -// flow-typed version: <>/idb-range_v^3.1.3/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'idb-range' - * - * 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 'idb-range' { - declare module.exports: any; -} diff --git a/flow-typed/npm/idb-request_vx.x.x.js b/flow-typed/npm/idb-request_vx.x.x.js deleted file mode 100644 index 99d229a79a..0000000000 --- a/flow-typed/npm/idb-request_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 99032a277b6ae01288b6a0cf5f54f44b -// flow-typed version: <>/idb-request_v^3.2.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'idb-request' - * - * 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 'idb-request' { - declare module.exports: any; -} diff --git a/flow-typed/npm/jest-enzyme_vx.x.x.js b/flow-typed/npm/jest-enzyme_vx.x.x.js deleted file mode 100644 index 9e764b89b8..0000000000 --- a/flow-typed/npm/jest-enzyme_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: df357148f61a8f639a2df5a4e040cb51 -// flow-typed version: <>/jest-enzyme_v3.2.0/flow_v0.47.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'jest-enzyme' - * - * 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 'jest-enzyme' { - declare module.exports: any; -} diff --git a/flow-typed/npm/jest-matcher-utils_vx.x.x.js b/flow-typed/npm/jest-matcher-utils_vx.x.x.js deleted file mode 100644 index 000360d4cc..0000000000 --- a/flow-typed/npm/jest-matcher-utils_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 996d94bb6a490fa8f241aa886a0e8354 -// flow-typed version: <>/jest-matcher-utils_v^23.2.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'jest-matcher-utils' - * - * 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 'jest-matcher-utils' { - declare module.exports: any; -} diff --git a/flow-typed/npm/jest-styled-components_vx.x.x.js b/flow-typed/npm/jest-styled-components_vx.x.x.js deleted file mode 100644 index b44e964bb0..0000000000 --- a/flow-typed/npm/jest-styled-components_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: cbf181e91f477c53ee7d595291b75840 -// flow-typed version: <>/jest-styled-components_v^6.2.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'jest-styled-components' - * - * 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 'jest-styled-components' { - declare module.exports: any; -} diff --git a/flow-typed/npm/jest_v23.x.x.js b/flow-typed/npm/jest_v23.x.x.js deleted file mode 100644 index 511f4cde69..0000000000 --- a/flow-typed/npm/jest_v23.x.x.js +++ /dev/null @@ -1,1138 +0,0 @@ -// flow-typed signature: 268d738ecf65f4bcc4a5455efa90619f -// flow-typed version: 0e8507a159/jest_v23.x.x/flow_>=v0.39.x - -type JestMockFn, TReturn> = { - (...args: TArguments): TReturn, - /** - * An object for introspecting mock calls - */ - mock: { - /** - * An array that represents all calls that have been made into this mock - * function. Each call is represented by an array of arguments that were - * passed during the call. - */ - calls: Array, - /** - * An array that contains all the object instances that have been - * instantiated from this mock function. - */ - instances: Array, - /** - * An array that contains all the object results that have been - * returned by this mock function call - */ - results: Array<{ isThrow: boolean, value: TReturn }> - }, - /** - * Resets all information stored in the mockFn.mock.calls and - * mockFn.mock.instances arrays. Often this is useful when you want to clean - * up a mock's usage data between two assertions. - */ - mockClear(): void, - /** - * Resets all information stored in the mock. This is useful when you want to - * completely restore a mock back to its initial state. - */ - mockReset(): void, - /** - * Removes the mock and restores the initial implementation. This is useful - * when you want to mock functions in certain test cases and restore the - * original implementation in others. Beware that mockFn.mockRestore only - * works when mock was created with jest.spyOn. Thus you have to take care of - * restoration yourself when manually assigning jest.fn(). - */ - mockRestore(): void, - /** - * Accepts a function that should be used as the implementation of the mock. - * The mock itself will still record all calls that go into and instances - * that come from itself -- the only difference is that the implementation - * will also be executed when the mock is called. - */ - mockImplementation( - fn: (...args: TArguments) => TReturn - ): JestMockFn, - /** - * Accepts a function that will be used as an implementation of the mock for - * one call to the mocked function. Can be chained so that multiple function - * calls produce different results. - */ - mockImplementationOnce( - fn: (...args: TArguments) => TReturn - ): JestMockFn, - /** - * Accepts a string to use in test result output in place of "jest.fn()" to - * indicate which mock function is being referenced. - */ - mockName(name: string): JestMockFn, - /** - * Just a simple sugar function for returning `this` - */ - mockReturnThis(): void, - /** - * Accepts a value that will be returned whenever the mock function is called. - */ - mockReturnValue(value: TReturn): JestMockFn, - /** - * Sugar for only returning a value once inside your mock - */ - mockReturnValueOnce(value: TReturn): JestMockFn, - /** - * Sugar for jest.fn().mockImplementation(() => Promise.resolve(value)) - */ - mockResolvedValue(value: TReturn): JestMockFn>, - /** - * Sugar for jest.fn().mockImplementationOnce(() => Promise.resolve(value)) - */ - mockResolvedValueOnce(value: TReturn): JestMockFn>, - /** - * Sugar for jest.fn().mockImplementation(() => Promise.reject(value)) - */ - mockRejectedValue(value: TReturn): JestMockFn>, - /** - * Sugar for jest.fn().mockImplementationOnce(() => Promise.reject(value)) - */ - mockRejectedValueOnce(value: TReturn): JestMockFn> -}; - -type JestAsymmetricEqualityType = { - /** - * A custom Jasmine equality tester - */ - asymmetricMatch(value: mixed): boolean -}; - -type JestCallsType = { - allArgs(): mixed, - all(): mixed, - any(): boolean, - count(): number, - first(): mixed, - mostRecent(): mixed, - reset(): void -}; - -type JestClockType = { - install(): void, - mockDate(date: Date): void, - tick(milliseconds?: number): void, - uninstall(): void -}; - -type JestMatcherResult = { - message?: string | (() => string), - pass: boolean -}; - -type JestMatcher = (actual: any, expected: any) => - | JestMatcherResult - | Promise; - -type JestPromiseType = { - /** - * Use rejects to unwrap the reason of a rejected promise so any other - * matcher can be chained. If the promise is fulfilled the assertion fails. - */ - rejects: JestExpectType, - /** - * Use resolves to unwrap the value of a fulfilled promise so any other - * matcher can be chained. If the promise is rejected the assertion fails. - */ - resolves: JestExpectType -}; - -/** - * Jest allows functions and classes to be used as test names in test() and - * describe() - */ -type JestTestName = string | Function; - -/** - * Plugin: jest-styled-components - */ - -type JestStyledComponentsMatcherValue = - | string - | JestAsymmetricEqualityType - | RegExp - | typeof undefined; - -type JestStyledComponentsMatcherOptions = { - media?: string; - modifier?: string; - supports?: string; -} - -type JestStyledComponentsMatchersType = { - toHaveStyleRule( - property: string, - value: JestStyledComponentsMatcherValue, - options?: JestStyledComponentsMatcherOptions - ): void, -}; - -/** - * Plugin: jest-enzyme - */ -type EnzymeMatchersType = { - toBeChecked(): void, - toBeDisabled(): void, - toBeEmpty(): void, - toBeEmptyRender(): void, - toBePresent(): void, - toContainReact(element: React$Element): void, - toExist(): void, - toHaveClassName(className: string): void, - toHaveHTML(html: string): void, - toHaveProp: ((propKey: string, propValue?: any) => void) & ((props: Object) => void), - toHaveRef(refName: string): void, - toHaveState: ((stateKey: string, stateValue?: any) => void) & ((state: Object) => void), - toHaveStyle: ((styleKey: string, styleValue?: any) => void) & ((style: Object) => void), - toHaveTagName(tagName: string): void, - toHaveText(text: string): void, - toIncludeText(text: string): void, - toHaveValue(value: any): void, - toMatchElement(element: React$Element): void, - toMatchSelector(selector: string): void -}; - -// DOM testing library extensions https://github.com/kentcdodds/dom-testing-library#custom-jest-matchers -type DomTestingLibraryType = { - toBeInTheDOM(): void, - toHaveTextContent(content: string): void, - toHaveAttribute(name: string, expectedValue?: string): void -}; - -// Jest JQuery Matchers: https://github.com/unindented/custom-jquery-matchers -type JestJQueryMatchersType = { - toExist(): void, - toHaveLength(len: number): void, - toHaveId(id: string): void, - toHaveClass(className: string): void, - toHaveTag(tag: string): void, - toHaveAttr(key: string, val?: any): void, - toHaveProp(key: string, val?: any): void, - toHaveText(text: string | RegExp): void, - toHaveData(key: string, val?: any): void, - toHaveValue(val: any): void, - toHaveCss(css: {[key: string]: any}): void, - toBeChecked(): void, - toBeDisabled(): void, - toBeEmpty(): void, - toBeHidden(): void, - toBeSelected(): void, - toBeVisible(): void, - toBeFocused(): void, - toBeInDom(): void, - toBeMatchedBy(sel: string): void, - toHaveDescendant(sel: string): void, - toHaveDescendantWithText(sel: string, text: string | RegExp): void -}; - - -// Jest Extended Matchers: https://github.com/jest-community/jest-extended -type JestExtendedMatchersType = { - /** - * Note: Currently unimplemented - * Passing assertion - * - * @param {String} message - */ - // pass(message: string): void; - - /** - * Note: Currently unimplemented - * Failing assertion - * - * @param {String} message - */ - // fail(message: string): void; - - /** - * Use .toBeEmpty when checking if a String '', Array [] or Object {} is empty. - */ - toBeEmpty(): void; - - /** - * Use .toBeOneOf when checking if a value is a member of a given Array. - * @param {Array.<*>} members - */ - toBeOneOf(members: any[]): void; - - /** - * Use `.toBeNil` when checking a value is `null` or `undefined`. - */ - toBeNil(): void; - - /** - * Use `.toSatisfy` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean`. - * @param {Function} predicate - */ - toSatisfy(predicate: (n: any) => boolean): void; - - /** - * Use `.toBeArray` when checking if a value is an `Array`. - */ - toBeArray(): void; - - /** - * Use `.toBeArrayOfSize` when checking if a value is an `Array` of size x. - * @param {Number} x - */ - toBeArrayOfSize(x: number): void; - - /** - * Use `.toIncludeAllMembers` when checking if an `Array` contains all of the same members of a given set. - * @param {Array.<*>} members - */ - toIncludeAllMembers(members: any[]): void; - - /** - * Use `.toIncludeAnyMembers` when checking if an `Array` contains any of the members of a given set. - * @param {Array.<*>} members - */ - toIncludeAnyMembers(members: any[]): void; - - /** - * Use `.toSatisfyAll` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean` for all values in an array. - * @param {Function} predicate - */ - toSatisfyAll(predicate: (n: any) => boolean): void; - - /** - * Use `.toBeBoolean` when checking if a value is a `Boolean`. - */ - toBeBoolean(): void; - - /** - * Use `.toBeTrue` when checking a value is equal (===) to `true`. - */ - toBeTrue(): void; - - /** - * Use `.toBeFalse` when checking a value is equal (===) to `false`. - */ - toBeFalse(): void; - - /** - * Use .toBeDate when checking if a value is a Date. - */ - toBeDate(): void; - - /** - * Use `.toBeFunction` when checking if a value is a `Function`. - */ - toBeFunction(): void; - - /** - * Use `.toHaveBeenCalledBefore` when checking if a `Mock` was called before another `Mock`. - * - * Note: Required Jest version >22 - * Note: Your mock functions will have to be asynchronous to cause the timestamps inside of Jest to occur in a differentJS event loop, otherwise the mock timestamps will all be the same - * - * @param {Mock} mock - */ - toHaveBeenCalledBefore(mock: JestMockFn): void; - - /** - * Use `.toBeNumber` when checking if a value is a `Number`. - */ - toBeNumber(): void; - - /** - * Use `.toBeNaN` when checking a value is `NaN`. - */ - toBeNaN(): void; - - /** - * Use `.toBeFinite` when checking if a value is a `Number`, not `NaN` or `Infinity`. - */ - toBeFinite(): void; - - /** - * Use `.toBePositive` when checking if a value is a positive `Number`. - */ - toBePositive(): void; - - /** - * Use `.toBeNegative` when checking if a value is a negative `Number`. - */ - toBeNegative(): void; - - /** - * Use `.toBeEven` when checking if a value is an even `Number`. - */ - toBeEven(): void; - - /** - * Use `.toBeOdd` when checking if a value is an odd `Number`. - */ - toBeOdd(): void; - - /** - * Use `.toBeWithin` when checking if a number is in between the given bounds of: start (inclusive) and end (exclusive). - * - * @param {Number} start - * @param {Number} end - */ - toBeWithin(start: number, end: number): void; - - /** - * Use `.toBeObject` when checking if a value is an `Object`. - */ - toBeObject(): void; - - /** - * Use `.toContainKey` when checking if an object contains the provided key. - * - * @param {String} key - */ - toContainKey(key: string): void; - - /** - * Use `.toContainKeys` when checking if an object has all of the provided keys. - * - * @param {Array.} keys - */ - toContainKeys(keys: string[]): void; - - /** - * Use `.toContainAllKeys` when checking if an object only contains all of the provided keys. - * - * @param {Array.} keys - */ - toContainAllKeys(keys: string[]): void; - - /** - * Use `.toContainAnyKeys` when checking if an object contains at least one of the provided keys. - * - * @param {Array.} keys - */ - toContainAnyKeys(keys: string[]): void; - - /** - * Use `.toContainValue` when checking if an object contains the provided value. - * - * @param {*} value - */ - toContainValue(value: any): void; - - /** - * Use `.toContainValues` when checking if an object contains all of the provided values. - * - * @param {Array.<*>} values - */ - toContainValues(values: any[]): void; - - /** - * Use `.toContainAllValues` when checking if an object only contains all of the provided values. - * - * @param {Array.<*>} values - */ - toContainAllValues(values: any[]): void; - - /** - * Use `.toContainAnyValues` when checking if an object contains at least one of the provided values. - * - * @param {Array.<*>} values - */ - toContainAnyValues(values: any[]): void; - - /** - * Use `.toContainEntry` when checking if an object contains the provided entry. - * - * @param {Array.} entry - */ - toContainEntry(entry: [string, string]): void; - - /** - * Use `.toContainEntries` when checking if an object contains all of the provided entries. - * - * @param {Array.>} entries - */ - toContainEntries(entries: [string, string][]): void; - - /** - * Use `.toContainAllEntries` when checking if an object only contains all of the provided entries. - * - * @param {Array.>} entries - */ - toContainAllEntries(entries: [string, string][]): void; - - /** - * Use `.toContainAnyEntries` when checking if an object contains at least one of the provided entries. - * - * @param {Array.>} entries - */ - toContainAnyEntries(entries: [string, string][]): void; - - /** - * Use `.toBeExtensible` when checking if an object is extensible. - */ - toBeExtensible(): void; - - /** - * Use `.toBeFrozen` when checking if an object is frozen. - */ - toBeFrozen(): void; - - /** - * Use `.toBeSealed` when checking if an object is sealed. - */ - toBeSealed(): void; - - /** - * Use `.toBeString` when checking if a value is a `String`. - */ - toBeString(): void; - - /** - * Use `.toEqualCaseInsensitive` when checking if a string is equal (===) to another ignoring the casing of both strings. - * - * @param {String} string - */ - toEqualCaseInsensitive(string: string): void; - - /** - * Use `.toStartWith` when checking if a `String` starts with a given `String` prefix. - * - * @param {String} prefix - */ - toStartWith(prefix: string): void; - - /** - * Use `.toEndWith` when checking if a `String` ends with a given `String` suffix. - * - * @param {String} suffix - */ - toEndWith(suffix: string): void; - - /** - * Use `.toInclude` when checking if a `String` includes the given `String` substring. - * - * @param {String} substring - */ - toInclude(substring: string): void; - - /** - * Use `.toIncludeRepeated` when checking if a `String` includes the given `String` substring the correct number of times. - * - * @param {String} substring - * @param {Number} times - */ - toIncludeRepeated(substring: string, times: number): void; - - /** - * Use `.toIncludeMultiple` when checking if a `String` includes all of the given substrings. - * - * @param {Array.} substring - */ - toIncludeMultiple(substring: string[]): void; -}; - -interface JestExpectType { - not: - & JestExpectType - & EnzymeMatchersType - & DomTestingLibraryType - & JestJQueryMatchersType - & JestStyledComponentsMatchersType - & JestExtendedMatchersType, - /** - * If you have a mock function, you can use .lastCalledWith to test what - * arguments it was last called with. - */ - lastCalledWith(...args: Array): void, - /** - * toBe just checks that a value is what you expect. It uses === to check - * strict equality. - */ - toBe(value: any): void, - /** - * Use .toBeCalledWith to ensure that a mock function was called with - * specific arguments. - */ - toBeCalledWith(...args: Array): void, - /** - * Using exact equality with floating point numbers is a bad idea. Rounding - * means that intuitive things fail. - */ - toBeCloseTo(num: number, delta: any): void, - /** - * Use .toBeDefined to check that a variable is not undefined. - */ - toBeDefined(): void, - /** - * Use .toBeFalsy when you don't care what a value is, you just want to - * ensure a value is false in a boolean context. - */ - toBeFalsy(): void, - /** - * To compare floating point numbers, you can use toBeGreaterThan. - */ - toBeGreaterThan(number: number): void, - /** - * To compare floating point numbers, you can use toBeGreaterThanOrEqual. - */ - toBeGreaterThanOrEqual(number: number): void, - /** - * To compare floating point numbers, you can use toBeLessThan. - */ - toBeLessThan(number: number): void, - /** - * To compare floating point numbers, you can use toBeLessThanOrEqual. - */ - toBeLessThanOrEqual(number: number): void, - /** - * Use .toBeInstanceOf(Class) to check that an object is an instance of a - * class. - */ - toBeInstanceOf(cls: Class<*>): void, - /** - * .toBeNull() is the same as .toBe(null) but the error messages are a bit - * nicer. - */ - toBeNull(): void, - /** - * Use .toBeTruthy when you don't care what a value is, you just want to - * ensure a value is true in a boolean context. - */ - toBeTruthy(): void, - /** - * Use .toBeUndefined to check that a variable is undefined. - */ - toBeUndefined(): void, - /** - * Use .toContain when you want to check that an item is in a list. For - * testing the items in the list, this uses ===, a strict equality check. - */ - toContain(item: any): void, - /** - * Use .toContainEqual when you want to check that an item is in a list. For - * testing the items in the list, this matcher recursively checks the - * equality of all fields, rather than checking for object identity. - */ - toContainEqual(item: any): void, - /** - * Use .toEqual when you want to check that two objects have the same value. - * This matcher recursively checks the equality of all fields, rather than - * checking for object identity. - */ - toEqual(value: any): void, - /** - * Use .toHaveBeenCalled to ensure that a mock function got called. - */ - toHaveBeenCalled(): void, - toBeCalled(): void; - /** - * Use .toHaveBeenCalledTimes to ensure that a mock function got called exact - * number of times. - */ - toHaveBeenCalledTimes(number: number): void, - toBeCalledTimes(number: number): void; - /** - * - */ - toHaveBeenNthCalledWith(nthCall: number, ...args: Array): void; - nthCalledWith(nthCall: number, ...args: Array): void; - /** - * - */ - toHaveReturned(): void; - toReturn(): void; - /** - * - */ - toHaveReturnedTimes(number: number): void; - toReturnTimes(number: number): void; - /** - * - */ - toHaveReturnedWith(value: any): void; - toReturnWith(value: any): void; - /** - * - */ - toHaveLastReturnedWith(value: any): void; - lastReturnedWith(value: any): void; - /** - * - */ - toHaveNthReturnedWith(nthCall: number, value: any): void; - nthReturnedWith(nthCall: number, value: any): void; - /** - * Use .toHaveBeenCalledWith to ensure that a mock function was called with - * specific arguments. - */ - toHaveBeenCalledWith(...args: Array): void, - toBeCalledWith(...args: Array): void, - /** - * Use .toHaveBeenLastCalledWith to ensure that a mock function was last called - * with specific arguments. - */ - toHaveBeenLastCalledWith(...args: Array): void, - lastCalledWith(...args: Array): void, - /** - * Check that an object has a .length property and it is set to a certain - * numeric value. - */ - toHaveLength(number: number): void, - /** - * - */ - toHaveProperty(propPath: string, value?: any): void, - /** - * Use .toMatch to check that a string matches a regular expression or string. - */ - toMatch(regexpOrString: RegExp | string): void, - /** - * Use .toMatchObject to check that a javascript object matches a subset of the properties of an object. - */ - toMatchObject(object: Object | Array): void, - /** - * Use .toStrictEqual to check that a javascript object matches a subset of the properties of an object. - */ - toStrictEqual(value: any): void, - /** - * This ensures that an Object matches the most recent snapshot. - */ - toMatchSnapshot(propertyMatchers?: {[key: string]: JestAsymmetricEqualityType}, name?: string): void, - /** - * This ensures that an Object matches the most recent snapshot. - */ - toMatchSnapshot(name: string): void, - - toMatchInlineSnapshot(snapshot?: string): void, - toMatchInlineSnapshot(propertyMatchers?: {[key: string]: JestAsymmetricEqualityType}, snapshot?: string): void, - /** - * Use .toThrow to test that a function throws when it is called. - * If you want to test that a specific error gets thrown, you can provide an - * argument to toThrow. The argument can be a string for the error message, - * a class for the error, or a regex that should match the error. - * - * Alias: .toThrowError - */ - toThrow(message?: string | Error | Class | RegExp): void, - toThrowError(message?: string | Error | Class | RegExp): void, - /** - * Use .toThrowErrorMatchingSnapshot to test that a function throws a error - * matching the most recent snapshot when it is called. - */ - toThrowErrorMatchingSnapshot(): void, - toThrowErrorMatchingInlineSnapshot(snapshot?: string): void, -} - -type JestObjectType = { - /** - * Disables automatic mocking in the module loader. - * - * After this method is called, all `require()`s will return the real - * versions of each module (rather than a mocked version). - */ - disableAutomock(): JestObjectType, - /** - * An un-hoisted version of disableAutomock - */ - autoMockOff(): JestObjectType, - /** - * Enables automatic mocking in the module loader. - */ - enableAutomock(): JestObjectType, - /** - * An un-hoisted version of enableAutomock - */ - autoMockOn(): JestObjectType, - /** - * Clears the mock.calls and mock.instances properties of all mocks. - * Equivalent to calling .mockClear() on every mocked function. - */ - clearAllMocks(): JestObjectType, - /** - * Resets the state of all mocks. Equivalent to calling .mockReset() on every - * mocked function. - */ - resetAllMocks(): JestObjectType, - /** - * Restores all mocks back to their original value. - */ - restoreAllMocks(): JestObjectType, - /** - * Removes any pending timers from the timer system. - */ - clearAllTimers(): void, - /** - * The same as `mock` but not moved to the top of the expectation by - * babel-jest. - */ - doMock(moduleName: string, moduleFactory?: any): JestObjectType, - /** - * The same as `unmock` but not moved to the top of the expectation by - * babel-jest. - */ - dontMock(moduleName: string): JestObjectType, - /** - * Returns a new, unused mock function. Optionally takes a mock - * implementation. - */ - fn, TReturn>( - implementation?: (...args: TArguments) => TReturn - ): JestMockFn, - /** - * Determines if the given function is a mocked function. - */ - isMockFunction(fn: Function): boolean, - /** - * Given the name of a module, use the automatic mocking system to generate a - * mocked version of the module for you. - */ - genMockFromModule(moduleName: string): any, - /** - * Mocks a module with an auto-mocked version when it is being required. - * - * The second argument can be used to specify an explicit module factory that - * is being run instead of using Jest's automocking feature. - * - * The third argument can be used to create virtual mocks -- mocks of modules - * that don't exist anywhere in the system. - */ - mock( - moduleName: string, - moduleFactory?: any, - options?: Object - ): 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, - /** - * Returns a mock module instead of the actual module, bypassing all checks - * on whether the module should be required normally or not. - */ - requireMock(moduleName: string): any, - /** - * Resets the module registry - the cache of all required modules. This is - * useful to isolate modules where local state might conflict between tests. - */ - resetModules(): JestObjectType, - /** - * Exhausts the micro-task queue (usually interfaced in node via - * process.nextTick). - */ - runAllTicks(): void, - /** - * Exhausts the macro-task queue (i.e., all tasks queued by setTimeout(), - * setInterval(), and setImmediate()). - */ - runAllTimers(): void, - /** - * Exhausts all tasks queued by setImmediate(). - */ - runAllImmediates(): void, - /** - * Executes only the macro task queue (i.e. all tasks queued by setTimeout() - * or setInterval() and setImmediate()). - */ - advanceTimersByTime(msToRun: number): void, - /** - * Executes only the macro task queue (i.e. all tasks queued by setTimeout() - * or setInterval() and setImmediate()). - * - * Renamed to `advanceTimersByTime`. - */ - runTimersToTime(msToRun: number): void, - /** - * Executes only the macro-tasks that are currently pending (i.e., only the - * tasks that have been queued by setTimeout() or setInterval() up to this - * point) - */ - runOnlyPendingTimers(): void, - /** - * Explicitly supplies the mock object that the module system should return - * for the specified module. Note: It is recommended to use jest.mock() - * instead. - */ - setMock(moduleName: string, moduleExports: any): JestObjectType, - /** - * Indicates that the module system should never return a mocked version of - * the specified module from require() (e.g. that it should always return the - * real module). - */ - unmock(moduleName: string): JestObjectType, - /** - * Instructs Jest to use fake versions of the standard timer functions - * (setTimeout, setInterval, clearTimeout, clearInterval, nextTick, - * setImmediate and clearImmediate). - */ - useFakeTimers(): JestObjectType, - /** - * Instructs Jest to use the real versions of the standard timer functions. - */ - useRealTimers(): JestObjectType, - /** - * Creates a mock function similar to jest.fn but also tracks calls to - * object[methodName]. - */ - spyOn(object: Object, methodName: string, accessType?: "get" | "set"): JestMockFn, - /** - * Set the default timeout interval for tests and before/after hooks in milliseconds. - * Note: The default timeout interval is 5 seconds if this method is not called. - */ - setTimeout(timeout: number): JestObjectType -}; - -type JestSpyType = { - calls: JestCallsType -}; - -/** Runs this function after every test inside this context */ -declare function afterEach( - fn: (done: () => void) => ?Promise, - timeout?: number -): void; -/** Runs this function before every test inside this context */ -declare function beforeEach( - fn: (done: () => void) => ?Promise, - timeout?: number -): void; -/** Runs this function after all tests have finished inside this context */ -declare function afterAll( - fn: (done: () => void) => ?Promise, - timeout?: number -): void; -/** Runs this function before any tests have started inside this context */ -declare function beforeAll( - fn: (done: () => void) => ?Promise, - timeout?: number -): void; - -/** A context for grouping tests together */ -declare var describe: { - /** - * Creates a block that groups together several related tests in one "test suite" - */ - (name: JestTestName, fn: () => void): void, - - /** - * Only run this describe block - */ - only(name: JestTestName, fn: () => void): void, - - /** - * Skip running this describe block - */ - skip(name: JestTestName, fn: () => void): void, - - /** - * each runs this test against array of argument arrays per each run - * - * @param {table} table of Test - */ - each( - table: Array | mixed> - ): ( - name: JestTestName, - fn?: (...args: Array) => ?Promise - ) => void, -}; - -/** An individual test unit */ -declare var it: { - /** - * An individual test unit - * - * @param {JestTestName} Name of Test - * @param {Function} Test - * @param {number} Timeout for the test, in milliseconds. - */ - ( - name: JestTestName, - fn?: (done: () => void) => ?Promise, - timeout?: number - ): void, - /** - * each runs this test against array of argument arrays per each run - * - * @param {table} table of Test - */ - each( - table: Array | mixed> - ): ( - name: JestTestName, - fn?: (...args: Array) => ?Promise - ) => void, - /** - * Only run this test - * - * @param {JestTestName} Name of Test - * @param {Function} Test - * @param {number} Timeout for the test, in milliseconds. - */ - only( - name: JestTestName, - fn?: (done: () => void) => ?Promise, - timeout?: number - ): { - each( - table: Array | mixed> - ): ( - name: JestTestName, - fn?: (...args: Array) => ?Promise - ) => void, - }, - /** - * Skip running this test - * - * @param {JestTestName} Name of Test - * @param {Function} Test - * @param {number} Timeout for the test, in milliseconds. - */ - skip( - name: JestTestName, - fn?: (done: () => void) => ?Promise, - timeout?: number - ): void, - /** - * Run the test concurrently - * - * @param {JestTestName} Name of Test - * @param {Function} Test - * @param {number} Timeout for the test, in milliseconds. - */ - concurrent( - name: JestTestName, - fn?: (done: () => void) => ?Promise, - timeout?: number - ): void, - /** - * each runs this test against array of argument arrays per each run - * - * @param {table} table of Test - */ - each( - table: Array | mixed> - ): ( - name: JestTestName, - fn?: (...args: Array) => ?Promise - ) => void, -}; -declare function fit( - name: JestTestName, - fn: (done: () => void) => ?Promise, - timeout?: number -): void; -/** An individual test unit */ -declare var test: typeof it; -/** A disabled group of tests */ -declare var xdescribe: typeof describe; -/** A focused group of tests */ -declare var fdescribe: typeof describe; -/** A disabled individual test */ -declare var xit: typeof it; -/** A disabled individual test */ -declare var xtest: typeof it; - -type JestPrettyFormatColors = { - comment: { close: string, open: string }, - content: { close: string, open: string }, - prop: { close: string, open: string }, - tag: { close: string, open: string }, - value: { close: string, open: string }, -}; - -type JestPrettyFormatIndent = string => string; -type JestPrettyFormatRefs = Array; -type JestPrettyFormatPrint = any => string; -type JestPrettyFormatStringOrNull = string | null; - -type JestPrettyFormatOptions = {| - callToJSON: boolean, - edgeSpacing: string, - escapeRegex: boolean, - highlight: boolean, - indent: number, - maxDepth: number, - min: boolean, - plugins: JestPrettyFormatPlugins, - printFunctionName: boolean, - spacing: string, - theme: {| - comment: string, - content: string, - prop: string, - tag: string, - value: string, - |}, -|}; - -type JestPrettyFormatPlugin = { - print: ( - val: any, - serialize: JestPrettyFormatPrint, - indent: JestPrettyFormatIndent, - opts: JestPrettyFormatOptions, - colors: JestPrettyFormatColors, - ) => string, - test: any => boolean, -}; - -type JestPrettyFormatPlugins = Array; - -/** The expect function is used every time you want to test a value */ -declare var expect: { - /** The object that you want to make assertions against */ - (value: any): - & JestExpectType - & JestPromiseType - & EnzymeMatchersType - & DomTestingLibraryType - & JestJQueryMatchersType - & JestStyledComponentsMatchersType - & JestExtendedMatchersType, - - /** Add additional Jasmine matchers to Jest's roster */ - extend(matchers: { [name: string]: JestMatcher }): void, - /** Add a module that formats application-specific data structures. */ - addSnapshotSerializer(pluginModule: JestPrettyFormatPlugin): void, - assertions(expectedAssertions: number): void, - hasAssertions(): void, - any(value: mixed): JestAsymmetricEqualityType, - anything(): any, - arrayContaining(value: Array): Array, - objectContaining(value: Object): Object, - /** Matches any received string that contains the exact expected string. */ - stringContaining(value: string): string, - stringMatching(value: string | RegExp): string, - not: { - arrayContaining: (value: $ReadOnlyArray) => Array, - objectContaining: (value: {}) => Object, - stringContaining: (value: string) => string, - stringMatching: (value: string | RegExp) => string, - }, -}; - -// TODO handle return type -// http://jasmine.github.io/2.4/introduction.html#section-Spies -declare function spyOn(value: mixed, method: string): Object; - -/** Holds all functions related to manipulating test runner */ -declare var jest: JestObjectType; - -/** - * The global Jasmine object, this is generally not exposed as the public API, - * using features inside here could break in later versions of Jest. - */ -declare var jasmine: { - DEFAULT_TIMEOUT_INTERVAL: number, - any(value: mixed): JestAsymmetricEqualityType, - anything(): any, - arrayContaining(value: Array): Array, - clock(): JestClockType, - createSpy(name: string): JestSpyType, - createSpyObj( - baseName: string, - methodNames: Array - ): { [methodName: string]: JestSpyType }, - objectContaining(value: Object): Object, - stringMatching(value: string): string -}; diff --git a/flow-typed/npm/js-yaml_v3.x.x.js b/flow-typed/npm/js-yaml_v3.x.x.js deleted file mode 100644 index dff308ae48..0000000000 --- a/flow-typed/npm/js-yaml_v3.x.x.js +++ /dev/null @@ -1,105 +0,0 @@ -// flow-typed signature: cdd8c6c40f61e60f34afae4890cab4f8 -// flow-typed version: 2c39d1a098/js-yaml_v3.x.x/flow_>=v0.75.x - -declare module 'js-yaml' { - - declare type Kind = 'sequence' | 'scalar' | 'mapping'; - - declare type DumpOptions = {| - indent?: number, - skipInvalid?: boolean, - flowLevel?: number, - styles?: {[string]: any}, - schema?: Schema, - sortKeys?: boolean | ((a: any, b: any) => number), - lineWidth?: number, - noRefs?: boolean, - noCompatMode?: boolean, - condenseFlow?: boolean, - |}; - - declare type LoadOptions = {| - filename?: string, - strict?: boolean, - schema?: Schema, - json?: boolean, - |}; - - declare type SchemaDefinition = {| - implicit?: Array, - explicit?: Array, - include?: Array, - |}; - - declare type TypeConstructorOptions = {| - kind?: Kind, - resolve?: (data: any) => boolean, - construct?: (data: any) => any, - instanceOf?: Object, - predicate?: string, - represent?: ((data: Object) => any) | {[string]: (data: Object) => any}, - defaultStyle?: string, - styleAliases?: {[string]: any}, - |}; - - declare class Schema { // implements SchemaDefinition - static DEFAULT: ?Schema; - - implicit: Array; - explicit: Array; - include: Array; - - compiledImplicit: Array; - compiledExplicit: Array; - compiledTypeMap: {[Kind | 'fallback']: {[string]: Type}}; - - constructor(definition: SchemaDefinition): this; - - static create(types: Array | Type): Schema; - static create(schemas: Array | Schema, types: Array | Type): Schema; - } - - declare class Type { - tag: string; - kind: Kind; - instanceOf: ?Object; - predicate: ?string; - represent: ((data: Object) => any) | {[string]: (data: Object) => any} | null; - defaultStyle: ?string; - styleAliases: {[string]: any}; - - constructor(tag: string, opts?: TypeConstructorOptions): this; - - resolve(data: any): boolean; - - construct(data: any): any; - } - - declare class YAMLException extends Error { - constructor(reason?: any, mark?: any): this; - - toString(compact?: boolean): string; - } - - declare var CORE_SCHEMA: Schema; - declare var DEFAULT_FULL_SCHEMA: Schema; - declare var DEFAULT_SAFE_SCHEMA: Schema; - declare var FAILSAFE_SCHEMA: Schema; - declare var JSON_SCHEMA: Schema; - declare var MINIMAL_SCHEMA: Schema; - declare var SAFE_SCHEMA: Schema; - - declare function load(input: string, opts?: LoadOptions): mixed; - - declare function safeLoad(input: string, opts?: LoadOptions): mixed; - - declare function loadAll(input: string, output?: void | null, opts?: LoadOptions): Array; - declare function loadAll(input: string, output: (doc: mixed) => void, opts?: LoadOptions): void; - - declare function safeLoadAll(input: string, output?: void | null, opts?: LoadOptions): Array; - declare function safeLoadAll(input: string, output: (doc: mixed) => void, opts?: LoadOptions): void; - - declare function dump(input: mixed, opts?: DumpOptions): string; - - declare function safeDump(input: mixed, opts?: DumpOptions): string; -} diff --git a/flow-typed/npm/json-loader_vx.x.x.js b/flow-typed/npm/json-loader_vx.x.x.js deleted file mode 100644 index 5062925262..0000000000 --- a/flow-typed/npm/json-loader_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 4b532ef755f117d31a8cd0da3c520468 -// flow-typed version: <>/json-loader_v0.5.7/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'json-loader' - * - * 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 'json-loader' { - declare module.exports: any; -} diff --git a/flow-typed/npm/junk_vx.x.x.js b/flow-typed/npm/junk_vx.x.x.js deleted file mode 100644 index f5918f23f5..0000000000 --- a/flow-typed/npm/junk_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: bd345edf10e36bf0b3a8afc475b3ce0b -// flow-typed version: <>/junk_v^2.1.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'junk' - * - * 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 'junk' { - declare module.exports: any; -} diff --git a/flow-typed/npm/keymage_vx.x.x.js b/flow-typed/npm/keymage_vx.x.x.js deleted file mode 100644 index 54add31cb5..0000000000 --- a/flow-typed/npm/keymage_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: a696e5bd10301b6e82dbcca3e2032434 -// flow-typed version: <>/keymage_v^1.1.3/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'keymage' - * - * 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 'keymage' { - declare module.exports: any; -} diff --git a/flow-typed/npm/keyv-file_vx.x.x.js b/flow-typed/npm/keyv-file_vx.x.x.js deleted file mode 100644 index 4689842b99..0000000000 --- a/flow-typed/npm/keyv-file_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: a9f71b49963378a763655a57ee7654be -// flow-typed version: <>/keyv-file_v^0.1.7/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'keyv-file' - * - * 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 'keyv-file' { - declare module.exports: any; -} diff --git a/flow-typed/npm/keyv_vx.x.x.js b/flow-typed/npm/keyv_vx.x.x.js deleted file mode 100644 index 19d61d807c..0000000000 --- a/flow-typed/npm/keyv_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: aecb493bab94527bb5bef71f6726be6b -// flow-typed version: <>/keyv_v^3.1.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'keyv' - * - * 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 'keyv' { - declare module.exports: any; -} diff --git a/flow-typed/npm/listify_vx.x.x.js b/flow-typed/npm/listify_vx.x.x.js deleted file mode 100644 index 6eb71e93b3..0000000000 --- a/flow-typed/npm/listify_vx.x.x.js +++ /dev/null @@ -1,6 +0,0 @@ -// flow-typed signature: ef98ae4db4a86893864fb266f6f9a1a1 -// flow-typed version: <>/listify_v1.0.0/flow_v0.64.0 - -declare module 'listify' { - declare export default function listify(Array, ?{oxfordComma: boolean}): string; -} diff --git a/flow-typed/npm/lodash_v4.x.x.js b/flow-typed/npm/lodash_v4.x.x.js deleted file mode 100644 index 9409e8f965..0000000000 --- a/flow-typed/npm/lodash_v4.x.x.js +++ /dev/null @@ -1,5991 +0,0 @@ -// flow-typed signature: a92d2e79ac5021aaa04dddec79550f33 -// flow-typed version: 59ae0c795e/lodash_v4.x.x/flow_>=v0.63.x - -declare module "lodash" { - declare type __CurriedFunction1 = (...r: [AA]) => R; - declare type CurriedFunction1 = __CurriedFunction1; - - declare type __CurriedFunction2 = (( - ...r: [AA] - ) => CurriedFunction1) & - ((...r: [AA, BB]) => R); - declare type CurriedFunction2 = __CurriedFunction2; - - declare type __CurriedFunction3 = (( - ...r: [AA] - ) => CurriedFunction2) & - ((...r: [AA, BB]) => CurriedFunction1) & - ((...r: [AA, BB, CC]) => R); - declare type CurriedFunction3 = __CurriedFunction3< - A, - B, - C, - R, - *, - *, - * - >; - - declare type __CurriedFunction4< - A, - B, - C, - D, - R, - AA: A, - BB: B, - CC: C, - DD: D - > = ((...r: [AA]) => CurriedFunction3) & - ((...r: [AA, BB]) => CurriedFunction2) & - ((...r: [AA, BB, CC]) => CurriedFunction1) & - ((...r: [AA, BB, CC, DD]) => R); - declare type CurriedFunction4 = __CurriedFunction4< - A, - B, - C, - D, - R, - *, - *, - *, - * - >; - - declare type __CurriedFunction5< - A, - B, - C, - D, - E, - R, - AA: A, - BB: B, - CC: C, - DD: D, - EE: E - > = ((...r: [AA]) => CurriedFunction4) & - ((...r: [AA, BB]) => CurriedFunction3) & - ((...r: [AA, BB, CC]) => CurriedFunction2) & - ((...r: [AA, BB, CC, DD]) => CurriedFunction1) & - ((...r: [AA, BB, CC, DD, EE]) => R); - declare type CurriedFunction5 = __CurriedFunction5< - A, - B, - C, - D, - E, - R, - *, - *, - *, - *, - * - >; - - declare type __CurriedFunction6< - A, - B, - C, - D, - E, - F, - R, - AA: A, - BB: B, - CC: C, - DD: D, - EE: E, - FF: F - > = ((...r: [AA]) => CurriedFunction5) & - ((...r: [AA, BB]) => CurriedFunction4) & - ((...r: [AA, BB, CC]) => CurriedFunction3) & - ((...r: [AA, BB, CC, DD]) => CurriedFunction2) & - ((...r: [AA, BB, CC, DD, EE]) => CurriedFunction1) & - ((...r: [AA, BB, CC, DD, EE, FF]) => R); - declare type CurriedFunction6 = __CurriedFunction6< - A, - B, - C, - D, - E, - F, - R, - *, - *, - *, - *, - *, - * - >; - - declare type Curry = (((...r: [A]) => R) => CurriedFunction1) & - (((...r: [A, B]) => R) => CurriedFunction2) & - (((...r: [A, B, C]) => R) => CurriedFunction3) & - (( - (...r: [A, B, C, D]) => R - ) => CurriedFunction4) & - (( - (...r: [A, B, C, D, E]) => R - ) => CurriedFunction5) & - (( - (...r: [A, B, C, D, E, F]) => R - ) => CurriedFunction6); - - declare type UnaryFn = (a: A) => R; - - declare type TemplateSettings = { - escape?: RegExp, - evaluate?: RegExp, - imports?: Object, - interpolate?: RegExp, - variable?: string - }; - - declare type TruncateOptions = { - length?: number, - omission?: string, - separator?: RegExp | string - }; - - declare type DebounceOptions = { - leading?: boolean, - maxWait?: number, - trailing?: boolean - }; - - declare type ThrottleOptions = { - leading?: boolean, - trailing?: boolean - }; - - declare type NestedArray = Array>; - - declare type matchesIterateeShorthand = Object; - declare type matchesPropertyIterateeShorthand = [string, any]; - declare type propertyIterateeShorthand = string; - - declare type OPredicate = - | ((value: A, key: string, object: O) => any) - | matchesIterateeShorthand - | matchesPropertyIterateeShorthand - | propertyIterateeShorthand; - - declare type OIterateeWithResult = - | Object - | string - | ((value: V, key: string, object: O) => R); - declare type OIteratee = OIterateeWithResult; - declare type OFlatMapIteratee = OIterateeWithResult>; - - declare type Predicate = - | ((value: T, index: number, array: Array) => any) - | matchesIterateeShorthand - | matchesPropertyIterateeShorthand - | propertyIterateeShorthand; - - declare type _ValueOnlyIteratee = (value: T) => mixed; - declare type ValueOnlyIteratee = _ValueOnlyIteratee | string; - declare type _Iteratee = ( - item: T, - index: number, - array: ?Array - ) => mixed; - declare type Iteratee = _Iteratee | Object | string; - declare type FlatMapIteratee = - | ((item: T, index: number, array: ?$ReadOnlyArray) => Array) - | Object - | string; - declare type Comparator = (item: T, item2: T) => boolean; - - declare type MapIterator = - | ((item: T, index: number, array: Array) => U) - | propertyIterateeShorthand; - - declare type ReadOnlyMapIterator = - | ((item: T, index: number, array: $ReadOnlyArray) => U) - | propertyIterateeShorthand; - - declare type OMapIterator = - | ((item: T, key: string, object: O) => U) - | propertyIterateeShorthand; - - declare class Lodash { - // Array - chunk(array?: ?Array, size?: ?number): Array>; - compact(array?: ?Array): Array; - concat(base?: ?$ReadOnlyArray, ...elements: Array): Array; - difference(array?: ?$ReadOnlyArray, ...values: Array>): Array; - differenceBy( - array?: ?$ReadOnlyArray, - values?: ?$ReadOnlyArray, - iteratee?: ?ValueOnlyIteratee - ): T[]; - differenceWith(array?: ?$ReadOnlyArray, values?: ?$ReadOnlyArray, comparator?: ?Comparator): T[]; - drop(array?: ?Array, n?: ?number): Array; - dropRight(array?: ?Array, n?: ?number): Array; - dropRightWhile(array?: ?Array, predicate?: ?Predicate): Array; - dropWhile(array?: ?Array, predicate?: ?Predicate): Array; - fill( - array?: ?Array, - value?: ?U, - start?: ?number, - end?: ?number - ): Array; - findIndex( - array: $ReadOnlyArray, - predicate?: ?Predicate, - fromIndex?: ?number - ): number; - findIndex( - array: void | null, - predicate?: ?Predicate, - fromIndex?: ?number - ): -1; - findLastIndex( - array: $ReadOnlyArray, - predicate?: ?Predicate, - fromIndex?: ?number - ): number; - findLastIndex( - array: void | null, - predicate?: ?Predicate, - fromIndex?: ?number - ): -1; - // alias of _.head - first(array: ?$ReadOnlyArray): T; - flatten(array?: ?Array | X>): Array; - flattenDeep(array?: ?any[]): Array; - flattenDepth(array?: ?any[], depth?: ?number): any[]; - fromPairs(pairs?: ?Array<[A, B]>): { [key: A]: B }; - head(array: ?$ReadOnlyArray): T; - indexOf(array: Array, value: T, fromIndex?: number): number; - indexOf(array: void | null, value?: ?T, fromIndex?: ?number): -1; - initial(array: ?Array): Array; - intersection(...arrays?: Array<$ReadOnlyArray>): Array; - //Workaround until (...parameter: T, parameter2: U) works - intersectionBy(a1?: ?$ReadOnlyArray, iteratee?: ?ValueOnlyIteratee): Array; - intersectionBy( - a1?: ?$ReadOnlyArray, - a2?: ?$ReadOnlyArray, - iteratee?: ?ValueOnlyIteratee - ): Array; - intersectionBy( - a1?: ?$ReadOnlyArray, - a2?: ?$ReadOnlyArray, - a3?: ?$ReadOnlyArray, - iteratee?: ?ValueOnlyIteratee - ): Array; - intersectionBy( - a1?: ?$ReadOnlyArray, - a2?: ?$ReadOnlyArray, - a3?: ?$ReadOnlyArray, - a4?: ?$ReadOnlyArray, - iteratee?: ?ValueOnlyIteratee - ): Array; - //Workaround until (...parameter: T, parameter2: U) works - intersectionWith(a1?: ?$ReadOnlyArray, comparator?: ?Comparator): Array; - intersectionWith( - a1?: ?$ReadOnlyArray, - a2?: ?$ReadOnlyArray, - comparator?: ?Comparator - ): Array; - intersectionWith( - a1?: ?$ReadOnlyArray, - a2?: ?$ReadOnlyArray, - a3?: ?$ReadOnlyArray, - comparator?: ?Comparator - ): Array; - intersectionWith( - a1?: ?$ReadOnlyArray, - a2?: ?$ReadOnlyArray, - a3?: ?$ReadOnlyArray, - a4?: ?$ReadOnlyArray, - comparator?: ?Comparator - ): Array; - join(array: Array, separator?: ?string): string; - join(array: void | null, separator?: ?string): ''; - last(array: ?$ReadOnlyArray): T; - lastIndexOf(array: Array, value?: ?T, fromIndex?: ?number): number; - lastIndexOf(array: void | null, value?: ?T, fromIndex?: ?number): -1; - nth(array: T[], n?: ?number): T; - nth(array: void | null, n?: ?number): void; - pull(array: Array, ...values?: Array): Array; - pull(array: T, ...values?: Array): T; - pullAll(array: Array, values?: ?Array): Array; - pullAll(array: T, values?: ?Array): T; - pullAllBy( - array: Array, - values?: ?Array, - iteratee?: ?ValueOnlyIteratee - ): Array; - pullAllBy( - array: T, - values?: ?Array, - iteratee?: ?ValueOnlyIteratee - ): T; - pullAllWith(array: T[], values?: ?T[], comparator?: ?Function): T[]; - pullAllWith(array: T, values?: ?Array, comparator?: ?Function): T; - pullAt(array?: ?Array, ...indexed?: Array): Array; - pullAt(array?: ?Array, indexed?: ?Array): Array; - remove(array?: ?Array, predicate?: ?Predicate): Array; - reverse(array: Array): Array; - reverse(array: T): T; - slice(array?: ?$ReadOnlyArray, start?: ?number, end?: ?number): Array; - sortedIndex(array: Array, value: T): number; - sortedIndex(array: void | null, value: ?T): 0; - sortedIndexBy( - array: Array, - value?: ?T, - iteratee?: ?ValueOnlyIteratee - ): number; - sortedIndexBy( - array: void | null, - value?: ?T, - iteratee?: ?ValueOnlyIteratee - ): 0; - sortedIndexOf(array: Array, value: T): number; - sortedIndexOf(array: void | null, value?: ?T): -1; - sortedLastIndex(array: Array, value: T): number; - sortedLastIndex(array: void | null, value?: ?T): 0; - sortedLastIndexBy( - array: Array, - value: T, - iteratee?: ValueOnlyIteratee - ): number; - sortedLastIndexBy( - array: void | null, - value?: ?T, - iteratee?: ?ValueOnlyIteratee - ): 0; - sortedLastIndexOf(array: Array, value: T): number; - sortedLastIndexOf(array: void | null, value?: ?T): -1; - sortedUniq(array?: ?Array): Array; - sortedUniqBy(array?: ?Array, iteratee?: ?(value: T) => mixed): Array; - tail(array?: ?Array): Array; - take(array?: ?Array, n?: ?number): Array; - takeRight(array?: ?Array, n?: ?number): Array; - takeRightWhile(array?: ?Array, predicate?: ?Predicate): Array; - takeWhile(array?: ?Array, predicate?: ?Predicate): Array; - union(...arrays?: Array<$ReadOnlyArray>): Array; - //Workaround until (...parameter: T, parameter2: U) works - unionBy(a1?: ?$ReadOnlyArray, iteratee?: ?ValueOnlyIteratee): Array; - unionBy( - a1?: ?$ReadOnlyArray, - a2: $ReadOnlyArray, - iteratee?: ValueOnlyIteratee - ): Array; - unionBy( - a1: $ReadOnlyArray, - a2: $ReadOnlyArray, - a3: $ReadOnlyArray, - iteratee?: ValueOnlyIteratee - ): Array; - unionBy( - a1: $ReadOnlyArray, - a2: $ReadOnlyArray, - a3: $ReadOnlyArray, - a4: $ReadOnlyArray, - iteratee?: ValueOnlyIteratee - ): Array; - //Workaround until (...parameter: T, parameter2: U) works - unionWith(a1?: ?Array, comparator?: ?Comparator): Array; - unionWith( - a1: $ReadOnlyArray, - a2: $ReadOnlyArray, - comparator?: Comparator - ): Array; - unionWith( - a1: $ReadOnlyArray, - a2: $ReadOnlyArray, - a3: $ReadOnlyArray, - comparator?: Comparator - ): Array; - unionWith( - a1: $ReadOnlyArray, - a2: $ReadOnlyArray, - a3: $ReadOnlyArray, - a4: $ReadOnlyArray, - comparator?: Comparator - ): Array; - uniq(array?: ?Array): Array; - uniqBy(array?: ?Array, iteratee?: ?ValueOnlyIteratee): Array; - uniqWith(array?: ?Array, comparator?: ?Comparator): Array; - unzip(array?: ?Array): Array; - unzipWith(array: ?Array, iteratee?: ?Iteratee): Array; - without(array?: ?$ReadOnlyArray, ...values?: Array): Array; - xor(...array: Array>): Array; - //Workaround until (...parameter: T, parameter2: U) works - xorBy(a1?: ?Array, iteratee?: ?ValueOnlyIteratee): Array; - xorBy( - a1: Array, - a2: Array, - iteratee?: ValueOnlyIteratee - ): Array; - xorBy( - a1: Array, - a2: Array, - a3: Array, - iteratee?: ValueOnlyIteratee - ): Array; - xorBy( - a1: Array, - a2: Array, - a3: Array, - a4: Array, - iteratee?: ValueOnlyIteratee - ): Array; - //Workaround until (...parameter: T, parameter2: U) works - xorWith(a1?: ?Array, comparator?: ?Comparator): Array; - xorWith( - a1: Array, - a2: Array, - comparator?: Comparator - ): Array; - xorWith( - a1: Array, - a2: Array, - a3: Array, - comparator?: Comparator - ): Array; - xorWith( - a1: Array, - a2: Array, - a3: Array, - a4: Array, - comparator?: Comparator - ): Array; - zip(a1?: ?A[], a2?: ?B[]): Array<[A, B]>; - zip(a1: A[], a2: B[], a3: C[]): Array<[A, B, C]>; - zip(a1: A[], a2: B[], a3: C[], a4: D[]): Array<[A, B, C, D]>; - zip( - a1: A[], - a2: B[], - a3: C[], - a4: D[], - a5: E[] - ): Array<[A, B, C, D, E]>; - - zipObject(props: Array, values?: ?Array): { [key: K]: V }; - zipObject(props: void | null, values?: ?Array): {}; - zipObjectDeep(props: any[], values?: ?any): Object; - zipObjectDeep(props: void | null, values?: ?any): {}; - - zipWith(a1?: ?Array): Array<[A]>; - zipWith(a1: Array, iteratee: (A) => T): Array; - - zipWith(a1: Array, a2: Array): Array<[A, B]>; - zipWith( - a1: Array, - a2: Array, - iteratee: (A, B) => T - ): Array; - - zipWith( - a1: Array, - a2: Array, - a3: Array - ): Array<[A, B, C]>; - zipWith( - a1: Array, - a2: Array, - a3: Array, - iteratee: (A, B, C) => T - ): Array; - - zipWith( - a1: Array, - a2: Array, - a3: Array, - a4: Array - ): Array<[A, B, C, D]>; - zipWith( - a1: Array, - a2: Array, - a3: Array, - a4: Array, - iteratee: (A, B, C, D) => T - ): Array; - - // Collection - countBy(array: Array, iteratee?: ?ValueOnlyIteratee): Object; - countBy(array: void | null, iteratee?: ?ValueOnlyIteratee): {}; - countBy(object: T, iteratee?: ?ValueOnlyIteratee): Object; - // alias of _.forEach - each(array: $ReadOnlyArray, iteratee?: ?Iteratee): Array; - each(array: T, iteratee?: ?Iteratee): T; - each(object: T, iteratee?: ?OIteratee): T; - // alias of _.forEachRight - eachRight(array: $ReadOnlyArray, iteratee?: ?Iteratee): Array; - eachRight(array: T, iteratee?: ?Iteratee): T; - eachRight(object: T, iteratee?: OIteratee): T; - every(array?: ?$ReadOnlyArray, iteratee?: ?Iteratee): boolean; - every(object: T, iteratee?: OIteratee): boolean; - filter(array?: ?$ReadOnlyArray, predicate?: ?Predicate): Array; - filter( - object: T, - predicate?: OPredicate - ): Array; - find( - array: $ReadOnlyArray, - predicate?: ?Predicate, - fromIndex?: ?number - ): T | void; - find( - array: void | null, - predicate?: ?Predicate, - fromIndex?: ?number - ): void; - find( - object: T, - predicate?: OPredicate, - fromIndex?: number - ): V; - findLast( - array: ?$ReadOnlyArray, - predicate?: ?Predicate, - fromIndex?: ?number - ): T | void; - findLast( - object: T, - predicate?: ?OPredicate - ): V; - flatMap( - array?: ?$ReadOnlyArray, - iteratee?: ?FlatMapIteratee - ): Array; - flatMap( - object: T, - iteratee?: OFlatMapIteratee - ): Array; - flatMapDeep( - array?: ?$ReadOnlyArray, - iteratee?: ?FlatMapIteratee - ): Array; - flatMapDeep( - object: T, - iteratee?: ?OFlatMapIteratee - ): Array; - flatMapDepth( - array?: ?Array, - iteratee?: ?FlatMapIteratee, - depth?: ?number - ): Array; - flatMapDepth( - object: T, - iteratee?: OFlatMapIteratee, - depth?: number - ): Array; - forEach(array: $ReadOnlyArray, iteratee?: ?Iteratee): Array; - forEach(array: T, iteratee?: ?Iteratee): T; - forEach(object: T, iteratee?: ?OIteratee): T; - forEachRight(array: $ReadOnlyArray, iteratee?: ?Iteratee): Array; - forEachRight(array: T, iteratee?: ?Iteratee): T; - forEachRight(object: T, iteratee?: ?OIteratee): T; - groupBy( - array: $ReadOnlyArray, - iteratee?: ?ValueOnlyIteratee - ): { [key: V]: Array }; - groupBy( - array: void | null, - iteratee?: ?ValueOnlyIteratee - ): {}; - groupBy( - object: T, - iteratee?: ValueOnlyIteratee - ): { [key: V]: Array }; - includes(array: $ReadOnlyArray, value: T, fromIndex?: ?number): boolean; - includes(array: void | null, value?: ?T, fromIndex?: ?number): false; - includes(object: T, value: any, fromIndex?: number): boolean; - includes(str: string, value: string, fromIndex?: number): boolean; - invokeMap( - array?: ?$ReadOnlyArray, - path?: ?((value: T) => Array | string) | Array | string, - ...args?: Array - ): Array; - invokeMap( - object: T, - path: ((value: any) => Array | string) | Array | string, - ...args?: Array - ): Array; - keyBy( - array: $ReadOnlyArray, - iteratee?: ?ValueOnlyIteratee - ): { [key: V]: T }; - keyBy( - array: void | null, - iteratee?: ?ValueOnlyIteratee<*> - ): {}; - keyBy( - object: T, - iteratee?: ?ValueOnlyIteratee - ): { [key: V]: A }; - map(array?: ?Array, iteratee?: ?MapIterator): Array; - map( - array: ?$ReadOnlyArray, - iteratee?: ReadOnlyMapIterator - ): Array, - map( - object: ?T, - iteratee?: OMapIterator - ): Array; - map( - str: ?string, - iteratee?: (char: string, index: number, str: string) => any - ): string; - orderBy( - array: $ReadOnlyArray, - iteratees?: ?$ReadOnlyArray> | ?string, - orders?: ?$ReadOnlyArray<"asc" | "desc"> | ?string - ): Array; - orderBy( - array: null | void, - iteratees?: ?$ReadOnlyArray> | ?string, - orders?: ?$ReadOnlyArray<"asc" | "desc"> | ?string - ): Array; - orderBy( - object: T, - iteratees?: $ReadOnlyArray> | string, - orders?: $ReadOnlyArray<"asc" | "desc"> | string - ): Array; - partition( - array?: ?Array, - predicate?: ?Predicate - ): [Array, Array]; - partition( - object: T, - predicate?: OPredicate - ): [Array, Array]; - reduce( - array: $ReadOnlyArray, - iteratee?: ( - accumulator: U, - value: T, - index: number, - array: ?Array - ) => U, - accumulator?: U - ): U; - reduce( - array: void | null, - iteratee?: ?( - accumulator: U, - value: T, - index: number, - array: ?Array - ) => U, - accumulator?: ?U - ): void | null; - reduce( - object: T, - iteratee?: (accumulator: U, value: any, key: string, object: T) => U, - accumulator?: U - ): U; - reduceRight( - array: void | null, - iteratee?: ?( - accumulator: U, - value: T, - index: number, - array: ?Array - ) => U, - accumulator?: ?U - ): void | null; - reduceRight( - array: $ReadOnlyArray, - iteratee?: ?( - accumulator: U, - value: T, - index: number, - array: ?Array - ) => U, - accumulator?: ?U - ): U; - reduceRight( - object: T, - iteratee?: ?(accumulator: U, value: any, key: string, object: T) => U, - accumulator?: ?U - ): U; - reject(array: ?$ReadOnlyArray, predicate?: Predicate): Array; - reject( - object?: ?T, - predicate?: ?OPredicate - ): Array; - sample(array: ?Array): T; - sample(object: T): V; - sampleSize(array?: ?Array, n?: ?number): Array; - sampleSize(object: T, n?: number): Array; - shuffle(array: ?Array): Array; - shuffle(object: T): Array; - size(collection: $ReadOnlyArray | Object | string): number; - some(array: ?$ReadOnlyArray, predicate?: Predicate): boolean; - some(array: void | null, predicate?: ?Predicate): false; - some( - object?: ?T, - predicate?: OPredicate - ): boolean; - sortBy( - array: ?$ReadOnlyArray, - ...iteratees?: $ReadOnlyArray> - ): Array; - sortBy( - array: ?$ReadOnlyArray, - iteratees?: $ReadOnlyArray> - ): Array; - sortBy( - object: T, - ...iteratees?: Array> - ): Array; - sortBy( - object: T, - iteratees?: $ReadOnlyArray> - ): Array; - - // Date - now(): number; - - // Function - after(n: number, fn: Function): Function; - ary(func: Function, n?: number): Function; - before(n: number, fn: Function): Function; - bind(func: Function, thisArg: any, ...partials: Array): Function; - bindKey(obj?: ?Object, key?: ?string, ...partials?: Array): Function; - curry: Curry; - curry(func: Function, arity?: number): Function; - curryRight(func: Function, arity?: number): Function; - debounce(func: F, wait?: number, options?: DebounceOptions): F; - defer(func: Function, ...args?: Array): TimeoutID; - delay(func: Function, wait: number, ...args?: Array): TimeoutID; - flip(func: Function): Function; - memoize(func: F, resolver?: Function): F; - negate(predicate: Function): Function; - once(func: Function): Function; - overArgs(func?: ?Function, ...transforms?: Array): Function; - overArgs(func?: ?Function, transforms?: ?Array): Function; - partial(func: Function, ...partials: any[]): Function; - partialRight(func: Function, ...partials: Array): Function; - partialRight(func: Function, partials: Array): Function; - rearg(func: Function, ...indexes: Array): Function; - rearg(func: Function, indexes: Array): Function; - rest(func: Function, start?: number): Function; - spread(func: Function): Function; - throttle( - func: Function, - wait?: number, - options?: ThrottleOptions - ): Function; - unary(func: Function): Function; - wrap(value?: any, wrapper?: ?Function): Function; - - // Lang - castArray(value: *): any[]; - clone(value: T): T; - cloneDeep(value: T): T; - cloneDeepWith( - value: T, - customizer?: ?(value: T, key: number | string, object: T, stack: any) => U - ): U; - cloneWith( - value: T, - customizer?: ?(value: T, key: number | string, object: T, stack: any) => U - ): U; - conformsTo( - source: T, - predicates: T & { [key: string]: (x: any) => boolean } - ): boolean; - eq(value: any, other: any): boolean; - gt(value: any, other: any): boolean; - gte(value: any, other: any): boolean; - isArguments(value: void | null): false; - isArguments(value: any): boolean; - isArray(value: Array): true; - isArray(value: any): false; - isArrayBuffer(value: ArrayBuffer): true; - isArrayBuffer(value: any): false; - isArrayLike(value: Array | string | {length: number}): true; - isArrayLike(value: any): false; - isArrayLikeObject(value: {length: number} | Array): true; - isArrayLikeObject(value: any): false; - isBoolean(value: boolean): true; - isBoolean(value: any): false; - isBuffer(value: void | null): false; - isBuffer(value: any): boolean; - isDate(value: Date): true; - isDate(value: any): false; - isElement(value: Element): true; - isElement(value: any): false; - isEmpty(value: void | null | '' | {} | [] | number | boolean): true; - isEmpty(value: any): boolean; - isEqual(value: any, other: any): boolean; - isEqualWith( - value?: ?T, - other?: ?U, - customizer?: ?( - objValue: any, - otherValue: any, - key: number | string, - object: T, - other: U, - stack: any - ) => boolean | void - ): boolean; - isError(value: Error): true; - isError(value: any): false; - isFinite(value: number): boolean; - isFinite(value: any): false; - isFunction(value: Function): true; - isFunction(value: any): false; - isInteger(value: number): boolean; - isInteger(value: any): false; - isLength(value: void | null): false; - isLength(value: any): boolean; - isMap(value: Map): true; - isMap(value: any): false; - isMatch(object?: ?Object, source?: ?Object): boolean; - isMatchWith( - object?: ?T, - source?: ?U, - customizer?: ?( - objValue: any, - srcValue: any, - key: number | string, - object: T, - source: U - ) => boolean | void - ): boolean; - isNaN(value: number): boolean; - isNaN(value: any): false; - isNative(value: number | string | void | null | Object): false; - isNative(value: any): boolean; - isNil(value: void | null): true; - isNil(value: any): false; - isNull(value: null): true; - isNull(value: any): false; - isNumber(value: number): true; - isNumber(value: any): false; - isObject(value: Object): true; - isObject(value: any): false; - isObjectLike(value: void | null): false; - isObjectLike(value: any): boolean; - isPlainObject(value: Object): true; - isPlainObject(value: any): false; - isRegExp(value: RegExp): true; - isRegExp(value: any): false; - isSafeInteger(value: number): boolean; - isSafeInteger(value: any): false; - isSet(value: Set): true; - isSet(value: any): false; - isString(value: string): true; - isString(value: any): false; - isSymbol(value: Symbol): true; - isSymbol(value: any): false; - isTypedArray(value: $TypedArray): true; - isTypedArray(value: any): false; - isUndefined(value: void): true; - isUndefined(value: any): false; - isWeakMap(value: WeakMap): true; - isWeakMap(value: any): false; - isWeakSet(value: WeakSet): true; - isWeakSet(value: any): false; - lt(value: any, other: any): boolean; - lte(value: any, other: any): boolean; - toArray(value: any): Array; - toFinite(value: void | null): 0; - toFinite(value: any): number; - toInteger(value: void | null): 0; - toInteger(value: any): number; - toLength(value: void | null): 0; - toLength(value: any): number; - toNumber(value: void | null): 0; - toNumber(value: any): number; - toPlainObject(value: any): Object; - toSafeInteger(value: void | null): 0; - toSafeInteger(value: any): number; - toString(value: void | null): ''; - toString(value: any): string; - - // Math - add(augend: number, addend: number): number; - ceil(number: number, precision?: number): number; - divide(dividend: number, divisor: number): number; - floor(number: number, precision?: number): number; - max(array: ?Array): T; - maxBy(array: ?$ReadOnlyArray, iteratee?: Iteratee): T; - mean(array: Array<*>): number; - meanBy(array: Array, iteratee?: Iteratee): number; - min(array: ?Array): T; - minBy(array: ?$ReadOnlyArray, iteratee?: Iteratee): T; - multiply(multiplier: number, multiplicand: number): number; - round(number: number, precision?: number): number; - subtract(minuend: number, subtrahend: number): number; - sum(array: Array<*>): number; - sumBy(array: Array, iteratee?: Iteratee): number; - - // number - clamp(number?: number, lower?: ?number, upper?: ?number): number; - clamp(number: ?number, lower?: ?number, upper?: ?number): 0; - inRange(number: number, start?: number, end: number): boolean; - random(lower?: number, upper?: number, floating?: boolean): number; - - // Object - assign(object?: ?Object, ...sources?: Array): Object; - assignIn(): {}; - assignIn(a: A, b: B): A & B; - assignIn(a: A, b: B, c: C): A & B & C; - assignIn(a: A, b: B, c: C, d: D): A & B & C & D; - assignIn(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E; - assignInWith(): {}; - assignInWith( - object: T, - s1: A, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void - ): Object; - assignInWith( - object: T, - s1: A, - s2: B, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B - ) => any | void - ): Object; - assignInWith( - object: T, - s1: A, - s2: B, - s3: C, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B | C - ) => any | void - ): Object; - assignInWith( - object: T, - s1: A, - s2: B, - s3: C, - s4: D, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B | C | D - ) => any | void - ): Object; - assignWith(): {}; - assignWith( - object: T, - s1: A, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void - ): Object; - assignWith( - object: T, - s1: A, - s2: B, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B - ) => any | void - ): Object; - assignWith( - object: T, - s1: A, - s2: B, - s3: C, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B | C - ) => any | void - ): Object; - assignWith( - object: T, - s1: A, - s2: B, - s3: C, - s4: D, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B | C | D - ) => any | void - ): Object; - at(object?: ?Object, ...paths: Array): Array; - at(object?: ?Object, paths: Array): Array; - create(prototype: T, properties: Object): $Supertype; - create(prototype: any, properties: void | null): {}; - defaults(object?: ?Object, ...sources?: Array): Object; - defaultsDeep(object?: ?Object, ...sources?: Array): Object; - // alias for _.toPairs - entries(object?: ?Object): Array<[string, any]>; - // alias for _.toPairsIn - entriesIn(object?: ?Object): Array<[string, any]>; - // alias for _.assignIn - extend(a?: ?A, b?: ?B): A & B; - extend(a: A, b: B, c: C): A & B & C; - extend(a: A, b: B, c: C, d: D): A & B & C & D; - extend(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E; - // alias for _.assignInWith - extendWith( - object?: ?T, - s1?: ?A, - customizer?: ?( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void - ): Object; - extendWith( - object: T, - s1: A, - s2: B, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B - ) => any | void - ): Object; - extendWith( - object: T, - s1: A, - s2: B, - s3: C, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B | C - ) => any | void - ): Object; - extendWith( - object: T, - s1: A, - s2: B, - s3: C, - s4: D, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B | C | D - ) => any | void - ): Object; - findKey( - object: T, - predicate?: ?OPredicate - ): string | void; - findKey( - object: void | null, - predicate?: ?OPredicate - ): void; - findLastKey( - object: T, - predicate?: ?OPredicate - ): string | void; - findLastKey( - object: void | null, - predicate?: ?OPredicate - ): void; - forIn(object: Object, iteratee?: ?OIteratee<*>): Object; - forIn(object: void | null, iteratee?: ?OIteratee<*>): null; - forInRight(object: Object, iteratee?: ?OIteratee<*>): Object; - forInRight(object: void | null, iteratee?: ?OIteratee<*>): null; - forOwn(object: Object, iteratee?: ?OIteratee<*>): Object; - forOwn(object: void | null, iteratee?: ?OIteratee<*>): null; - forOwnRight(object: Object, iteratee?: ?OIteratee<*>): Object; - forOwnRight(object: void | null, iteratee?: ?OIteratee<*>): null; - functions(object?: ?Object): Array; - functionsIn(object?: ?Object): Array; - get( - object?: ?Object | ?$ReadOnlyArray | void | null, - path?: ?$ReadOnlyArray | string | number, - defaultValue?: any - ): any; - has(object: Object, path: Array | string): boolean; - has(object: Object, path: void | null): false; - has(object: void | null, path?: ?Array | ?string): false; - hasIn(object: Object, path: Array | string): boolean; - hasIn(object: Object, path: void | null): false; - hasIn(object: void | null, path?: ?Array | ?string): false; - invert(object: Object, multiVal?: ?boolean): Object; - invert(object: void | null, multiVal?: ?boolean): {}; - invertBy(object: Object, iteratee?: ?Function): Object; - invertBy(object: void | null, iteratee?: ?Function): {}; - invoke( - object?: ?Object, - path?: ?Array | string, - ...args?: Array - ): any; - keys(object?: ?{ [key: K]: any }): Array; - keys(object?: ?Object): Array; - keysIn(object?: ?Object): Array; - mapKeys(object: Object, iteratee?: ?OIteratee<*>): Object; - mapKeys(object: void | null, iteratee?: ?OIteratee<*>): {}; - mapValues(object: Object, iteratee?: ?OIteratee<*>): Object; - mapValues(object: void | null, iteratee?: ?OIteratee<*>): {}; - merge(object?: ?Object, ...sources?: Array): Object; - mergeWith(): {}; - mergeWith( - object: T, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void - ): Object; - mergeWith( - object: T, - s1: A, - s2: B, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B - ) => any | void - ): Object; - mergeWith( - object: T, - s1: A, - s2: B, - s3: C, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B | C - ) => any | void - ): Object; - mergeWith( - object: T, - s1: A, - s2: B, - s3: C, - s4: D, - customizer?: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B | C | D - ) => any | void - ): Object; - omit(object?: ?Object, ...props: Array): Object; - omit(object?: ?Object, props: Array): Object; - omitBy( - object: T, - predicate?: ?OPredicate - ): Object; - omitBy( - object: void | null, - predicate?: ?OPredicate - ): {}; - pick(object?: ?Object, ...props: Array): Object; - pick(object?: ?Object, props: Array): Object; - pickBy( - object: T, - predicate?: ?OPredicate - ): Object; - pickBy( - object: void | null, - predicate?: ?OPredicate - ): {}; - result( - object?: ?Object, - path?: ?Array | string, - defaultValue?: any - ): any; - set(object: Object, path?: ?Array | string, value: any): Object; - set( - object: T, - path?: ?Array | string, - value?: ?any): T; - setWith( - object: T, - path?: ?Array | string, - value: any, - customizer?: (nsValue: any, key: string, nsObject: T) => any - ): Object; - setWith( - object: T, - path?: ?Array | string, - value?: ?any, - customizer?: ?(nsValue: any, key: string, nsObject: T) => any - ): T; - toPairs(object?: ?Object | Array<*>): Array<[string, any]>; - toPairsIn(object?: ?Object): Array<[string, any]>; - transform( - collection: Object | $ReadOnlyArray, - iteratee?: ?OIteratee<*>, - accumulator?: any - ): any; - transform( - collection: void | null, - iteratee?: ?OIteratee<*>, - accumulator?: ?any - ): {}; - unset(object: Object, path?: ?Array | ?string): boolean; - unset(object: void | null, path?: ?Array | ?string): true; - update(object: Object, path: string[] | string, updater: Function): Object; - update( - object: T, - path?: ?string[] | ?string, - updater?: ?Function): T; - updateWith( - object: Object, - path?: ?string[] | ?string, - updater?: ?Function, - customizer?: ?Function - ): Object; - updateWith( - object: T, - path?: ?string[] | ?string, - updater?: ?Function, - customizer?: ?Function - ): T; - values(object?: ?Object): Array; - valuesIn(object?: ?Object): Array; - - // Seq - // harder to read, but this is _() - (value: any): any; - chain(value: T): any; - tap(value: T, interceptor: (value: T) => any): T; - thru(value: T1, interceptor: (value: T1) => T2): T2; - // TODO: _.prototype.* - - // String - camelCase(string: string): string; - camelCase(string: void | null): ''; - capitalize(string: string): string; - capitalize(string: void | null): ''; - deburr(string: string): string; - deburr(string: void | null): ''; - endsWith(string: string, target?: string, position?: ?number): boolean; - endsWith(string: void | null, target?: ?string, position?: ?number): false; - escape(string: string): string; - escape(string: void | null): ''; - escapeRegExp(string: string): string; - escapeRegExp(string: void | null): ''; - kebabCase(string: string): string; - kebabCase(string: void | null): ''; - lowerCase(string: string): string; - lowerCase(string: void | null): ''; - lowerFirst(string: string): string; - lowerFirst(string: void | null): ''; - pad(string?: ?string, length?: ?number, chars?: ?string): string; - padEnd(string?: ?string, length?: ?number, chars?: ?string): string; - padStart(string?: ?string, length?: ?number, chars?: ?string): string; - parseInt(string: string, radix?: ?number): number; - repeat(string: string, n?: ?number): string; - repeat(string: void | null, n?: ?number): ''; - replace( - string: string, - pattern: RegExp | string, - replacement: ((string: string) => string) | string - ): string; - replace( - string: void | null, - pattern?: ?RegExp | ?string, - replacement: ?((string: string) => string) | ?string - ): ''; - snakeCase(string: string): string; - snakeCase(string: void | null): ''; - split( - string?: ?string, - separator?: ?RegExp | ?string, - limit?: ?number - ): Array; - startCase(string: string): string; - startCase(string: void | null): ''; - startsWith(string: string, target?: string, position?: number): boolean; - startsWith(string: void | null, target?: ?string, position?: ?number): false; - template(string?: ?string, options?: ?TemplateSettings): Function; - toLower(string: string): string; - toLower(string: void | null): ''; - toUpper(string: string): string; - toUpper(string: void | null): ''; - trim(string: string, chars?: string): string; - trim(string: void | null, chars?: ?string): ''; - trimEnd(string: string, chars?: ?string): string; - trimEnd(string: void | null, chars?: ?string): ''; - trimStart(string: string, chars?: ?string): string; - trimStart(string: void | null, chars?: ?string): ''; - truncate(string: string, options?: TruncateOptions): string; - truncate(string: void | null, options?: ?TruncateOptions): ''; - unescape(string: string): string; - unescape(string: void | null): ''; - upperCase(string: string): string; - upperCase(string: void | null): ''; - upperFirst(string: string): string; - upperFirst(string: void | null): ''; - words(string?: ?string, pattern?: ?RegExp | ?string): Array; - - // Util - attempt(func: Function, ...args: Array): any; - bindAll(object: Object, methodNames?: ?Array): Object; - bindAll(object: T, methodNames?: ?Array): T; - bindAll(object: Object, ...methodNames: Array): Object; - cond(pairs?: ?NestedArray): Function; - conforms(source?: ?Object): Function; - constant(value: T): () => T; - defaultTo( - value: T1, - defaultValue: T2 - ): T1; - // NaN is a number instead of its own type, otherwise it would behave like null/void - defaultTo(value: T1, defaultValue: T2): T1 | T2; - defaultTo(value: T1, defaultValue: T2): T2; - flow: ($ComposeReverse & (funcs: Array) => Function); - flowRight: ($Compose & (funcs: Array) => Function); - identity(value: T): T; - iteratee(func?: any): Function; - matches(source?: ?Object): Function; - matchesProperty(path?: ?Array | string, srcValue: any): Function; - method(path?: ?Array | string, ...args?: Array): Function; - methodOf(object?: ?Object, ...args?: Array): Function; - mixin( - object?: T, - source: Object, - options?: { chain: boolean } - ): T; - noConflict(): Lodash; - noop(...args: Array): void; - nthArg(n?: ?number): Function; - over(...iteratees: Array): Function; - over(iteratees: Array): Function; - overEvery(...predicates: Array): Function; - overEvery(predicates: Array): Function; - overSome(...predicates: Array): Function; - overSome(predicates: Array): Function; - property(path?: ?Array | string): Function; - propertyOf(object?: ?Object): Function; - range(start: number, end: number, step?: number): Array; - range(end: number, step?: number): Array; - rangeRight(start?: ?number, end?: ?number, step?: ?number): Array; - rangeRight(end?: ?number, step?: ?number): Array; - runInContext(context?: ?Object): Function; - - stubArray(): Array<*>; - stubFalse(): false; - stubObject(): {}; - stubString(): ""; - stubTrue(): true; - times(n?: ?number, ...rest?: Array): Array; - times(n: number, iteratee: (i: number) => T): Array; - toPath(value: any): Array; - uniqueId(prefix?: ?string): string; - - // Properties - VERSION: string; - templateSettings: TemplateSettings; - } - - declare module.exports: Lodash; -} - -declare module "lodash/fp" { - declare type __CurriedFunction1 = (...r: [AA]) => R; - declare type CurriedFunction1 = __CurriedFunction1; - - declare type __CurriedFunction2 = (( - ...r: [AA] - ) => CurriedFunction1) & - ((...r: [AA, BB]) => R); - declare type CurriedFunction2 = __CurriedFunction2; - - declare type __CurriedFunction3 = (( - ...r: [AA] - ) => CurriedFunction2) & - ((...r: [AA, BB]) => CurriedFunction1) & - ((...r: [AA, BB, CC]) => R); - declare type CurriedFunction3 = __CurriedFunction3< - A, - B, - C, - R, - *, - *, - * - >; - - declare type __CurriedFunction4< - A, - B, - C, - D, - R, - AA: A, - BB: B, - CC: C, - DD: D - > = ((...r: [AA]) => CurriedFunction3) & - ((...r: [AA, BB]) => CurriedFunction2) & - ((...r: [AA, BB, CC]) => CurriedFunction1) & - ((...r: [AA, BB, CC, DD]) => R); - declare type CurriedFunction4 = __CurriedFunction4< - A, - B, - C, - D, - R, - *, - *, - *, - * - >; - - declare type __CurriedFunction5< - A, - B, - C, - D, - E, - R, - AA: A, - BB: B, - CC: C, - DD: D, - EE: E - > = ((...r: [AA]) => CurriedFunction4) & - ((...r: [AA, BB]) => CurriedFunction3) & - ((...r: [AA, BB, CC]) => CurriedFunction2) & - ((...r: [AA, BB, CC, DD]) => CurriedFunction1) & - ((...r: [AA, BB, CC, DD, EE]) => R); - declare type CurriedFunction5 = __CurriedFunction5< - A, - B, - C, - D, - E, - R, - *, - *, - *, - *, - * - >; - - declare type __CurriedFunction6< - A, - B, - C, - D, - E, - F, - R, - AA: A, - BB: B, - CC: C, - DD: D, - EE: E, - FF: F - > = ((...r: [AA]) => CurriedFunction5) & - ((...r: [AA, BB]) => CurriedFunction4) & - ((...r: [AA, BB, CC]) => CurriedFunction3) & - ((...r: [AA, BB, CC, DD]) => CurriedFunction2) & - ((...r: [AA, BB, CC, DD, EE]) => CurriedFunction1) & - ((...r: [AA, BB, CC, DD, EE, FF]) => R); - declare type CurriedFunction6 = __CurriedFunction6< - A, - B, - C, - D, - E, - F, - R, - *, - *, - *, - *, - *, - * - >; - - declare type Curry = (((...r: [A]) => R) => CurriedFunction1) & - (((...r: [A, B]) => R) => CurriedFunction2) & - (((...r: [A, B, C]) => R) => CurriedFunction3) & - (( - (...r: [A, B, C, D]) => R - ) => CurriedFunction4) & - (( - (...r: [A, B, C, D, E]) => R - ) => CurriedFunction5) & - (( - (...r: [A, B, C, D, E, F]) => R - ) => CurriedFunction6); - - declare type UnaryFn = (a: A) => R; - - declare type TemplateSettings = { - escape?: RegExp, - evaluate?: RegExp, - imports?: Object, - interpolate?: RegExp, - variable?: string - }; - - declare type TruncateOptions = { - length?: number, - omission?: string, - separator?: RegExp | string - }; - - declare type DebounceOptions = { - leading?: boolean, - maxWait?: number, - trailing?: boolean - }; - - declare type ThrottleOptions = { - leading?: boolean, - trailing?: boolean - }; - - declare type NestedArray = Array>; - - declare type matchesIterateeShorthand = Object; - declare type matchesPropertyIterateeShorthand = [string, any]; - declare type propertyIterateeShorthand = string; - - declare type OPredicate = - | ((value: A) => any) - | matchesIterateeShorthand - | matchesPropertyIterateeShorthand - | propertyIterateeShorthand; - - declare type OIterateeWithResult = Object | string | ((value: V) => R); - declare type OIteratee = OIterateeWithResult; - declare type OFlatMapIteratee = OIterateeWithResult>; - - declare type Predicate = - | ((value: T) => any) - | matchesIterateeShorthand - | matchesPropertyIterateeShorthand - | propertyIterateeShorthand; - - declare type _ValueOnlyIteratee = (value: T) => mixed; - declare type ValueOnlyIteratee = _ValueOnlyIteratee | string; - declare type _Iteratee = (item: T) => mixed; - declare type Iteratee = _Iteratee | Object | string; - declare type FlatMapIteratee = - | ((item: T) => Array) - | Object - | string; - declare type Comparator = (item: T, item2: T) => boolean; - - declare type MapIterator = ((item: T) => U) | propertyIterateeShorthand; - - declare type OMapIterator = - | ((item: T) => U) - | propertyIterateeShorthand; - - declare class Lodash { - // Array - chunk(size: number): (array: Array) => Array>; - chunk(size: number, array: Array): Array>; - compact(array?: ?$ReadOnlyArray): Array; - concat | T, B: Array | U>( - base: A - ): (elements: B) => Array; - concat | T, B: Array | U>( - base: A, - elements: B - ): Array; - difference(values: $ReadOnlyArray): (array: $ReadOnlyArray) => T[]; - difference(values: $ReadOnlyArray, array: $ReadOnlyArray): T[]; - differenceBy( - iteratee: ValueOnlyIteratee - ): ((values: $ReadOnlyArray) => (array: $ReadOnlyArray) => T[]) & - ((values: $ReadOnlyArray, array: $ReadOnlyArray) => T[]); - differenceBy( - iteratee: ValueOnlyIteratee, - values: $ReadOnlyArray - ): (array: $ReadOnlyArray) => T[]; - differenceBy( - iteratee: ValueOnlyIteratee, - values: $ReadOnlyArray, - array: $ReadOnlyArray - ): T[]; - differenceWith( - comparator: Comparator, - ): ((first: $ReadOnly) => (second: $ReadOnly) => T[]) & - ((first: $ReadOnly, second: $ReadOnly) => T[]); - differenceWith( - comparator: Comparator, - first: $ReadOnly, - ): (second: $ReadOnly) => T[]; - differenceWith( - comparator: Comparator, - first: $ReadOnly, - second: $ReadOnly - ): T[]; - drop(n: number): (array: Array) => Array; - drop(n: number, array: Array): Array; - dropLast(n: number): (array: Array) => Array; - dropLast(n: number, array: Array): Array; - dropRight(n: number): (array: Array) => Array; - dropRight(n: number, array: Array): Array; - dropRightWhile(predicate: Predicate): (array: Array) => Array; - dropRightWhile(predicate: Predicate, array: Array): Array; - dropWhile(predicate: Predicate): (array: Array) => Array; - dropWhile(predicate: Predicate, array: Array): Array; - dropLastWhile(predicate: Predicate): (array: Array) => Array; - dropLastWhile(predicate: Predicate, array: Array): Array; - fill( - start: number - ): (( - end: number - ) => ((value: U) => (array: Array) => Array) & - ((value: U, array: Array) => Array)) & - ((end: number, value: U) => (array: Array) => Array) & - ((end: number, value: U, array: Array) => Array); - fill( - start: number, - end: number - ): ((value: U) => (array: Array) => Array) & - ((value: U, array: Array) => Array); - fill( - start: number, - end: number, - value: U - ): (array: Array) => Array; - fill( - start: number, - end: number, - value: U, - array: Array - ): Array; - findIndex(predicate: Predicate): (array: $ReadOnlyArray) => number; - findIndex(predicate: Predicate, array: $ReadOnlyArray): number; - findIndexFrom( - predicate: Predicate - ): ((fromIndex: number) => (array: $ReadOnlyArray) => number) & - ((fromIndex: number, array: $ReadOnlyArray) => number); - findIndexFrom( - predicate: Predicate, - fromIndex: number - ): (array: $ReadOnlyArray) => number; - findIndexFrom( - predicate: Predicate, - fromIndex: number, - array: $ReadOnlyArray - ): number; - findLastIndex( - predicate: Predicate - ): (array: $ReadOnlyArray) => number; - findLastIndex(predicate: Predicate, array: $ReadOnlyArray): number; - findLastIndexFrom( - predicate: Predicate - ): ((fromIndex: number) => (array: $ReadOnlyArray) => number) & - ((fromIndex: number, array: $ReadOnlyArray) => number); - findLastIndexFrom( - predicate: Predicate, - fromIndex: number - ): (array: $ReadOnlyArray) => number; - findLastIndexFrom( - predicate: Predicate, - fromIndex: number, - array: $ReadOnlyArray - ): number; - // alias of _.head - first(array: $ReadOnlyArray): T; - flatten(array: Array | X>): Array; - unnest(array: Array | X>): Array; - flattenDeep(array: any[]): Array; - flattenDepth(depth: number): (array: any[]) => any[]; - flattenDepth(depth: number, array: any[]): any[]; - fromPairs(pairs: Array<[A, B]>): { [key: A]: B }; - head(array: $ReadOnlyArray): T; - indexOf(value: T): (array: Array) => number; - indexOf(value: T, array: Array): number; - indexOfFrom( - value: T - ): ((fromIndex: number) => (array: Array) => number) & - ((fromIndex: number, array: Array) => number); - indexOfFrom(value: T, fromIndex: number): (array: Array) => number; - indexOfFrom(value: T, fromIndex: number, array: Array): number; - initial(array: Array): Array; - init(array: Array): Array; - intersection(a1: Array): (a2: Array) => Array; - intersection(a1: Array, a2: Array): Array; - intersectionBy( - iteratee: ValueOnlyIteratee - ): ((a1: Array) => (a2: Array) => Array) & - ((a1: Array, a2: Array) => Array); - intersectionBy( - iteratee: ValueOnlyIteratee, - a1: Array - ): (a2: Array) => Array; - intersectionBy( - iteratee: ValueOnlyIteratee, - a1: Array, - a2: Array - ): Array; - intersectionWith( - comparator: Comparator - ): ((a1: Array) => (a2: Array) => Array) & - ((a1: Array, a2: Array) => Array); - intersectionWith( - comparator: Comparator, - a1: Array - ): (a2: Array) => Array; - intersectionWith( - comparator: Comparator, - a1: Array, - a2: Array - ): Array; - join(separator: string): (array: Array) => string; - join(separator: string, array: Array): string; - last(array: Array): T; - lastIndexOf(value: T): (array: Array) => number; - lastIndexOf(value: T, array: Array): number; - lastIndexOfFrom( - value: T - ): ((fromIndex: number) => (array: Array) => number) & - ((fromIndex: number, array: Array) => number); - lastIndexOfFrom( - value: T, - fromIndex: number - ): (array: Array) => number; - lastIndexOfFrom(value: T, fromIndex: number, array: Array): number; - nth(n: number): (array: T[]) => T; - nth(n: number, array: T[]): T; - pull(value: T): (array: Array) => Array; - pull(value: T, array: Array): Array; - pullAll(values: Array): (array: Array) => Array; - pullAll(values: Array, array: Array): Array; - pullAllBy( - iteratee: ValueOnlyIteratee - ): ((values: Array) => (array: Array) => Array) & - ((values: Array, array: Array) => Array); - pullAllBy( - iteratee: ValueOnlyIteratee, - values: Array - ): (array: Array) => Array; - pullAllBy( - iteratee: ValueOnlyIteratee, - values: Array, - array: Array - ): Array; - pullAllWith( - comparator: Function - ): ((values: T[]) => (array: T[]) => T[]) & - ((values: T[], array: T[]) => T[]); - pullAllWith(comparator: Function, values: T[]): (array: T[]) => T[]; - pullAllWith(comparator: Function, values: T[], array: T[]): T[]; - pullAt(indexed: Array): (array: Array) => Array; - pullAt(indexed: Array, array: Array): Array; - remove(predicate: Predicate): (array: Array) => Array; - remove(predicate: Predicate, array: Array): Array; - reverse(array: Array): Array; - slice( - start: number - ): ((end: number) => (array: Array) => Array) & - ((end: number, array: Array) => Array); - slice(start: number, end: number): (array: Array) => Array; - slice(start: number, end: number, array: Array): Array; - sortedIndex(value: T): (array: Array) => number; - sortedIndex(value: T, array: Array): number; - sortedIndexBy( - iteratee: ValueOnlyIteratee - ): ((value: T) => (array: Array) => number) & - ((value: T, array: Array) => number); - sortedIndexBy( - iteratee: ValueOnlyIteratee, - value: T - ): (array: Array) => number; - sortedIndexBy( - iteratee: ValueOnlyIteratee, - value: T, - array: Array - ): number; - sortedIndexOf(value: T): (array: Array) => number; - sortedIndexOf(value: T, array: Array): number; - sortedLastIndex(value: T): (array: Array) => number; - sortedLastIndex(value: T, array: Array): number; - sortedLastIndexBy( - iteratee: ValueOnlyIteratee - ): ((value: T) => (array: Array) => number) & - ((value: T, array: Array) => number); - sortedLastIndexBy( - iteratee: ValueOnlyIteratee, - value: T - ): (array: Array) => number; - sortedLastIndexBy( - iteratee: ValueOnlyIteratee, - value: T, - array: Array - ): number; - sortedLastIndexOf(value: T): (array: Array) => number; - sortedLastIndexOf(value: T, array: Array): number; - sortedUniq(array: Array): Array; - sortedUniqBy( - iteratee: (value: T) => mixed - ): (array: Array) => Array; - sortedUniqBy(iteratee: (value: T) => mixed, array: Array): Array; - tail(array: Array): Array; - take(n: number): (array: Array) => Array; - take(n: number, array: Array): Array; - takeRight(n: number): (array: Array) => Array; - takeRight(n: number, array: Array): Array; - takeLast(n: number): (array: Array) => Array; - takeLast(n: number, array: Array): Array; - takeRightWhile(predicate: Predicate): (array: Array) => Array; - takeRightWhile(predicate: Predicate, array: Array): Array; - takeLastWhile(predicate: Predicate): (array: Array) => Array; - takeLastWhile(predicate: Predicate, array: Array): Array; - takeWhile(predicate: Predicate): (array: Array) => Array; - takeWhile(predicate: Predicate, array: Array): Array; - union(a1: Array): (a2: Array) => Array; - union(a1: Array, a2: Array): Array; - unionBy( - iteratee: ValueOnlyIteratee - ): ((a1: Array) => (a2: Array) => Array) & - ((a1: Array, a2: Array) => Array); - unionBy( - iteratee: ValueOnlyIteratee, - a1: Array - ): (a2: Array) => Array; - unionBy( - iteratee: ValueOnlyIteratee, - a1: Array, - a2: Array - ): Array; - unionWith( - comparator: Comparator - ): ((a1: Array) => (a2: Array) => Array) & - ((a1: Array, a2: Array) => Array); - unionWith( - comparator: Comparator, - a1: Array - ): (a2: Array) => Array; - unionWith( - comparator: Comparator, - a1: Array, - a2: Array - ): Array; - uniq(array: Array): Array; - uniqBy(iteratee: ValueOnlyIteratee): (array: Array) => Array; - uniqBy(iteratee: ValueOnlyIteratee, array: Array): Array; - uniqWith(comparator: Comparator): (array: Array) => Array; - uniqWith(comparator: Comparator, array: Array): Array; - unzip(array: Array): Array; - unzipWith(iteratee: Iteratee): (array: Array) => Array; - unzipWith(iteratee: Iteratee, array: Array): Array; - without(values: Array): (array: Array) => Array; - without(values: Array, array: Array): Array; - xor(a1: Array): (a2: Array) => Array; - xor(a1: Array, a2: Array): Array; - symmetricDifference(a1: Array): (a2: Array) => Array; - symmetricDifference(a1: Array, a2: Array): Array; - xorBy( - iteratee: ValueOnlyIteratee - ): ((a1: Array) => (a2: Array) => Array) & - ((a1: Array, a2: Array) => Array); - xorBy( - iteratee: ValueOnlyIteratee, - a1: Array - ): (a2: Array) => Array; - xorBy( - iteratee: ValueOnlyIteratee, - a1: Array, - a2: Array - ): Array; - symmetricDifferenceBy( - iteratee: ValueOnlyIteratee - ): ((a1: Array) => (a2: Array) => Array) & - ((a1: Array, a2: Array) => Array); - symmetricDifferenceBy( - iteratee: ValueOnlyIteratee, - a1: Array - ): (a2: Array) => Array; - symmetricDifferenceBy( - iteratee: ValueOnlyIteratee, - a1: Array, - a2: Array - ): Array; - xorWith( - comparator: Comparator - ): ((a1: Array) => (a2: Array) => Array) & - ((a1: Array, a2: Array) => Array); - xorWith( - comparator: Comparator, - a1: Array - ): (a2: Array) => Array; - xorWith(comparator: Comparator, a1: Array, a2: Array): Array; - symmetricDifferenceWith( - comparator: Comparator - ): ((a1: Array) => (a2: Array) => Array) & - ((a1: Array, a2: Array) => Array); - symmetricDifferenceWith( - comparator: Comparator, - a1: Array - ): (a2: Array) => Array; - symmetricDifferenceWith( - comparator: Comparator, - a1: Array, - a2: Array - ): Array; - zip(a1: A[]): (a2: B[]) => Array<[A, B]>; - zip(a1: A[], a2: B[]): Array<[A, B]>; - zipAll(arrays: Array>): Array; - zipObject(props?: Array): (values?: Array) => { [key: K]: V }; - zipObject(props?: Array, values?: Array): { [key: K]: V }; - zipObj(props: Array): (values: Array) => Object; - zipObj(props: Array, values: Array): Object; - zipObjectDeep(props: any[]): (values: any) => Object; - zipObjectDeep(props: any[], values: any): Object; - zipWith( - iteratee: Iteratee - ): ((a1: NestedArray) => (a2: NestedArray) => Array) & - ((a1: NestedArray, a2: NestedArray) => Array); - zipWith( - iteratee: Iteratee, - a1: NestedArray - ): (a2: NestedArray) => Array; - zipWith( - iteratee: Iteratee, - a1: NestedArray, - a2: NestedArray - ): Array; - // Collection - countBy( - iteratee: ValueOnlyIteratee - ): (collection: Array | { [id: any]: T }) => { [string]: number }; - countBy( - iteratee: ValueOnlyIteratee, - collection: Array | { [id: any]: T } - ): { [string]: number }; - // alias of _.forEach - each( - iteratee: Iteratee | OIteratee - ): (collection: $ReadOnlyArray | { [id: any]: T }) => Array; - each( - iteratee: Iteratee | OIteratee, - collection: $ReadOnlyArray | { [id: any]: T } - ): Array; - // alias of _.forEachRight - eachRight( - iteratee: Iteratee | OIteratee - ): (collection: $ReadOnlyArray | { [id: any]: T }) => Array; - eachRight( - iteratee: Iteratee | OIteratee, - collection: $ReadOnlyArray | { [id: any]: T } - ): Array; - every( - iteratee: Iteratee | OIteratee - ): (collection: $ReadOnlyArray | { [id: any]: T }) => boolean; - every( - iteratee: Iteratee | OIteratee, - collection: $ReadOnlyArray | { [id: any]: T } - ): boolean; - all( - iteratee: Iteratee | OIteratee - ): (collection: Array | { [id: any]: T }) => boolean; - all( - iteratee: Iteratee | OIteratee, - collection: Array | { [id: any]: T } - ): boolean; - filter( - predicate: Predicate | OPredicate - ): (collection: $ReadOnlyArray | { [id: any]: T }) => Array; - filter( - predicate: Predicate | OPredicate, - collection: $ReadOnlyArray | { [id: any]: T } - ): Array; - find( - predicate: Predicate | OPredicate - ): (collection: $ReadOnlyArray | { [id: any]: T }) => T | void; - find( - predicate: Predicate | OPredicate, - collection: $ReadOnlyArray | { [id: any]: T } - ): T | void; - findFrom( - predicate: Predicate | OPredicate - ): (( - fromIndex: number - ) => (collection: $ReadOnlyArray | { [id: any]: T }) => T | void) & - (( - fromIndex: number, - collection: $ReadOnlyArray | { [id: any]: T } - ) => T | void); - findFrom( - predicate: Predicate | OPredicate, - fromIndex: number - ): (collection: Array | { [id: any]: T }) => T | void; - findFrom( - predicate: Predicate | OPredicate, - fromIndex: number, - collection: $ReadOnlyArray | { [id: any]: T } - ): T | void; - findLast( - predicate: Predicate | OPredicate - ): (collection: $ReadOnlyArray | { [id: any]: T }) => T | void; - findLast( - predicate: Predicate | OPredicate, - collection: $ReadOnlyArray | { [id: any]: T } - ): T | void; - findLastFrom( - predicate: Predicate | OPredicate - ): (( - fromIndex: number - ) => (collection: $ReadOnlyArray | { [id: any]: T }) => T | void) & - (( - fromIndex: number, - collection: $ReadOnlyArray | { [id: any]: T } - ) => T | void); - findLastFrom( - predicate: Predicate | OPredicate, - fromIndex: number - ): (collection: $ReadOnlyArray | { [id: any]: T }) => T | void; - findLastFrom( - predicate: Predicate | OPredicate, - fromIndex: number, - collection: $ReadOnlyArray | { [id: any]: T } - ): T | void; - flatMap( - iteratee: FlatMapIteratee | OFlatMapIteratee - ): (collection: Array | { [id: any]: T }) => Array; - flatMap( - iteratee: FlatMapIteratee | OFlatMapIteratee, - collection: Array | { [id: any]: T } - ): Array; - flatMapDeep( - iteratee: FlatMapIteratee | OFlatMapIteratee - ): (collection: Array | { [id: any]: T }) => Array; - flatMapDeep( - iteratee: FlatMapIteratee | OFlatMapIteratee, - collection: Array | { [id: any]: T } - ): Array; - flatMapDepth( - iteratee: FlatMapIteratee | OFlatMapIteratee - ): (( - depth: number - ) => (collection: Array | { [id: any]: T }) => Array) & - ((depth: number, collection: Array | { [id: any]: T }) => Array); - flatMapDepth( - iteratee: FlatMapIteratee | OFlatMapIteratee, - depth: number - ): (collection: Array | { [id: any]: T }) => Array; - flatMapDepth( - iteratee: FlatMapIteratee | OFlatMapIteratee, - depth: number, - collection: Array | { [id: any]: T } - ): Array; - forEach( - iteratee: Iteratee | OIteratee - ): (collection: $ReadOnlyArray | { [id: any]: T }) => Array; - forEach( - iteratee: Iteratee | OIteratee, - collection: $ReadOnlyArray | { [id: any]: T } - ): Array; - forEachRight( - iteratee: Iteratee | OIteratee - ): (collection: $ReadOnlyArray | { [id: any]: T }) => Array; - forEachRight( - iteratee: Iteratee | OIteratee, - collection: $ReadOnlyArray | { [id: any]: T } - ): Array; - groupBy( - iteratee: ValueOnlyIteratee - ): ( - collection: $ReadOnlyArray | { [id: any]: T } - ) => { [key: V]: Array }; - groupBy( - iteratee: ValueOnlyIteratee, - collection: $ReadOnlyArray | { [id: any]: T } - ): { [key: V]: Array }; - includes(value: T): (collection: Array | { [id: any]: T }) => boolean; - includes(value: T, collection: Array | { [id: any]: T }): boolean; - includes(value: string): (str: string) => boolean; - includes(value: string, str: string): boolean; - contains(value: string): (str: string) => boolean; - contains(value: string, str: string): boolean; - contains(value: T): (collection: Array | { [id: any]: T }) => boolean; - contains(value: T, collection: Array | { [id: any]: T }): boolean; - includesFrom( - value: string - ): ((fromIndex: number) => (str: string) => boolean) & - ((fromIndex: number, str: string) => boolean); - includesFrom(value: string, fromIndex: number): (str: string) => boolean; - includesFrom(value: string, fromIndex: number, str: string): boolean; - includesFrom( - value: T - ): ((fromIndex: number) => (collection: Array) => boolean) & - ((fromIndex: number, collection: Array) => boolean); - includesFrom( - value: T, - fromIndex: number - ): (collection: Array) => boolean; - includesFrom(value: T, fromIndex: number, collection: Array): boolean; - invokeMap( - path: ((value: T) => Array | string) | Array | string - ): (collection: Array | { [id: any]: T }) => Array; - invokeMap( - path: ((value: T) => Array | string) | Array | string, - collection: Array | { [id: any]: T } - ): Array; - invokeArgsMap( - path: ((value: T) => Array | string) | Array | string - ): (( - collection: Array | { [id: any]: T } - ) => (args: Array) => Array) & - (( - collection: Array | { [id: any]: T }, - args: Array - ) => Array); - invokeArgsMap( - path: ((value: T) => Array | string) | Array | string, - collection: Array | { [id: any]: T } - ): (args: Array) => Array; - invokeArgsMap( - path: ((value: T) => Array | string) | Array | string, - collection: Array | { [id: any]: T }, - args: Array - ): Array; - keyBy( - iteratee: ValueOnlyIteratee - ): (collection: $ReadOnlyArray | { [id: any]: T }) => { [key: V]: T }; - keyBy( - iteratee: ValueOnlyIteratee, - collection: $ReadOnlyArray | { [id: any]: T } - ): { [key: V]: T }; - indexBy( - iteratee: ValueOnlyIteratee - ): (collection: $ReadOnlyArray | { [id: any]: T }) => { [key: V]: T }; - indexBy( - iteratee: ValueOnlyIteratee, - collection: $ReadOnlyArray | { [id: any]: T } - ): { [key: V]: T }; - map( - iteratee: MapIterator | OMapIterator - ): (collection: $ReadOnlyArray | { [id: any]: T }) => Array; - map( - iteratee: MapIterator | OMapIterator, - collection: $ReadOnlyArray | { [id: any]: T } - ): Array; - map(iteratee: (char: string) => any): (str: string) => string; - map(iteratee: (char: string) => any, str: string): string; - pluck( - iteratee: MapIterator | OMapIterator - ): (collection: Array | { [id: any]: T }) => Array; - pluck( - iteratee: MapIterator | OMapIterator, - collection: Array | { [id: any]: T } - ): Array; - pluck(iteratee: (char: string) => any): (str: string) => string; - pluck(iteratee: (char: string) => any, str: string): string; - orderBy( - iteratees: $ReadOnlyArray | OIteratee<*>> | string - ): (( - orders: $ReadOnlyArray<"asc" | "desc"> | string - ) => (collection: $ReadOnlyArray | { [id: any]: T }) => Array) & - (( - orders: $ReadOnlyArray<"asc" | "desc"> | string, - collection: $ReadOnlyArray | { [id: any]: T } - ) => Array); - orderBy( - iteratees: $ReadOnlyArray | OIteratee<*>> | string, - orders: $ReadOnlyArray<"asc" | "desc"> | string - ): (collection: $ReadOnlyArray | { [id: any]: T }) => Array; - orderBy( - iteratees: $ReadOnlyArray | OIteratee<*>> | string, - orders: $ReadOnlyArray<"asc" | "desc"> | string, - collection: $ReadOnlyArray | { [id: any]: T } - ): Array; - partition( - predicate: Predicate | OPredicate - ): (collection: Array | { [id: any]: T }) => [Array, Array]; - partition( - predicate: Predicate | OPredicate, - collection: Array | { [id: any]: T } - ): [Array, Array]; - reduce( - iteratee: (accumulator: U, value: T) => U - ): ((accumulator: U) => (collection: Array | { [id: any]: T }) => U) & - ((accumulator: U, collection: Array | { [id: any]: T }) => U); - reduce( - iteratee: (accumulator: U, value: T) => U, - accumulator: U - ): (collection: Array | { [id: any]: T }) => U; - reduce( - iteratee: (accumulator: U, value: T) => U, - accumulator: U, - collection: Array | { [id: any]: T } - ): U; - reduceRight( - iteratee: (value: T, accumulator: U) => U - ): ((accumulator: U) => (collection: Array | { [id: any]: T }) => U) & - ((accumulator: U, collection: Array | { [id: any]: T }) => U); - reduceRight( - iteratee: (value: T, accumulator: U) => U, - accumulator: U - ): (collection: Array | { [id: any]: T }) => U; - reduceRight( - iteratee: (value: T, accumulator: U) => U, - accumulator: U, - collection: Array | { [id: any]: T } - ): U; - reject( - predicate: Predicate | OPredicate - ): (collection: Array | { [id: any]: T }) => Array; - reject( - predicate: Predicate | OPredicate, - collection: Array | { [id: any]: T } - ): Array; - sample(collection: Array | { [id: any]: T }): T; - sampleSize( - n: number - ): (collection: Array | { [id: any]: T }) => Array; - sampleSize(n: number, collection: Array | { [id: any]: T }): Array; - shuffle(collection: Array | { [id: any]: T }): Array; - size(collection: $ReadOnlyArray | Object | string): number; - some( - predicate: Predicate | OPredicate - ): (collection: $ReadOnlyArray | { [id: any]: T }) => boolean; - some( - predicate: Predicate | OPredicate, - collection: $ReadOnlyArray | { [id: any]: T } - ): boolean; - any( - predicate: Predicate | OPredicate - ): (collection: $ReadOnlyArray | { [id: any]: T }) => boolean; - any( - predicate: Predicate | OPredicate, - collection: $ReadOnlyArray | { [id: any]: T } - ): boolean; - sortBy( - iteratees: | $ReadOnlyArray | OIteratee> - | Iteratee - | OIteratee - ): (collection: $ReadOnlyArray | { [id: any]: T }) => Array; - sortBy( - iteratees: | $ReadOnlyArray | OIteratee> - | Iteratee - | OIteratee, - collection: $ReadOnlyArray | { [id: any]: T }, - ): Array; - - // Date - now(): number; - - // Function - after(fn: Function): (n: number) => Function; - after(fn: Function, n: number): Function; - ary(func: Function): Function; - nAry(n: number): (func: Function) => Function; - nAry(n: number, func: Function): Function; - before(fn: Function): (n: number) => Function; - before(fn: Function, n: number): Function; - bind(func: Function): (thisArg: any) => Function; - bind(func: Function, thisArg: any): Function; - bindKey(obj: Object): (key: string) => Function; - bindKey(obj: Object, key: string): Function; - curry: Curry; - curryN(arity: number): (func: Function) => Function; - curryN(arity: number, func: Function): Function; - curryRight(func: Function): Function; - curryRightN(arity: number): (func: Function) => Function; - curryRightN(arity: number, func: Function): Function; - debounce(wait: number): (func: F) => F; - debounce(wait: number, func: F): F; - defer(func: Function): TimeoutID; - delay(wait: number): (func: Function) => TimeoutID; - delay(wait: number, func: Function): TimeoutID; - flip(func: Function): Function; - memoize(func: F): F; - negate(predicate: Function): Function; - complement(predicate: Function): Function; - once(func: Function): Function; - overArgs(func: Function): (transforms: Array) => Function; - overArgs(func: Function, transforms: Array): Function; - useWith(func: Function): (transforms: Array) => Function; - useWith(func: Function, transforms: Array): Function; - partial(func: Function): (partials: any[]) => Function; - partial(func: Function, partials: any[]): Function; - partialRight(func: Function): (partials: Array) => Function; - partialRight(func: Function, partials: Array): Function; - rearg(indexes: Array): (func: Function) => Function; - rearg(indexes: Array, func: Function): Function; - rest(func: Function): Function; - unapply(func: Function): Function; - restFrom(start: number): (func: Function) => Function; - restFrom(start: number, func: Function): Function; - spread(func: Function): Function; - apply(func: Function): Function; - spreadFrom(start: number): (func: Function) => Function; - spreadFrom(start: number, func: Function): Function; - throttle(wait: number): (func: Function) => Function; - throttle(wait: number, func: Function): Function; - unary(func: Function): Function; - wrap(wrapper: Function): (value: any) => Function; - wrap(wrapper: Function, value: any): Function; - - // Lang - castArray(value: *): any[]; - clone(value: T): T; - cloneDeep(value: T): T; - cloneDeepWith( - customizer: (value: T, key: number | string, object: T, stack: any) => U - ): (value: T) => U; - cloneDeepWith( - customizer: (value: T, key: number | string, object: T, stack: any) => U, - value: T - ): U; - cloneWith( - customizer: (value: T, key: number | string, object: T, stack: any) => U - ): (value: T) => U; - cloneWith( - customizer: (value: T, key: number | string, object: T, stack: any) => U, - value: T - ): U; - conformsTo( - predicates: T & { [key: string]: (x: any) => boolean } - ): (source: T) => boolean; - conformsTo( - predicates: T & { [key: string]: (x: any) => boolean }, - source: T - ): boolean; - where( - predicates: T & { [key: string]: (x: any) => boolean } - ): (source: T) => boolean; - where( - predicates: T & { [key: string]: (x: any) => boolean }, - source: T - ): boolean; - conforms( - predicates: T & { [key: string]: (x: any) => boolean } - ): (source: T) => boolean; - conforms( - predicates: T & { [key: string]: (x: any) => boolean }, - source: T - ): boolean; - eq(value: any): (other: any) => boolean; - eq(value: any, other: any): boolean; - identical(value: any): (other: any) => boolean; - identical(value: any, other: any): boolean; - gt(value: any): (other: any) => boolean; - gt(value: any, other: any): boolean; - gte(value: any): (other: any) => boolean; - gte(value: any, other: any): boolean; - isArguments(value: any): boolean; - isArray(value: any): boolean; - isArrayBuffer(value: any): boolean; - isArrayLike(value: any): boolean; - isArrayLikeObject(value: any): boolean; - isBoolean(value: any): boolean; - isBuffer(value: any): boolean; - isDate(value: any): boolean; - isElement(value: any): boolean; - isEmpty(value: any): boolean; - isEqual(value: any): (other: any) => boolean; - isEqual(value: any, other: any): boolean; - equals(value: any): (other: any) => boolean; - equals(value: any, other: any): boolean; - isEqualWith( - customizer: ( - objValue: any, - otherValue: any, - key: number | string, - object: T, - other: U, - stack: any - ) => boolean | void - ): ((value: T) => (other: U) => boolean) & - ((value: T, other: U) => boolean); - isEqualWith( - customizer: ( - objValue: any, - otherValue: any, - key: number | string, - object: T, - other: U, - stack: any - ) => boolean | void, - value: T - ): (other: U) => boolean; - isEqualWith( - customizer: ( - objValue: any, - otherValue: any, - key: number | string, - object: T, - other: U, - stack: any - ) => boolean | void, - value: T, - other: U - ): boolean; - isError(value: any): boolean; - isFinite(value: any): boolean; - isFunction(value: Function): true; - isFunction(value: number | string | void | null | Object): false; - isInteger(value: any): boolean; - isLength(value: any): boolean; - isMap(value: any): boolean; - isMatch(source: Object): (object: Object) => boolean; - isMatch(source: Object, object: Object): boolean; - whereEq(source: Object): (object: Object) => boolean; - whereEq(source: Object, object: Object): boolean; - isMatchWith( - customizer: ( - objValue: any, - srcValue: any, - key: number | string, - object: T, - source: U - ) => boolean | void - ): ((source: U) => (object: T) => boolean) & - ((source: U, object: T) => boolean); - isMatchWith( - customizer: ( - objValue: any, - srcValue: any, - key: number | string, - object: T, - source: U - ) => boolean | void, - source: U - ): (object: T) => boolean; - isMatchWith( - customizer: ( - objValue: any, - srcValue: any, - key: number | string, - object: T, - source: U - ) => boolean | void, - source: U, - object: T - ): boolean; - isNaN(value: any): boolean; - isNative(value: any): boolean; - isNil(value: any): boolean; - isNull(value: any): boolean; - isNumber(value: any): boolean; - isObject(value: any): boolean; - isObjectLike(value: any): boolean; - isPlainObject(value: any): boolean; - isRegExp(value: any): boolean; - isSafeInteger(value: any): boolean; - isSet(value: any): boolean; - isString(value: string): true; - isString(value: any): false; - isSymbol(value: any): boolean; - isTypedArray(value: any): boolean; - isUndefined(value: any): boolean; - isWeakMap(value: any): boolean; - isWeakSet(value: any): boolean; - lt(value: any): (other: any) => boolean; - lt(value: any, other: any): boolean; - lte(value: any): (other: any) => boolean; - lte(value: any, other: any): boolean; - toArray(value: any): Array; - toFinite(value: any): number; - toInteger(value: any): number; - toLength(value: any): number; - toNumber(value: any): number; - toPlainObject(value: any): Object; - toSafeInteger(value: any): number; - toString(value: any): string; - - // Math - add(augend: number): (addend: number) => number; - add(augend: number, addend: number): number; - ceil(number: number): number; - divide(dividend: number): (divisor: number) => number; - divide(dividend: number, divisor: number): number; - floor(number: number): number; - max(array: Array): T; - maxBy(iteratee: Iteratee): (array: Array) => T; - maxBy(iteratee: Iteratee, array: Array): T; - mean(array: Array<*>): number; - meanBy(iteratee: Iteratee): (array: Array) => number; - meanBy(iteratee: Iteratee, array: Array): number; - min(array: Array): T; - minBy(iteratee: Iteratee): (array: Array) => T; - minBy(iteratee: Iteratee, array: Array): T; - multiply(multiplier: number): (multiplicand: number) => number; - multiply(multiplier: number, multiplicand: number): number; - round(number: number): number; - subtract(minuend: number): (subtrahend: number) => number; - subtract(minuend: number, subtrahend: number): number; - sum(array: Array<*>): number; - sumBy(iteratee: Iteratee): (array: Array) => number; - sumBy(iteratee: Iteratee, array: Array): number; - - // number - clamp( - lower: number - ): ((upper: number) => (number: number) => number) & - ((upper: number, number: number) => number); - clamp(lower: number, upper: number): (number: number) => number; - clamp(lower: number, upper: number, number: number): number; - inRange( - start: number - ): ((end: number) => (number: number) => boolean) & - ((end: number, number: number) => boolean); - inRange(start: number, end: number): (number: number) => boolean; - inRange(start: number, end: number, number: number): boolean; - random(lower: number): (upper: number) => number; - random(lower: number, upper: number): number; - - // Object - assign(object: Object): (source: Object) => Object; - assign(object: Object, source: Object): Object; - assignAll(objects: Array): Object; - assignInAll(objects: Array): Object; - extendAll(objects: Array): Object; - assignIn(a: A): (b: B) => A & B; - assignIn(a: A, b: B): A & B; - assignInWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void - ): ((object: T) => (s1: A) => Object) & ((object: T, s1: A) => Object); - assignInWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void, - object: T - ): (s1: A) => Object; - assignInWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void, - object: T, - s1: A - ): Object; - assignWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void - ): ((object: T) => (s1: A) => Object) & ((object: T, s1: A) => Object); - assignWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void, - object: T - ): (s1: A) => Object; - assignWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void, - object: T, - s1: A - ): Object; - assignInAllWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: Object, - source: Object - ) => any | void - ): (objects: Array) => Object; - assignInAllWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: Object, - source: Object - ) => any | void, - objects: Array - ): Object; - extendAllWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: Object, - source: Object - ) => any | void - ): (objects: Array) => Object; - extendAllWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: Object, - source: Object - ) => any | void, - objects: Array - ): Object; - assignAllWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: Object, - source: Object - ) => any | void - ): (objects: Array) => Object; - assignAllWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: Object, - source: Object - ) => any | void, - objects: Array - ): Object; - at(paths: Array): (object: Object) => Array; - at(paths: Array, object: Object): Array; - props(paths: Array): (object: Object) => Array; - props(paths: Array, object: Object): Array; - paths(paths: Array): (object: Object) => Array; - paths(paths: Array, object: Object): Array; - create(prototype: T): $Supertype; - defaults(source: Object): (object: Object) => Object; - defaults(source: Object, object: Object): Object; - defaultsAll(objects: Array): Object; - defaultsDeep(source: Object): (object: Object) => Object; - defaultsDeep(source: Object, object: Object): Object; - defaultsDeepAll(objects: Array): Object; - // alias for _.toPairs - entries(object: Object): Array<[string, any]>; - // alias for _.toPairsIn - entriesIn(object: Object): Array<[string, any]>; - // alias for _.assignIn - extend(a: A): (b: B) => A & B; - extend(a: A, b: B): A & B; - // alias for _.assignInWith - extendWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void - ): ((object: T) => (s1: A) => Object) & ((object: T, s1: A) => Object); - extendWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void, - object: T - ): (s1: A) => Object; - extendWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A - ) => any | void, - object: T, - s1: A - ): Object; - findKey( - predicate: OPredicate - ): (object: T) => string | void; - findKey( - predicate: OPredicate, - object: T - ): string | void; - findLastKey( - predicate: OPredicate - ): (object: T) => string | void; - findLastKey( - predicate: OPredicate, - object: T - ): string | void; - forIn(iteratee: OIteratee<*>): (object: Object) => Object; - forIn(iteratee: OIteratee<*>, object: Object): Object; - forInRight(iteratee: OIteratee<*>): (object: Object) => Object; - forInRight(iteratee: OIteratee<*>, object: Object): Object; - forOwn(iteratee: OIteratee<*>): (object: Object) => Object; - forOwn(iteratee: OIteratee<*>, object: Object): Object; - forOwnRight(iteratee: OIteratee<*>): (object: Object) => Object; - forOwnRight(iteratee: OIteratee<*>, object: Object): Object; - functions(object: Object): Array; - functionsIn(object: Object): Array; - get(path: $ReadOnlyArray | string | number): (object: Object | $ReadOnlyArray | void | null) => any; - get(path: $ReadOnlyArray | string | number, object: Object | $ReadOnlyArray | void | null): any; - prop(path: Array | string): (object: Object | Array) => any; - prop(path: Array | string, object: Object | Array): any; - path(path: Array | string): (object: Object | Array) => any; - path(path: Array | string, object: Object | Array): any; - getOr( - defaultValue: any - ): (( - path: Array | string - ) => (object: Object | Array) => any) & - ((path: Array | string, object: Object | $ReadOnlyArray | void | null) => any); - getOr( - defaultValue: any, - path: Array | string - ): (object: Object | $ReadOnlyArray | void | null) => any; - getOr( - defaultValue: any, - path: Array | string, - object: Object | $ReadOnlyArray | void | null - ): any; - propOr( - defaultValue: any - ): (( - path: Array | string - ) => (object: Object | Array) => any) & - ((path: Array | string, object: Object | Array) => any); - propOr( - defaultValue: any, - path: Array | string - ): (object: Object | Array) => any; - propOr( - defaultValue: any, - path: Array | string, - object: Object | Array - ): any; - pathOr( - defaultValue: any - ): (( - path: Array | string - ) => (object: Object | Array) => any) & - ((path: Array | string, object: Object | Array) => any); - pathOr( - defaultValue: any, - path: Array | string - ): (object: Object | Array) => any; - pathOr( - defaultValue: any, - path: Array | string, - object: Object | Array - ): any; - has(path: Array | string): (object: Object) => boolean; - has(path: Array | string, object: Object): boolean; - hasIn(path: Array | string): (object: Object) => boolean; - hasIn(path: Array | string, object: Object): boolean; - invert(object: Object): Object; - invertObj(object: Object): Object; - invertBy(iteratee: Function): (object: Object) => Object; - invertBy(iteratee: Function, object: Object): Object; - invoke(path: Array | string): (object: Object) => any; - invoke(path: Array | string, object: Object): any; - invokeArgs( - path: Array | string - ): ((object: Object) => (args: Array) => any) & - ((object: Object, args: Array) => any); - invokeArgs( - path: Array | string, - object: Object - ): (args: Array) => any; - invokeArgs( - path: Array | string, - object: Object, - args: Array - ): any; - keys(object: { [key: K]: any }): Array; - keys(object: Object): Array; - keysIn(object: Object): Array; - mapKeys(iteratee: OIteratee<*>): (object: Object) => Object; - mapKeys(iteratee: OIteratee<*>, object: Object): Object; - mapValues(iteratee: OIteratee<*>): (object: Object) => Object; - mapValues(iteratee: OIteratee<*>, object: Object): Object; - merge(object: Object): (source: Object) => Object; - merge(object: Object, source: Object): Object; - mergeAll(objects: Array): Object; - mergeWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B - ) => any | void - ): ((object: T) => (s1: A) => Object) & ((object: T, s1: A) => Object); - mergeWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B - ) => any | void, - object: T - ): (s1: A) => Object; - mergeWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: T, - source: A | B - ) => any | void, - object: T, - s1: A - ): Object; - mergeAllWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: Object, - source: Object - ) => any | void - ): (objects: Array) => Object; - mergeAllWith( - customizer: ( - objValue: any, - srcValue: any, - key: string, - object: Object, - source: Object - ) => any | void, - objects: Array - ): Object; - omit(props: Array): (object: Object) => Object; - omit(props: Array, object: Object): Object; - omitAll(props: Array): (object: Object) => Object; - omitAll(props: Array, object: Object): Object; - omitBy( - predicate: OPredicate - ): (object: T) => Object; - omitBy(predicate: OPredicate, object: T): Object; - pick(props: Array): (object: Object) => Object; - pick(props: Array, object: Object): Object; - pickAll(props: Array): (object: Object) => Object; - pickAll(props: Array, object: Object): Object; - pickBy( - predicate: OPredicate - ): (object: T) => Object; - pickBy(predicate: OPredicate, object: T): Object; - result(path: Array | string): (object: Object) => any; - result(path: Array | string, object: Object): any; - set( - path: Array | string - ): ((value: any) => (object: Object) => Object) & - ((value: any, object: Object) => Object); - set(path: Array | string, value: any): (object: Object) => Object; - set(path: Array | string, value: any, object: Object): Object; - assoc( - path: Array | string - ): ((value: any) => (object: Object) => Object) & - ((value: any, object: Object) => Object); - assoc(path: Array | string, value: any): (object: Object) => Object; - assoc(path: Array | string, value: any, object: Object): Object; - assocPath( - path: Array | string - ): ((value: any) => (object: Object) => Object) & - ((value: any, object: Object) => Object); - assocPath( - path: Array | string, - value: any - ): (object: Object) => Object; - assocPath(path: Array | string, value: any, object: Object): Object; - setWith( - customizer: (nsValue: any, key: string, nsObject: T) => any - ): (( - path: Array | string - ) => ((value: any) => (object: T) => Object) & - ((value: any, object: T) => Object)) & - ((path: Array | string, value: any) => (object: T) => Object) & - ((path: Array | string, value: any, object: T) => Object); - setWith( - customizer: (nsValue: any, key: string, nsObject: T) => any, - path: Array | string - ): ((value: any) => (object: T) => Object) & - ((value: any, object: T) => Object); - setWith( - customizer: (nsValue: any, key: string, nsObject: T) => any, - path: Array | string, - value: any - ): (object: T) => Object; - setWith( - customizer: (nsValue: any, key: string, nsObject: T) => any, - path: Array | string, - value: any, - object: T - ): Object; - toPairs(object: Object | Array<*>): Array<[string, any]>; - toPairsIn(object: Object): Array<[string, any]>; - transform( - iteratee: OIteratee<*> - ): (( - accumulator: any - ) => (collection: Object | $ReadOnlyArray) => any) & - ((accumulator: any, collection: Object | $ReadOnlyArray) => any); - transform( - iteratee: OIteratee<*>, - accumulator: any - ): (collection: Object | $ReadOnlyArray) => any; - transform( - iteratee: OIteratee<*>, - accumulator: any, - collection: Object | $ReadOnlyArray - ): any; - unset(path: Array | string): (object: Object) => Object; - unset(path: Array | string, object: Object): Object; - dissoc(path: Array | string): (object: Object) => Object; - dissoc(path: Array | string, object: Object): Object; - dissocPath(path: Array | string): (object: Object) => Object; - dissocPath(path: Array | string, object: Object): Object; - update( - path: string[] | string - ): ((updater: Function) => (object: Object) => Object) & - ((updater: Function, object: Object) => Object); - update( - path: string[] | string, - updater: Function - ): (object: Object) => Object; - update(path: string[] | string, updater: Function, object: Object): Object; - updateWith( - customizer: Function - ): (( - path: string[] | string - ) => ((updater: Function) => (object: Object) => Object) & - ((updater: Function, object: Object) => Object)) & - (( - path: string[] | string, - updater: Function - ) => (object: Object) => Object) & - ((path: string[] | string, updater: Function, object: Object) => Object); - updateWith( - customizer: Function, - path: string[] | string - ): ((updater: Function) => (object: Object) => Object) & - ((updater: Function, object: Object) => Object); - updateWith( - customizer: Function, - path: string[] | string, - updater: Function - ): (object: Object) => Object; - updateWith( - customizer: Function, - path: string[] | string, - updater: Function, - object: Object - ): Object; - values(object: Object): Array; - valuesIn(object: Object): Array; - - tap(interceptor: (value: T) => any): (value: T) => T; - tap(interceptor: (value: T) => any, value: T): T; - thru(interceptor: (value: T1) => T2): (value: T1) => T2; - thru(interceptor: (value: T1) => T2, value: T1): T2; - - // String - camelCase(string: string): string; - capitalize(string: string): string; - deburr(string: string): string; - endsWith(target: string): (string: string) => boolean; - endsWith(target: string, string: string): boolean; - escape(string: string): string; - escapeRegExp(string: string): string; - kebabCase(string: string): string; - lowerCase(string: string): string; - lowerFirst(string: string): string; - pad(length: number): (string: string) => string; - pad(length: number, string: string): string; - padChars( - chars: string - ): ((length: number) => (string: string) => string) & - ((length: number, string: string) => string); - padChars(chars: string, length: number): (string: string) => string; - padChars(chars: string, length: number, string: string): string; - padEnd(length: number): (string: string) => string; - padEnd(length: number, string: string): string; - padCharsEnd( - chars: string - ): ((length: number) => (string: string) => string) & - ((length: number, string: string) => string); - padCharsEnd(chars: string, length: number): (string: string) => string; - padCharsEnd(chars: string, length: number, string: string): string; - padStart(length: number): (string: string) => string; - padStart(length: number, string: string): string; - padCharsStart( - chars: string - ): ((length: number) => (string: string) => string) & - ((length: number, string: string) => string); - padCharsStart(chars: string, length: number): (string: string) => string; - padCharsStart(chars: string, length: number, string: string): string; - parseInt(radix: number): (string: string) => number; - parseInt(radix: number, string: string): number; - repeat(n: number): (string: string) => string; - repeat(n: number, string: string): string; - replace( - pattern: RegExp | string - ): (( - replacement: ((string: string) => string) | string - ) => (string: string) => string) & - (( - replacement: ((string: string) => string) | string, - string: string - ) => string); - replace( - pattern: RegExp | string, - replacement: ((string: string) => string) | string - ): (string: string) => string; - replace( - pattern: RegExp | string, - replacement: ((string: string) => string) | string, - string: string - ): string; - snakeCase(string: string): string; - split(separator: RegExp | string): (string: string) => Array; - split(separator: RegExp | string, string: string): Array; - startCase(string: string): string; - startsWith(target: string): (string: string) => boolean; - startsWith(target: string, string: string): boolean; - template(string: string): Function; - toLower(string: string): string; - toUpper(string: string): string; - trim(string: string): string; - trimChars(chars: string): (string: string) => string; - trimChars(chars: string, string: string): string; - trimEnd(string: string): string; - trimCharsEnd(chars: string): (string: string) => string; - trimCharsEnd(chars: string, string: string): string; - trimStart(string: string): string; - trimCharsStart(chars: string): (string: string) => string; - trimCharsStart(chars: string, string: string): string; - truncate(options: TruncateOptions): (string: string) => string; - truncate(options: TruncateOptions, string: string): string; - unescape(string: string): string; - upperCase(string: string): string; - upperFirst(string: string): string; - words(string: string): Array; - - // Util - attempt(func: Function): any; - bindAll(methodNames: Array): (object: Object) => Object; - bindAll(methodNames: Array, object: Object): Object; - cond(pairs: NestedArray): Function; - constant(value: T): () => T; - always(value: T): () => T; - defaultTo( - defaultValue: T2 - ): (value: T1) => T1; - defaultTo( - defaultValue: T2, - value: T1 - ): T1; - // NaN is a number instead of its own type, otherwise it would behave like null/void - defaultTo(defaultValue: T2): (value: T1) => T1 | T2; - defaultTo(defaultValue: T2, value: T1): T1 | T2; - defaultTo(defaultValue: T2): (value: T1) => T2; - defaultTo(defaultValue: T2, value: T1): T2; - flow: ($ComposeReverse & (funcs: Array) => Function); - pipe: ($ComposeReverse & (funcs: Array) => Function); - flowRight: ($Compose & (funcs: Array) => Function); - compose: ($Compose & (funcs: Array) => Function); - compose(funcs: Array): Function; - identity(value: T): T; - iteratee(func: any): Function; - matches(source: Object): (object: Object) => boolean; - matches(source: Object, object: Object): boolean; - matchesProperty(path: Array | string): (srcValue: any) => Function; - matchesProperty(path: Array | string, srcValue: any): Function; - propEq(path: Array | string): (srcValue: any) => Function; - propEq(path: Array | string, srcValue: any): Function; - pathEq(path: Array | string): (srcValue: any) => Function; - pathEq(path: Array | string, srcValue: any): Function; - method(path: Array | string): Function; - methodOf(object: Object): Function; - mixin( - object: T - ): ((source: Object) => (options: { chain: boolean }) => T) & - ((source: Object, options: { chain: boolean }) => T); - mixin( - object: T, - source: Object - ): (options: { chain: boolean }) => T; - mixin( - object: T, - source: Object, - options: { chain: boolean } - ): T; - noConflict(): Lodash; - noop(...args: Array): void; - nthArg(n: number): Function; - over(iteratees: Array): Function; - juxt(iteratees: Array): Function; - overEvery(predicates: Array): Function; - allPass(predicates: Array): Function; - overSome(predicates: Array): Function; - anyPass(predicates: Array): Function; - property( - path: Array | string - ): (object: Object | Array) => any; - property(path: Array | string, object: Object | Array): any; - propertyOf(object: Object): (path: Array | string) => Function; - propertyOf(object: Object, path: Array | string): Function; - range(start: number): (end: number) => Array; - range(start: number, end: number): Array; - rangeStep( - step: number - ): ((start: number) => (end: number) => Array) & - ((start: number, end: number) => Array); - rangeStep(step: number, start: number): (end: number) => Array; - rangeStep(step: number, start: number, end: number): Array; - rangeRight(start: number): (end: number) => Array; - rangeRight(start: number, end: number): Array; - rangeStepRight( - step: number - ): ((start: number) => (end: number) => Array) & - ((start: number, end: number) => Array); - rangeStepRight(step: number, start: number): (end: number) => Array; - rangeStepRight(step: number, start: number, end: number): Array; - runInContext(context: Object): Function; - - stubArray(): Array<*>; - stubFalse(): false; - F(): false; - stubObject(): {}; - stubString(): ""; - stubTrue(): true; - T(): true; - times(iteratee: (i: number) => T): (n: number) => Array; - times(iteratee: (i: number) => T, n: number): Array; - toPath(value: any): Array; - uniqueId(prefix: string): string; - - __: any; - placeholder: any; - - convert(options: { - cap?: boolean, - curry?: boolean, - fixed?: boolean, - immutable?: boolean, - rearg?: boolean - }): void; - - // Properties - VERSION: string; - templateSettings: TemplateSettings; - } - - declare module.exports: Lodash; -} - -declare module "lodash/chunk" { - declare module.exports: $PropertyType<$Exports<"lodash">, "chunk">; -} - -declare module "lodash/compact" { - declare module.exports: $PropertyType<$Exports<"lodash">, "compact">; -} - -declare module "lodash/concat" { - declare module.exports: $PropertyType<$Exports<"lodash">, "concat">; -} - -declare module "lodash/difference" { - declare module.exports: $PropertyType<$Exports<"lodash">, "difference">; -} - -declare module "lodash/differenceBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "differenceBy">; -} - -declare module "lodash/differenceWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "differenceWith">; -} - -declare module "lodash/drop" { - declare module.exports: $PropertyType<$Exports<"lodash">, "drop">; -} - -declare module "lodash/dropRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "dropRight">; -} - -declare module "lodash/dropRightWhile" { - declare module.exports: $PropertyType<$Exports<"lodash">, "dropRightWhile">; -} - -declare module "lodash/dropWhile" { - declare module.exports: $PropertyType<$Exports<"lodash">, "dropWhile">; -} - -declare module "lodash/fill" { - declare module.exports: $PropertyType<$Exports<"lodash">, "fill">; -} - -declare module "lodash/findIndex" { - declare module.exports: $PropertyType<$Exports<"lodash">, "findIndex">; -} - -declare module "lodash/findLastIndex" { - declare module.exports: $PropertyType<$Exports<"lodash">, "findLastIndex">; -} - -declare module "lodash/first" { - declare module.exports: $PropertyType<$Exports<"lodash">, "first">; -} - -declare module "lodash/flatten" { - declare module.exports: $PropertyType<$Exports<"lodash">, "flatten">; -} - -declare module "lodash/flattenDeep" { - declare module.exports: $PropertyType<$Exports<"lodash">, "flattenDeep">; -} - -declare module "lodash/flattenDepth" { - declare module.exports: $PropertyType<$Exports<"lodash">, "flattenDepth">; -} - -declare module "lodash/fromPairs" { - declare module.exports: $PropertyType<$Exports<"lodash">, "fromPairs">; -} - -declare module "lodash/head" { - declare module.exports: $PropertyType<$Exports<"lodash">, "head">; -} - -declare module "lodash/indexOf" { - declare module.exports: $PropertyType<$Exports<"lodash">, "indexOf">; -} - -declare module "lodash/initial" { - declare module.exports: $PropertyType<$Exports<"lodash">, "initial">; -} - -declare module "lodash/intersection" { - declare module.exports: $PropertyType<$Exports<"lodash">, "intersection">; -} - -declare module "lodash/intersectionBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "intersectionBy">; -} - -declare module "lodash/intersectionWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "intersectionWith">; -} - -declare module "lodash/join" { - declare module.exports: $PropertyType<$Exports<"lodash">, "join">; -} - -declare module "lodash/last" { - declare module.exports: $PropertyType<$Exports<"lodash">, "last">; -} - -declare module "lodash/lastIndexOf" { - declare module.exports: $PropertyType<$Exports<"lodash">, "lastIndexOf">; -} - -declare module "lodash/nth" { - declare module.exports: $PropertyType<$Exports<"lodash">, "nth">; -} - -declare module "lodash/pull" { - declare module.exports: $PropertyType<$Exports<"lodash">, "pull">; -} - -declare module "lodash/pullAll" { - declare module.exports: $PropertyType<$Exports<"lodash">, "pullAll">; -} - -declare module "lodash/pullAllBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "pullAllBy">; -} - -declare module "lodash/pullAllWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "pullAllWith">; -} - -declare module "lodash/pullAt" { - declare module.exports: $PropertyType<$Exports<"lodash">, "pullAt">; -} - -declare module "lodash/remove" { - declare module.exports: $PropertyType<$Exports<"lodash">, "remove">; -} - -declare module "lodash/reverse" { - declare module.exports: $PropertyType<$Exports<"lodash">, "reverse">; -} - -declare module "lodash/slice" { - declare module.exports: $PropertyType<$Exports<"lodash">, "slice">; -} - -declare module "lodash/sortedIndex" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sortedIndex">; -} - -declare module "lodash/sortedIndexBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sortedIndexBy">; -} - -declare module "lodash/sortedIndexOf" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sortedIndexOf">; -} - -declare module "lodash/sortedLastIndex" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sortedLastIndex">; -} - -declare module "lodash/sortedLastIndexBy" { - declare module.exports: $PropertyType< - $Exports<"lodash">, - "sortedLastIndexBy" - >; -} - -declare module "lodash/sortedLastIndexOf" { - declare module.exports: $PropertyType< - $Exports<"lodash">, - "sortedLastIndexOf" - >; -} - -declare module "lodash/sortedUniq" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sortedUniq">; -} - -declare module "lodash/sortedUniqBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sortedUniqBy">; -} - -declare module "lodash/tail" { - declare module.exports: $PropertyType<$Exports<"lodash">, "tail">; -} - -declare module "lodash/take" { - declare module.exports: $PropertyType<$Exports<"lodash">, "take">; -} - -declare module "lodash/takeRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "takeRight">; -} - -declare module "lodash/takeRightWhile" { - declare module.exports: $PropertyType<$Exports<"lodash">, "takeRightWhile">; -} - -declare module "lodash/takeWhile" { - declare module.exports: $PropertyType<$Exports<"lodash">, "takeWhile">; -} - -declare module "lodash/union" { - declare module.exports: $PropertyType<$Exports<"lodash">, "union">; -} - -declare module "lodash/unionBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "unionBy">; -} - -declare module "lodash/unionWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "unionWith">; -} - -declare module "lodash/uniq" { - declare module.exports: $PropertyType<$Exports<"lodash">, "uniq">; -} - -declare module "lodash/uniqBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "uniqBy">; -} - -declare module "lodash/uniqWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "uniqWith">; -} - -declare module "lodash/unzip" { - declare module.exports: $PropertyType<$Exports<"lodash">, "unzip">; -} - -declare module "lodash/unzipWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "unzipWith">; -} - -declare module "lodash/without" { - declare module.exports: $PropertyType<$Exports<"lodash">, "without">; -} - -declare module "lodash/xor" { - declare module.exports: $PropertyType<$Exports<"lodash">, "xor">; -} - -declare module "lodash/xorBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "xorBy">; -} - -declare module "lodash/xorWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "xorWith">; -} - -declare module "lodash/zip" { - declare module.exports: $PropertyType<$Exports<"lodash">, "zip">; -} - -declare module "lodash/zipObject" { - declare module.exports: $PropertyType<$Exports<"lodash">, "zipObject">; -} - -declare module "lodash/zipObjectDeep" { - declare module.exports: $PropertyType<$Exports<"lodash">, "zipObjectDeep">; -} - -declare module "lodash/zipWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "zipWith">; -} - -declare module "lodash/countBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "countBy">; -} - -declare module "lodash/each" { - declare module.exports: $PropertyType<$Exports<"lodash">, "each">; -} - -declare module "lodash/eachRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "eachRight">; -} - -declare module "lodash/every" { - declare module.exports: $PropertyType<$Exports<"lodash">, "every">; -} - -declare module "lodash/filter" { - declare module.exports: $PropertyType<$Exports<"lodash">, "filter">; -} - -declare module "lodash/find" { - declare module.exports: $PropertyType<$Exports<"lodash">, "find">; -} - -declare module "lodash/findLast" { - declare module.exports: $PropertyType<$Exports<"lodash">, "findLast">; -} - -declare module "lodash/flatMap" { - declare module.exports: $PropertyType<$Exports<"lodash">, "flatMap">; -} - -declare module "lodash/flatMapDeep" { - declare module.exports: $PropertyType<$Exports<"lodash">, "flatMapDeep">; -} - -declare module "lodash/flatMapDepth" { - declare module.exports: $PropertyType<$Exports<"lodash">, "flatMapDepth">; -} - -declare module "lodash/forEach" { - declare module.exports: $PropertyType<$Exports<"lodash">, "forEach">; -} - -declare module "lodash/forEachRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "forEachRight">; -} - -declare module "lodash/groupBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "groupBy">; -} - -declare module "lodash/includes" { - declare module.exports: $PropertyType<$Exports<"lodash">, "includes">; -} - -declare module "lodash/invokeMap" { - declare module.exports: $PropertyType<$Exports<"lodash">, "invokeMap">; -} - -declare module "lodash/keyBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "keyBy">; -} - -declare module "lodash/map" { - declare module.exports: $PropertyType<$Exports<"lodash">, "map">; -} - -declare module "lodash/orderBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "orderBy">; -} - -declare module "lodash/partition" { - declare module.exports: $PropertyType<$Exports<"lodash">, "partition">; -} - -declare module "lodash/reduce" { - declare module.exports: $PropertyType<$Exports<"lodash">, "reduce">; -} - -declare module "lodash/reduceRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "reduceRight">; -} - -declare module "lodash/reject" { - declare module.exports: $PropertyType<$Exports<"lodash">, "reject">; -} - -declare module "lodash/sample" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sample">; -} - -declare module "lodash/sampleSize" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sampleSize">; -} - -declare module "lodash/shuffle" { - declare module.exports: $PropertyType<$Exports<"lodash">, "shuffle">; -} - -declare module "lodash/size" { - declare module.exports: $PropertyType<$Exports<"lodash">, "size">; -} - -declare module "lodash/some" { - declare module.exports: $PropertyType<$Exports<"lodash">, "some">; -} - -declare module "lodash/sortBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sortBy">; -} - -declare module "lodash/now" { - declare module.exports: $PropertyType<$Exports<"lodash">, "now">; -} - -declare module "lodash/after" { - declare module.exports: $PropertyType<$Exports<"lodash">, "after">; -} - -declare module "lodash/ary" { - declare module.exports: $PropertyType<$Exports<"lodash">, "ary">; -} - -declare module "lodash/before" { - declare module.exports: $PropertyType<$Exports<"lodash">, "before">; -} - -declare module "lodash/bind" { - declare module.exports: $PropertyType<$Exports<"lodash">, "bind">; -} - -declare module "lodash/bindKey" { - declare module.exports: $PropertyType<$Exports<"lodash">, "bindKey">; -} - -declare module "lodash/curry" { - declare module.exports: $PropertyType<$Exports<"lodash">, "curry">; -} - -declare module "lodash/curryRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "curryRight">; -} - -declare module "lodash/debounce" { - declare module.exports: $PropertyType<$Exports<"lodash">, "debounce">; -} - -declare module "lodash/defer" { - declare module.exports: $PropertyType<$Exports<"lodash">, "defer">; -} - -declare module "lodash/delay" { - declare module.exports: $PropertyType<$Exports<"lodash">, "delay">; -} - -declare module "lodash/flip" { - declare module.exports: $PropertyType<$Exports<"lodash">, "flip">; -} - -declare module "lodash/memoize" { - declare module.exports: $PropertyType<$Exports<"lodash">, "memoize">; -} - -declare module "lodash/negate" { - declare module.exports: $PropertyType<$Exports<"lodash">, "negate">; -} - -declare module "lodash/once" { - declare module.exports: $PropertyType<$Exports<"lodash">, "once">; -} - -declare module "lodash/overArgs" { - declare module.exports: $PropertyType<$Exports<"lodash">, "overArgs">; -} - -declare module "lodash/partial" { - declare module.exports: $PropertyType<$Exports<"lodash">, "partial">; -} - -declare module "lodash/partialRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "partialRight">; -} - -declare module "lodash/rearg" { - declare module.exports: $PropertyType<$Exports<"lodash">, "rearg">; -} - -declare module "lodash/rest" { - declare module.exports: $PropertyType<$Exports<"lodash">, "rest">; -} - -declare module "lodash/spread" { - declare module.exports: $PropertyType<$Exports<"lodash">, "spread">; -} - -declare module "lodash/throttle" { - declare module.exports: $PropertyType<$Exports<"lodash">, "throttle">; -} - -declare module "lodash/unary" { - declare module.exports: $PropertyType<$Exports<"lodash">, "unary">; -} - -declare module "lodash/wrap" { - declare module.exports: $PropertyType<$Exports<"lodash">, "wrap">; -} - -declare module "lodash/castArray" { - declare module.exports: $PropertyType<$Exports<"lodash">, "castArray">; -} - -declare module "lodash/clone" { - declare module.exports: $PropertyType<$Exports<"lodash">, "clone">; -} - -declare module "lodash/cloneDeep" { - declare module.exports: $PropertyType<$Exports<"lodash">, "cloneDeep">; -} - -declare module "lodash/cloneDeepWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "cloneDeepWith">; -} - -declare module "lodash/cloneWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "cloneWith">; -} - -declare module "lodash/conformsTo" { - declare module.exports: $PropertyType<$Exports<"lodash">, "conformsTo">; -} - -declare module "lodash/eq" { - declare module.exports: $PropertyType<$Exports<"lodash">, "eq">; -} - -declare module "lodash/gt" { - declare module.exports: $PropertyType<$Exports<"lodash">, "gt">; -} - -declare module "lodash/gte" { - declare module.exports: $PropertyType<$Exports<"lodash">, "gte">; -} - -declare module "lodash/isArguments" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isArguments">; -} - -declare module "lodash/isArray" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isArray">; -} - -declare module "lodash/isArrayBuffer" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isArrayBuffer">; -} - -declare module "lodash/isArrayLike" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isArrayLike">; -} - -declare module "lodash/isArrayLikeObject" { - declare module.exports: $PropertyType< - $Exports<"lodash">, - "isArrayLikeObject" - >; -} - -declare module "lodash/isBoolean" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isBoolean">; -} - -declare module "lodash/isBuffer" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isBuffer">; -} - -declare module "lodash/isDate" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isDate">; -} - -declare module "lodash/isElement" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isElement">; -} - -declare module "lodash/isEmpty" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isEmpty">; -} - -declare module "lodash/isEqual" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isEqual">; -} - -declare module "lodash/isEqualWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isEqualWith">; -} - -declare module "lodash/isError" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isError">; -} - -declare module "lodash/isFinite" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isFinite">; -} - -declare module "lodash/isFunction" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isFunction">; -} - -declare module "lodash/isInteger" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isInteger">; -} - -declare module "lodash/isLength" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isLength">; -} - -declare module "lodash/isMap" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isMap">; -} - -declare module "lodash/isMatch" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isMatch">; -} - -declare module "lodash/isMatchWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isMatchWith">; -} - -declare module "lodash/isNaN" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isNaN">; -} - -declare module "lodash/isNative" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isNative">; -} - -declare module "lodash/isNil" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isNil">; -} - -declare module "lodash/isNull" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isNull">; -} - -declare module "lodash/isNumber" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isNumber">; -} - -declare module "lodash/isObject" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isObject">; -} - -declare module "lodash/isObjectLike" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isObjectLike">; -} - -declare module "lodash/isPlainObject" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isPlainObject">; -} - -declare module "lodash/isRegExp" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isRegExp">; -} - -declare module "lodash/isSafeInteger" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isSafeInteger">; -} - -declare module "lodash/isSet" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isSet">; -} - -declare module "lodash/isString" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isString">; -} - -declare module "lodash/isSymbol" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isSymbol">; -} - -declare module "lodash/isTypedArray" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isTypedArray">; -} - -declare module "lodash/isUndefined" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isUndefined">; -} - -declare module "lodash/isWeakMap" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isWeakMap">; -} - -declare module "lodash/isWeakSet" { - declare module.exports: $PropertyType<$Exports<"lodash">, "isWeakSet">; -} - -declare module "lodash/lt" { - declare module.exports: $PropertyType<$Exports<"lodash">, "lt">; -} - -declare module "lodash/lte" { - declare module.exports: $PropertyType<$Exports<"lodash">, "lte">; -} - -declare module "lodash/toArray" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toArray">; -} - -declare module "lodash/toFinite" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toFinite">; -} - -declare module "lodash/toInteger" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toInteger">; -} - -declare module "lodash/toLength" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toLength">; -} - -declare module "lodash/toNumber" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toNumber">; -} - -declare module "lodash/toPlainObject" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toPlainObject">; -} - -declare module "lodash/toSafeInteger" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toSafeInteger">; -} - -declare module "lodash/toString" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toString">; -} - -declare module "lodash/add" { - declare module.exports: $PropertyType<$Exports<"lodash">, "add">; -} - -declare module "lodash/ceil" { - declare module.exports: $PropertyType<$Exports<"lodash">, "ceil">; -} - -declare module "lodash/divide" { - declare module.exports: $PropertyType<$Exports<"lodash">, "divide">; -} - -declare module "lodash/floor" { - declare module.exports: $PropertyType<$Exports<"lodash">, "floor">; -} - -declare module "lodash/max" { - declare module.exports: $PropertyType<$Exports<"lodash">, "max">; -} - -declare module "lodash/maxBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "maxBy">; -} - -declare module "lodash/mean" { - declare module.exports: $PropertyType<$Exports<"lodash">, "mean">; -} - -declare module "lodash/meanBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "meanBy">; -} - -declare module "lodash/min" { - declare module.exports: $PropertyType<$Exports<"lodash">, "min">; -} - -declare module "lodash/minBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "minBy">; -} - -declare module "lodash/multiply" { - declare module.exports: $PropertyType<$Exports<"lodash">, "multiply">; -} - -declare module "lodash/round" { - declare module.exports: $PropertyType<$Exports<"lodash">, "round">; -} - -declare module "lodash/subtract" { - declare module.exports: $PropertyType<$Exports<"lodash">, "subtract">; -} - -declare module "lodash/sum" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sum">; -} - -declare module "lodash/sumBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "sumBy">; -} - -declare module "lodash/clamp" { - declare module.exports: $PropertyType<$Exports<"lodash">, "clamp">; -} - -declare module "lodash/inRange" { - declare module.exports: $PropertyType<$Exports<"lodash">, "inRange">; -} - -declare module "lodash/random" { - declare module.exports: $PropertyType<$Exports<"lodash">, "random">; -} - -declare module "lodash/assign" { - declare module.exports: $PropertyType<$Exports<"lodash">, "assign">; -} - -declare module "lodash/assignIn" { - declare module.exports: $PropertyType<$Exports<"lodash">, "assignIn">; -} - -declare module "lodash/assignInWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "assignInWith">; -} - -declare module "lodash/assignWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "assignWith">; -} - -declare module "lodash/at" { - declare module.exports: $PropertyType<$Exports<"lodash">, "at">; -} - -declare module "lodash/create" { - declare module.exports: $PropertyType<$Exports<"lodash">, "create">; -} - -declare module "lodash/defaults" { - declare module.exports: $PropertyType<$Exports<"lodash">, "defaults">; -} - -declare module "lodash/defaultsDeep" { - declare module.exports: $PropertyType<$Exports<"lodash">, "defaultsDeep">; -} - -declare module "lodash/entries" { - declare module.exports: $PropertyType<$Exports<"lodash">, "entries">; -} - -declare module "lodash/entriesIn" { - declare module.exports: $PropertyType<$Exports<"lodash">, "entriesIn">; -} - -declare module "lodash/extend" { - declare module.exports: $PropertyType<$Exports<"lodash">, "extend">; -} - -declare module "lodash/extendWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "extendWith">; -} - -declare module "lodash/findKey" { - declare module.exports: $PropertyType<$Exports<"lodash">, "findKey">; -} - -declare module "lodash/findLastKey" { - declare module.exports: $PropertyType<$Exports<"lodash">, "findLastKey">; -} - -declare module "lodash/forIn" { - declare module.exports: $PropertyType<$Exports<"lodash">, "forIn">; -} - -declare module "lodash/forInRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "forInRight">; -} - -declare module "lodash/forOwn" { - declare module.exports: $PropertyType<$Exports<"lodash">, "forOwn">; -} - -declare module "lodash/forOwnRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "forOwnRight">; -} - -declare module "lodash/functions" { - declare module.exports: $PropertyType<$Exports<"lodash">, "functions">; -} - -declare module "lodash/functionsIn" { - declare module.exports: $PropertyType<$Exports<"lodash">, "functionsIn">; -} - -declare module "lodash/get" { - declare module.exports: $PropertyType<$Exports<"lodash">, "get">; -} - -declare module "lodash/has" { - declare module.exports: $PropertyType<$Exports<"lodash">, "has">; -} - -declare module "lodash/hasIn" { - declare module.exports: $PropertyType<$Exports<"lodash">, "hasIn">; -} - -declare module "lodash/invert" { - declare module.exports: $PropertyType<$Exports<"lodash">, "invert">; -} - -declare module "lodash/invertBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "invertBy">; -} - -declare module "lodash/invoke" { - declare module.exports: $PropertyType<$Exports<"lodash">, "invoke">; -} - -declare module "lodash/keys" { - declare module.exports: $PropertyType<$Exports<"lodash">, "keys">; -} - -declare module "lodash/keysIn" { - declare module.exports: $PropertyType<$Exports<"lodash">, "keysIn">; -} - -declare module "lodash/mapKeys" { - declare module.exports: $PropertyType<$Exports<"lodash">, "mapKeys">; -} - -declare module "lodash/mapValues" { - declare module.exports: $PropertyType<$Exports<"lodash">, "mapValues">; -} - -declare module "lodash/merge" { - declare module.exports: $PropertyType<$Exports<"lodash">, "merge">; -} - -declare module "lodash/mergeWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "mergeWith">; -} - -declare module "lodash/omit" { - declare module.exports: $PropertyType<$Exports<"lodash">, "omit">; -} - -declare module "lodash/omitBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "omitBy">; -} - -declare module "lodash/pick" { - declare module.exports: $PropertyType<$Exports<"lodash">, "pick">; -} - -declare module "lodash/pickBy" { - declare module.exports: $PropertyType<$Exports<"lodash">, "pickBy">; -} - -declare module "lodash/result" { - declare module.exports: $PropertyType<$Exports<"lodash">, "result">; -} - -declare module "lodash/set" { - declare module.exports: $PropertyType<$Exports<"lodash">, "set">; -} - -declare module "lodash/setWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "setWith">; -} - -declare module "lodash/toPairs" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toPairs">; -} - -declare module "lodash/toPairsIn" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toPairsIn">; -} - -declare module "lodash/transform" { - declare module.exports: $PropertyType<$Exports<"lodash">, "transform">; -} - -declare module "lodash/unset" { - declare module.exports: $PropertyType<$Exports<"lodash">, "unset">; -} - -declare module "lodash/update" { - declare module.exports: $PropertyType<$Exports<"lodash">, "update">; -} - -declare module "lodash/updateWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "updateWith">; -} - -declare module "lodash/values" { - declare module.exports: $PropertyType<$Exports<"lodash">, "values">; -} - -declare module "lodash/valuesIn" { - declare module.exports: $PropertyType<$Exports<"lodash">, "valuesIn">; -} - -declare module "lodash/chain" { - declare module.exports: $PropertyType<$Exports<"lodash">, "chain">; -} - -declare module "lodash/tap" { - declare module.exports: $PropertyType<$Exports<"lodash">, "tap">; -} - -declare module "lodash/thru" { - declare module.exports: $PropertyType<$Exports<"lodash">, "thru">; -} - -declare module "lodash/camelCase" { - declare module.exports: $PropertyType<$Exports<"lodash">, "camelCase">; -} - -declare module "lodash/capitalize" { - declare module.exports: $PropertyType<$Exports<"lodash">, "capitalize">; -} - -declare module "lodash/deburr" { - declare module.exports: $PropertyType<$Exports<"lodash">, "deburr">; -} - -declare module "lodash/endsWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "endsWith">; -} - -declare module "lodash/escape" { - declare module.exports: $PropertyType<$Exports<"lodash">, "escape">; -} - -declare module "lodash/escapeRegExp" { - declare module.exports: $PropertyType<$Exports<"lodash">, "escapeRegExp">; -} - -declare module "lodash/kebabCase" { - declare module.exports: $PropertyType<$Exports<"lodash">, "kebabCase">; -} - -declare module "lodash/lowerCase" { - declare module.exports: $PropertyType<$Exports<"lodash">, "lowerCase">; -} - -declare module "lodash/lowerFirst" { - declare module.exports: $PropertyType<$Exports<"lodash">, "lowerFirst">; -} - -declare module "lodash/pad" { - declare module.exports: $PropertyType<$Exports<"lodash">, "pad">; -} - -declare module "lodash/padEnd" { - declare module.exports: $PropertyType<$Exports<"lodash">, "padEnd">; -} - -declare module "lodash/padStart" { - declare module.exports: $PropertyType<$Exports<"lodash">, "padStart">; -} - -declare module "lodash/parseInt" { - declare module.exports: $PropertyType<$Exports<"lodash">, "parseInt">; -} - -declare module "lodash/repeat" { - declare module.exports: $PropertyType<$Exports<"lodash">, "repeat">; -} - -declare module "lodash/replace" { - declare module.exports: $PropertyType<$Exports<"lodash">, "replace">; -} - -declare module "lodash/snakeCase" { - declare module.exports: $PropertyType<$Exports<"lodash">, "snakeCase">; -} - -declare module "lodash/split" { - declare module.exports: $PropertyType<$Exports<"lodash">, "split">; -} - -declare module "lodash/startCase" { - declare module.exports: $PropertyType<$Exports<"lodash">, "startCase">; -} - -declare module "lodash/startsWith" { - declare module.exports: $PropertyType<$Exports<"lodash">, "startsWith">; -} - -declare module "lodash/template" { - declare module.exports: $PropertyType<$Exports<"lodash">, "template">; -} - -declare module "lodash/toLower" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toLower">; -} - -declare module "lodash/toUpper" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toUpper">; -} - -declare module "lodash/trim" { - declare module.exports: $PropertyType<$Exports<"lodash">, "trim">; -} - -declare module "lodash/trimEnd" { - declare module.exports: $PropertyType<$Exports<"lodash">, "trimEnd">; -} - -declare module "lodash/trimStart" { - declare module.exports: $PropertyType<$Exports<"lodash">, "trimStart">; -} - -declare module "lodash/truncate" { - declare module.exports: $PropertyType<$Exports<"lodash">, "truncate">; -} - -declare module "lodash/unescape" { - declare module.exports: $PropertyType<$Exports<"lodash">, "unescape">; -} - -declare module "lodash/upperCase" { - declare module.exports: $PropertyType<$Exports<"lodash">, "upperCase">; -} - -declare module "lodash/upperFirst" { - declare module.exports: $PropertyType<$Exports<"lodash">, "upperFirst">; -} - -declare module "lodash/words" { - declare module.exports: $PropertyType<$Exports<"lodash">, "words">; -} - -declare module "lodash/attempt" { - declare module.exports: $PropertyType<$Exports<"lodash">, "attempt">; -} - -declare module "lodash/bindAll" { - declare module.exports: $PropertyType<$Exports<"lodash">, "bindAll">; -} - -declare module "lodash/cond" { - declare module.exports: $PropertyType<$Exports<"lodash">, "cond">; -} - -declare module "lodash/conforms" { - declare module.exports: $PropertyType<$Exports<"lodash">, "conforms">; -} - -declare module "lodash/constant" { - declare module.exports: $PropertyType<$Exports<"lodash">, "constant">; -} - -declare module "lodash/defaultTo" { - declare module.exports: $PropertyType<$Exports<"lodash">, "defaultTo">; -} - -declare module "lodash/flow" { - declare module.exports: $PropertyType<$Exports<"lodash">, "flow">; -} - -declare module "lodash/flowRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "flowRight">; -} - -declare module "lodash/identity" { - declare module.exports: $PropertyType<$Exports<"lodash">, "identity">; -} - -declare module "lodash/iteratee" { - declare module.exports: $PropertyType<$Exports<"lodash">, "iteratee">; -} - -declare module "lodash/matches" { - declare module.exports: $PropertyType<$Exports<"lodash">, "matches">; -} - -declare module "lodash/matchesProperty" { - declare module.exports: $PropertyType<$Exports<"lodash">, "matchesProperty">; -} - -declare module "lodash/method" { - declare module.exports: $PropertyType<$Exports<"lodash">, "method">; -} - -declare module "lodash/methodOf" { - declare module.exports: $PropertyType<$Exports<"lodash">, "methodOf">; -} - -declare module "lodash/mixin" { - declare module.exports: $PropertyType<$Exports<"lodash">, "mixin">; -} - -declare module "lodash/noConflict" { - declare module.exports: $PropertyType<$Exports<"lodash">, "noConflict">; -} - -declare module "lodash/noop" { - declare module.exports: $PropertyType<$Exports<"lodash">, "noop">; -} - -declare module "lodash/nthArg" { - declare module.exports: $PropertyType<$Exports<"lodash">, "nthArg">; -} - -declare module "lodash/over" { - declare module.exports: $PropertyType<$Exports<"lodash">, "over">; -} - -declare module "lodash/overEvery" { - declare module.exports: $PropertyType<$Exports<"lodash">, "overEvery">; -} - -declare module "lodash/overSome" { - declare module.exports: $PropertyType<$Exports<"lodash">, "overSome">; -} - -declare module "lodash/property" { - declare module.exports: $PropertyType<$Exports<"lodash">, "property">; -} - -declare module "lodash/propertyOf" { - declare module.exports: $PropertyType<$Exports<"lodash">, "propertyOf">; -} - -declare module "lodash/range" { - declare module.exports: $PropertyType<$Exports<"lodash">, "range">; -} - -declare module "lodash/rangeRight" { - declare module.exports: $PropertyType<$Exports<"lodash">, "rangeRight">; -} - -declare module "lodash/runInContext" { - declare module.exports: $PropertyType<$Exports<"lodash">, "runInContext">; -} - -declare module "lodash/stubArray" { - declare module.exports: $PropertyType<$Exports<"lodash">, "stubArray">; -} - -declare module "lodash/stubFalse" { - declare module.exports: $PropertyType<$Exports<"lodash">, "stubFalse">; -} - -declare module "lodash/stubObject" { - declare module.exports: $PropertyType<$Exports<"lodash">, "stubObject">; -} - -declare module "lodash/stubString" { - declare module.exports: $PropertyType<$Exports<"lodash">, "stubString">; -} - -declare module "lodash/stubTrue" { - declare module.exports: $PropertyType<$Exports<"lodash">, "stubTrue">; -} - -declare module "lodash/times" { - declare module.exports: $PropertyType<$Exports<"lodash">, "times">; -} - -declare module "lodash/toPath" { - declare module.exports: $PropertyType<$Exports<"lodash">, "toPath">; -} - -declare module "lodash/uniqueId" { - declare module.exports: $PropertyType<$Exports<"lodash">, "uniqueId">; -} - -declare module "lodash/fp/chunk" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "chunk">; -} - -declare module "lodash/fp/compact" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "compact">; -} - -declare module "lodash/fp/concat" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "concat">; -} - -declare module "lodash/fp/difference" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "difference">; -} - -declare module "lodash/fp/differenceBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "differenceBy">; -} - -declare module "lodash/fp/differenceWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "differenceWith">; -} - -declare module "lodash/fp/drop" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "drop">; -} - -declare module "lodash/fp/dropLast" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dropLast">; -} - -declare module "lodash/fp/dropRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dropRight">; -} - -declare module "lodash/fp/dropRightWhile" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dropRightWhile">; -} - -declare module "lodash/fp/dropWhile" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dropWhile">; -} - -declare module "lodash/fp/dropLastWhile" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dropLastWhile">; -} - -declare module "lodash/fp/fill" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "fill">; -} - -declare module "lodash/fp/findIndex" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findIndex">; -} - -declare module "lodash/fp/findIndexFrom" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findIndexFrom">; -} - -declare module "lodash/fp/findLastIndex" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findLastIndex">; -} - -declare module "lodash/fp/findLastIndexFrom" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findLastIndexFrom">; -} - -declare module "lodash/fp/first" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "first">; -} - -declare module "lodash/fp/flatten" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flatten">; -} - -declare module "lodash/fp/unnest" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unnest">; -} - -declare module "lodash/fp/flattenDeep" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flattenDeep">; -} - -declare module "lodash/fp/flattenDepth" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flattenDepth">; -} - -declare module "lodash/fp/fromPairs" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "fromPairs">; -} - -declare module "lodash/fp/head" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "head">; -} - -declare module "lodash/fp/indexOf" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "indexOf">; -} - -declare module "lodash/fp/indexOfFrom" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "indexOfFrom">; -} - -declare module "lodash/fp/initial" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "initial">; -} - -declare module "lodash/fp/init" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "init">; -} - -declare module "lodash/fp/intersection" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "intersection">; -} - -declare module "lodash/fp/intersectionBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "intersectionBy">; -} - -declare module "lodash/fp/intersectionWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "intersectionWith">; -} - -declare module "lodash/fp/join" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "join">; -} - -declare module "lodash/fp/last" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "last">; -} - -declare module "lodash/fp/lastIndexOf" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lastIndexOf">; -} - -declare module "lodash/fp/lastIndexOfFrom" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lastIndexOfFrom">; -} - -declare module "lodash/fp/nth" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "nth">; -} - -declare module "lodash/fp/pull" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pull">; -} - -declare module "lodash/fp/pullAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pullAll">; -} - -declare module "lodash/fp/pullAllBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pullAllBy">; -} - -declare module "lodash/fp/pullAllWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pullAllWith">; -} - -declare module "lodash/fp/pullAt" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pullAt">; -} - -declare module "lodash/fp/remove" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "remove">; -} - -declare module "lodash/fp/reverse" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "reverse">; -} - -declare module "lodash/fp/slice" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "slice">; -} - -declare module "lodash/fp/sortedIndex" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedIndex">; -} - -declare module "lodash/fp/sortedIndexBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedIndexBy">; -} - -declare module "lodash/fp/sortedIndexOf" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedIndexOf">; -} - -declare module "lodash/fp/sortedLastIndex" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedLastIndex">; -} - -declare module "lodash/fp/sortedLastIndexBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedLastIndexBy">; -} - -declare module "lodash/fp/sortedLastIndexOf" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedLastIndexOf">; -} - -declare module "lodash/fp/sortedUniq" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedUniq">; -} - -declare module "lodash/fp/sortedUniqBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedUniqBy">; -} - -declare module "lodash/fp/tail" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "tail">; -} - -declare module "lodash/fp/take" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "take">; -} - -declare module "lodash/fp/takeRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "takeRight">; -} - -declare module "lodash/fp/takeLast" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "takeLast">; -} - -declare module "lodash/fp/takeRightWhile" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "takeRightWhile">; -} - -declare module "lodash/fp/takeLastWhile" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "takeLastWhile">; -} - -declare module "lodash/fp/takeWhile" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "takeWhile">; -} - -declare module "lodash/fp/union" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "union">; -} - -declare module "lodash/fp/unionBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unionBy">; -} - -declare module "lodash/fp/unionWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unionWith">; -} - -declare module "lodash/fp/uniq" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "uniq">; -} - -declare module "lodash/fp/uniqBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "uniqBy">; -} - -declare module "lodash/fp/uniqWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "uniqWith">; -} - -declare module "lodash/fp/unzip" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unzip">; -} - -declare module "lodash/fp/unzipWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unzipWith">; -} - -declare module "lodash/fp/without" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "without">; -} - -declare module "lodash/fp/xor" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "xor">; -} - -declare module "lodash/fp/symmetricDifference" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "symmetricDifference">; -} - -declare module "lodash/fp/xorBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "xorBy">; -} - -declare module "lodash/fp/symmetricDifferenceBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "symmetricDifferenceBy">; -} - -declare module "lodash/fp/xorWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "xorWith">; -} - -declare module "lodash/fp/symmetricDifferenceWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "symmetricDifferenceWith">; -} - -declare module "lodash/fp/zip" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zip">; -} - -declare module "lodash/fp/zipAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zipAll">; -} - -declare module "lodash/fp/zipObject" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zipObject">; -} - -declare module "lodash/fp/zipObj" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zipObj">; -} - -declare module "lodash/fp/zipObjectDeep" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zipObjectDeep">; -} - -declare module "lodash/fp/zipWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zipWith">; -} - -declare module "lodash/fp/countBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "countBy">; -} - -declare module "lodash/fp/each" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "each">; -} - -declare module "lodash/fp/eachRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "eachRight">; -} - -declare module "lodash/fp/every" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "every">; -} - -declare module "lodash/fp/all" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "all">; -} - -declare module "lodash/fp/filter" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "filter">; -} - -declare module "lodash/fp/find" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "find">; -} - -declare module "lodash/fp/findFrom" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findFrom">; -} - -declare module "lodash/fp/findLast" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findLast">; -} - -declare module "lodash/fp/findLastFrom" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findLastFrom">; -} - -declare module "lodash/fp/flatMap" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flatMap">; -} - -declare module "lodash/fp/flatMapDeep" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flatMapDeep">; -} - -declare module "lodash/fp/flatMapDepth" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flatMapDepth">; -} - -declare module "lodash/fp/forEach" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forEach">; -} - -declare module "lodash/fp/forEachRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forEachRight">; -} - -declare module "lodash/fp/groupBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "groupBy">; -} - -declare module "lodash/fp/includes" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "includes">; -} - -declare module "lodash/fp/contains" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "contains">; -} - -declare module "lodash/fp/includesFrom" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "includesFrom">; -} - -declare module "lodash/fp/invokeMap" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invokeMap">; -} - -declare module "lodash/fp/invokeArgsMap" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invokeArgsMap">; -} - -declare module "lodash/fp/keyBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "keyBy">; -} - -declare module "lodash/fp/indexBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "indexBy">; -} - -declare module "lodash/fp/map" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "map">; -} - -declare module "lodash/fp/pluck" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pluck">; -} - -declare module "lodash/fp/orderBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "orderBy">; -} - -declare module "lodash/fp/partition" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "partition">; -} - -declare module "lodash/fp/reduce" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "reduce">; -} - -declare module "lodash/fp/reduceRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "reduceRight">; -} - -declare module "lodash/fp/reject" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "reject">; -} - -declare module "lodash/fp/sample" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sample">; -} - -declare module "lodash/fp/sampleSize" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sampleSize">; -} - -declare module "lodash/fp/shuffle" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "shuffle">; -} - -declare module "lodash/fp/size" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "size">; -} - -declare module "lodash/fp/some" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "some">; -} - -declare module "lodash/fp/any" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "any">; -} - -declare module "lodash/fp/sortBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortBy">; -} - -declare module "lodash/fp/now" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "now">; -} - -declare module "lodash/fp/after" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "after">; -} - -declare module "lodash/fp/ary" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "ary">; -} - -declare module "lodash/fp/nAry" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "nAry">; -} - -declare module "lodash/fp/before" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "before">; -} - -declare module "lodash/fp/bind" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "bind">; -} - -declare module "lodash/fp/bindKey" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "bindKey">; -} - -declare module "lodash/fp/curry" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "curry">; -} - -declare module "lodash/fp/curryN" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "curryN">; -} - -declare module "lodash/fp/curryRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "curryRight">; -} - -declare module "lodash/fp/curryRightN" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "curryRightN">; -} - -declare module "lodash/fp/debounce" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "debounce">; -} - -declare module "lodash/fp/defer" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defer">; -} - -declare module "lodash/fp/delay" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "delay">; -} - -declare module "lodash/fp/flip" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flip">; -} - -declare module "lodash/fp/memoize" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "memoize">; -} - -declare module "lodash/fp/negate" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "negate">; -} - -declare module "lodash/fp/complement" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "complement">; -} - -declare module "lodash/fp/once" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "once">; -} - -declare module "lodash/fp/overArgs" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "overArgs">; -} - -declare module "lodash/fp/useWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "useWith">; -} - -declare module "lodash/fp/partial" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "partial">; -} - -declare module "lodash/fp/partialRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "partialRight">; -} - -declare module "lodash/fp/rearg" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "rearg">; -} - -declare module "lodash/fp/rest" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "rest">; -} - -declare module "lodash/fp/unapply" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unapply">; -} - -declare module "lodash/fp/restFrom" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "restFrom">; -} - -declare module "lodash/fp/spread" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "spread">; -} - -declare module "lodash/fp/apply" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "apply">; -} - -declare module "lodash/fp/spreadFrom" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "spreadFrom">; -} - -declare module "lodash/fp/throttle" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "throttle">; -} - -declare module "lodash/fp/unary" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unary">; -} - -declare module "lodash/fp/wrap" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "wrap">; -} - -declare module "lodash/fp/castArray" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "castArray">; -} - -declare module "lodash/fp/clone" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "clone">; -} - -declare module "lodash/fp/cloneDeep" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "cloneDeep">; -} - -declare module "lodash/fp/cloneDeepWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "cloneDeepWith">; -} - -declare module "lodash/fp/cloneWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "cloneWith">; -} - -declare module "lodash/fp/conformsTo" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "conformsTo">; -} - -declare module "lodash/fp/where" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "where">; -} - -declare module "lodash/fp/conforms" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "conforms">; -} - -declare module "lodash/fp/eq" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "eq">; -} - -declare module "lodash/fp/identical" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "identical">; -} - -declare module "lodash/fp/gt" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "gt">; -} - -declare module "lodash/fp/gte" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "gte">; -} - -declare module "lodash/fp/isArguments" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isArguments">; -} - -declare module "lodash/fp/isArray" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isArray">; -} - -declare module "lodash/fp/isArrayBuffer" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isArrayBuffer">; -} - -declare module "lodash/fp/isArrayLike" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isArrayLike">; -} - -declare module "lodash/fp/isArrayLikeObject" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isArrayLikeObject">; -} - -declare module "lodash/fp/isBoolean" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isBoolean">; -} - -declare module "lodash/fp/isBuffer" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isBuffer">; -} - -declare module "lodash/fp/isDate" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isDate">; -} - -declare module "lodash/fp/isElement" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isElement">; -} - -declare module "lodash/fp/isEmpty" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isEmpty">; -} - -declare module "lodash/fp/isEqual" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isEqual">; -} - -declare module "lodash/fp/equals" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "equals">; -} - -declare module "lodash/fp/isEqualWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isEqualWith">; -} - -declare module "lodash/fp/isError" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isError">; -} - -declare module "lodash/fp/isFinite" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isFinite">; -} - -declare module "lodash/fp/isFunction" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isFunction">; -} - -declare module "lodash/fp/isInteger" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isInteger">; -} - -declare module "lodash/fp/isLength" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isLength">; -} - -declare module "lodash/fp/isMap" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isMap">; -} - -declare module "lodash/fp/isMatch" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isMatch">; -} - -declare module "lodash/fp/whereEq" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "whereEq">; -} - -declare module "lodash/fp/isMatchWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isMatchWith">; -} - -declare module "lodash/fp/isNaN" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isNaN">; -} - -declare module "lodash/fp/isNative" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isNative">; -} - -declare module "lodash/fp/isNil" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isNil">; -} - -declare module "lodash/fp/isNull" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isNull">; -} - -declare module "lodash/fp/isNumber" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isNumber">; -} - -declare module "lodash/fp/isObject" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isObject">; -} - -declare module "lodash/fp/isObjectLike" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isObjectLike">; -} - -declare module "lodash/fp/isPlainObject" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isPlainObject">; -} - -declare module "lodash/fp/isRegExp" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isRegExp">; -} - -declare module "lodash/fp/isSafeInteger" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isSafeInteger">; -} - -declare module "lodash/fp/isSet" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isSet">; -} - -declare module "lodash/fp/isString" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isString">; -} - -declare module "lodash/fp/isSymbol" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isSymbol">; -} - -declare module "lodash/fp/isTypedArray" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isTypedArray">; -} - -declare module "lodash/fp/isUndefined" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isUndefined">; -} - -declare module "lodash/fp/isWeakMap" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isWeakMap">; -} - -declare module "lodash/fp/isWeakSet" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isWeakSet">; -} - -declare module "lodash/fp/lt" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lt">; -} - -declare module "lodash/fp/lte" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lte">; -} - -declare module "lodash/fp/toArray" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toArray">; -} - -declare module "lodash/fp/toFinite" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toFinite">; -} - -declare module "lodash/fp/toInteger" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toInteger">; -} - -declare module "lodash/fp/toLength" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toLength">; -} - -declare module "lodash/fp/toNumber" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toNumber">; -} - -declare module "lodash/fp/toPlainObject" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toPlainObject">; -} - -declare module "lodash/fp/toSafeInteger" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toSafeInteger">; -} - -declare module "lodash/fp/toString" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toString">; -} - -declare module "lodash/fp/add" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "add">; -} - -declare module "lodash/fp/ceil" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "ceil">; -} - -declare module "lodash/fp/divide" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "divide">; -} - -declare module "lodash/fp/floor" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "floor">; -} - -declare module "lodash/fp/max" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "max">; -} - -declare module "lodash/fp/maxBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "maxBy">; -} - -declare module "lodash/fp/mean" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mean">; -} - -declare module "lodash/fp/meanBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "meanBy">; -} - -declare module "lodash/fp/min" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "min">; -} - -declare module "lodash/fp/minBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "minBy">; -} - -declare module "lodash/fp/multiply" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "multiply">; -} - -declare module "lodash/fp/round" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "round">; -} - -declare module "lodash/fp/subtract" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "subtract">; -} - -declare module "lodash/fp/sum" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sum">; -} - -declare module "lodash/fp/sumBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sumBy">; -} - -declare module "lodash/fp/clamp" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "clamp">; -} - -declare module "lodash/fp/inRange" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "inRange">; -} - -declare module "lodash/fp/random" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "random">; -} - -declare module "lodash/fp/assign" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assign">; -} - -declare module "lodash/fp/assignAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignAll">; -} - -declare module "lodash/fp/assignInAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignInAll">; -} - -declare module "lodash/fp/extendAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "extendAll">; -} - -declare module "lodash/fp/assignIn" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignIn">; -} - -declare module "lodash/fp/assignInWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignInWith">; -} - -declare module "lodash/fp/assignWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignWith">; -} - -declare module "lodash/fp/assignInAllWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignInAllWith">; -} - -declare module "lodash/fp/extendAllWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "extendAllWith">; -} - -declare module "lodash/fp/assignAllWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignAllWith">; -} - -declare module "lodash/fp/at" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "at">; -} - -declare module "lodash/fp/props" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "props">; -} - -declare module "lodash/fp/paths" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "paths">; -} - -declare module "lodash/fp/create" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "create">; -} - -declare module "lodash/fp/defaults" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defaults">; -} - -declare module "lodash/fp/defaultsAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defaultsAll">; -} - -declare module "lodash/fp/defaultsDeep" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defaultsDeep">; -} - -declare module "lodash/fp/defaultsDeepAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defaultsDeepAll">; -} - -declare module "lodash/fp/entries" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "entries">; -} - -declare module "lodash/fp/entriesIn" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "entriesIn">; -} - -declare module "lodash/fp/extend" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "extend">; -} - -declare module "lodash/fp/extendWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "extendWith">; -} - -declare module "lodash/fp/findKey" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findKey">; -} - -declare module "lodash/fp/findLastKey" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findLastKey">; -} - -declare module "lodash/fp/forIn" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forIn">; -} - -declare module "lodash/fp/forInRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forInRight">; -} - -declare module "lodash/fp/forOwn" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forOwn">; -} - -declare module "lodash/fp/forOwnRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forOwnRight">; -} - -declare module "lodash/fp/functions" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "functions">; -} - -declare module "lodash/fp/functionsIn" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "functionsIn">; -} - -declare module "lodash/fp/get" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "get">; -} - -declare module "lodash/fp/prop" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "prop">; -} - -declare module "lodash/fp/path" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "path">; -} - -declare module "lodash/fp/getOr" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "getOr">; -} - -declare module "lodash/fp/propOr" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "propOr">; -} - -declare module "lodash/fp/pathOr" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pathOr">; -} - -declare module "lodash/fp/has" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "has">; -} - -declare module "lodash/fp/hasIn" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "hasIn">; -} - -declare module "lodash/fp/invert" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invert">; -} - -declare module "lodash/fp/invertObj" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invertObj">; -} - -declare module "lodash/fp/invertBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invertBy">; -} - -declare module "lodash/fp/invoke" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invoke">; -} - -declare module "lodash/fp/invokeArgs" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invokeArgs">; -} - -declare module "lodash/fp/keys" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "keys">; -} - -declare module "lodash/fp/keysIn" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "keysIn">; -} - -declare module "lodash/fp/mapKeys" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mapKeys">; -} - -declare module "lodash/fp/mapValues" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mapValues">; -} - -declare module "lodash/fp/merge" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "merge">; -} - -declare module "lodash/fp/mergeAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mergeAll">; -} - -declare module "lodash/fp/mergeWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mergeWith">; -} - -declare module "lodash/fp/mergeAllWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mergeAllWith">; -} - -declare module "lodash/fp/omit" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "omit">; -} - -declare module "lodash/fp/omitAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "omitAll">; -} - -declare module "lodash/fp/omitBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "omitBy">; -} - -declare module "lodash/fp/pick" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pick">; -} - -declare module "lodash/fp/pickAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pickAll">; -} - -declare module "lodash/fp/pickBy" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pickBy">; -} - -declare module "lodash/fp/result" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "result">; -} - -declare module "lodash/fp/set" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "set">; -} - -declare module "lodash/fp/assoc" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assoc">; -} - -declare module "lodash/fp/assocPath" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assocPath">; -} - -declare module "lodash/fp/setWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "setWith">; -} - -declare module "lodash/fp/toPairs" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toPairs">; -} - -declare module "lodash/fp/toPairsIn" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toPairsIn">; -} - -declare module "lodash/fp/transform" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "transform">; -} - -declare module "lodash/fp/unset" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unset">; -} - -declare module "lodash/fp/dissoc" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dissoc">; -} - -declare module "lodash/fp/dissocPath" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dissocPath">; -} - -declare module "lodash/fp/update" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "update">; -} - -declare module "lodash/fp/updateWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "updateWith">; -} - -declare module "lodash/fp/values" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "values">; -} - -declare module "lodash/fp/valuesIn" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "valuesIn">; -} - -declare module "lodash/fp/tap" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "tap">; -} - -declare module "lodash/fp/thru" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "thru">; -} - -declare module "lodash/fp/camelCase" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "camelCase">; -} - -declare module "lodash/fp/capitalize" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "capitalize">; -} - -declare module "lodash/fp/deburr" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "deburr">; -} - -declare module "lodash/fp/endsWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "endsWith">; -} - -declare module "lodash/fp/escape" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "escape">; -} - -declare module "lodash/fp/escapeRegExp" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "escapeRegExp">; -} - -declare module "lodash/fp/kebabCase" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "kebabCase">; -} - -declare module "lodash/fp/lowerCase" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lowerCase">; -} - -declare module "lodash/fp/lowerFirst" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lowerFirst">; -} - -declare module "lodash/fp/pad" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pad">; -} - -declare module "lodash/fp/padChars" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "padChars">; -} - -declare module "lodash/fp/padEnd" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "padEnd">; -} - -declare module "lodash/fp/padCharsEnd" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "padCharsEnd">; -} - -declare module "lodash/fp/padStart" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "padStart">; -} - -declare module "lodash/fp/padCharsStart" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "padCharsStart">; -} - -declare module "lodash/fp/parseInt" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "parseInt">; -} - -declare module "lodash/fp/repeat" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "repeat">; -} - -declare module "lodash/fp/replace" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "replace">; -} - -declare module "lodash/fp/snakeCase" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "snakeCase">; -} - -declare module "lodash/fp/split" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "split">; -} - -declare module "lodash/fp/startCase" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "startCase">; -} - -declare module "lodash/fp/startsWith" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "startsWith">; -} - -declare module "lodash/fp/template" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "template">; -} - -declare module "lodash/fp/toLower" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toLower">; -} - -declare module "lodash/fp/toUpper" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toUpper">; -} - -declare module "lodash/fp/trim" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trim">; -} - -declare module "lodash/fp/trimChars" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trimChars">; -} - -declare module "lodash/fp/trimEnd" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trimEnd">; -} - -declare module "lodash/fp/trimCharsEnd" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trimCharsEnd">; -} - -declare module "lodash/fp/trimStart" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trimStart">; -} - -declare module "lodash/fp/trimCharsStart" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trimCharsStart">; -} - -declare module "lodash/fp/truncate" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "truncate">; -} - -declare module "lodash/fp/unescape" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unescape">; -} - -declare module "lodash/fp/upperCase" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "upperCase">; -} - -declare module "lodash/fp/upperFirst" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "upperFirst">; -} - -declare module "lodash/fp/words" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "words">; -} - -declare module "lodash/fp/attempt" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "attempt">; -} - -declare module "lodash/fp/bindAll" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "bindAll">; -} - -declare module "lodash/fp/cond" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "cond">; -} - -declare module "lodash/fp/constant" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "constant">; -} - -declare module "lodash/fp/always" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "always">; -} - -declare module "lodash/fp/defaultTo" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defaultTo">; -} - -declare module "lodash/fp/flow" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flow">; -} - -declare module "lodash/fp/pipe" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pipe">; -} - -declare module "lodash/fp/flowRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flowRight">; -} - -declare module "lodash/fp/compose" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "compose">; -} - -declare module "lodash/fp/identity" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "identity">; -} - -declare module "lodash/fp/iteratee" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "iteratee">; -} - -declare module "lodash/fp/matches" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "matches">; -} - -declare module "lodash/fp/matchesProperty" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "matchesProperty">; -} - -declare module "lodash/fp/propEq" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "propEq">; -} - -declare module "lodash/fp/pathEq" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pathEq">; -} - -declare module "lodash/fp/method" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "method">; -} - -declare module "lodash/fp/methodOf" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "methodOf">; -} - -declare module "lodash/fp/mixin" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mixin">; -} - -declare module "lodash/fp/noConflict" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "noConflict">; -} - -declare module "lodash/fp/noop" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "noop">; -} - -declare module "lodash/fp/nthArg" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "nthArg">; -} - -declare module "lodash/fp/over" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "over">; -} - -declare module "lodash/fp/juxt" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "juxt">; -} - -declare module "lodash/fp/overEvery" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "overEvery">; -} - -declare module "lodash/fp/allPass" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "allPass">; -} - -declare module "lodash/fp/overSome" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "overSome">; -} - -declare module "lodash/fp/anyPass" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "anyPass">; -} - -declare module "lodash/fp/property" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "property">; -} - -declare module "lodash/fp/propertyOf" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "propertyOf">; -} - -declare module "lodash/fp/range" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "range">; -} - -declare module "lodash/fp/rangeStep" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "rangeStep">; -} - -declare module "lodash/fp/rangeRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "rangeRight">; -} - -declare module "lodash/fp/rangeStepRight" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "rangeStepRight">; -} - -declare module "lodash/fp/runInContext" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "runInContext">; -} - -declare module "lodash/fp/stubArray" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "stubArray">; -} - -declare module "lodash/fp/stubFalse" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "stubFalse">; -} - -declare module "lodash/fp/F" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "F">; -} - -declare module "lodash/fp/stubObject" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "stubObject">; -} - -declare module "lodash/fp/stubString" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "stubString">; -} - -declare module "lodash/fp/stubTrue" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "stubTrue">; -} - -declare module "lodash/fp/T" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "T">; -} - -declare module "lodash/fp/times" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "times">; -} - -declare module "lodash/fp/toPath" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toPath">; -} - -declare module "lodash/fp/uniqueId" { - declare module.exports: $PropertyType<$Exports<"lodash/fp">, "uniqueId">; -} diff --git a/flow-typed/npm/lz-string_vx.x.x.js b/flow-typed/npm/lz-string_vx.x.x.js deleted file mode 100644 index 6a7894bb59..0000000000 --- a/flow-typed/npm/lz-string_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 9bed3805cd2369af8e16fef06ff2e060 -// flow-typed version: <>/lz-string_v^1.4.4/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'lz-string' - * - * 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 'lz-string' { - declare module.exports: any; -} diff --git a/flow-typed/npm/mem_vx.x.x.js b/flow-typed/npm/mem_vx.x.x.js deleted file mode 100644 index ad29a2bc91..0000000000 --- a/flow-typed/npm/mem_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 223298fdfc0b9d058d1dbd1c240484e6 -// flow-typed version: <>/mem_v^4.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'mem' - * - * 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 'mem' { - declare module.exports: any; -} diff --git a/flow-typed/npm/meow_vx.x.x.js b/flow-typed/npm/meow_vx.x.x.js deleted file mode 100644 index ddd14a9e45..0000000000 --- a/flow-typed/npm/meow_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: ebb86aa5abda34d1f7dff67f8c58f7f8 -// flow-typed version: <>/meow_v^5.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'meow' - * - * 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 'meow' { - declare module.exports: any; -} diff --git a/flow-typed/npm/mini-css-extract-plugin_vx.x.x.js b/flow-typed/npm/mini-css-extract-plugin_vx.x.x.js deleted file mode 100644 index 0773c58267..0000000000 --- a/flow-typed/npm/mini-css-extract-plugin_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: c652e6fab81d6705337fdc64be5ef365 -// flow-typed version: <>/mini-css-extract-plugin_v^0.4.3/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'mini-css-extract-plugin' - * - * 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 'mini-css-extract-plugin' { - declare module.exports: any; -} diff --git a/flow-typed/npm/mkdirp_v0.5.x.js b/flow-typed/npm/mkdirp_v0.5.x.js deleted file mode 100644 index e26f9a4be7..0000000000 --- a/flow-typed/npm/mkdirp_v0.5.x.js +++ /dev/null @@ -1,13 +0,0 @@ -// flow-typed signature: 82aa0feffc2bbd64dce3bec492f5d601 -// flow-typed version: 3315d89a00/mkdirp_v0.5.x/flow_>=v0.25.0 - -declare module 'mkdirp' { - declare type Options = number | { mode?: number; fs?: mixed }; - - declare type Callback = (err: ?Error, path: ?string) => void; - - declare module.exports: { - (path: string, options?: Options | Callback, callback?: Callback): void; - sync(path: string, options?: Options): void; - }; -} diff --git a/flow-typed/npm/node-fetch_vx.x.x.js b/flow-typed/npm/node-fetch_vx.x.x.js deleted file mode 100644 index d735e70db4..0000000000 --- a/flow-typed/npm/node-fetch_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: bdfc3625890ec0a2eb4986a0fbb3b9a6 -// flow-typed version: <>/node-fetch_v2.1.2/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'node-fetch' - * - * 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 'node-fetch' { - declare module.exports: any; -} diff --git a/flow-typed/npm/node-sass_vx.x.x.js b/flow-typed/npm/node-sass_vx.x.x.js deleted file mode 100644 index b92c9195b0..0000000000 --- a/flow-typed/npm/node-sass_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 5a564a73e71af9f4ff0b20df0e40dd59 -// flow-typed version: <>/node-sass_v4.8.3/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'node-sass' - * - * 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 'node-sass' { - declare module.exports: any; -} diff --git a/flow-typed/npm/ord_vx.x.x.js b/flow-typed/npm/ord_vx.x.x.js deleted file mode 100644 index 90f3afdba8..0000000000 --- a/flow-typed/npm/ord_vx.x.x.js +++ /dev/null @@ -1,6 +0,0 @@ -// flow-typed signature: faa29c4a8c916d4ec8f930935b4e183e -// flow-typed version: <>/ord_v0.1.1/flow_v0.64.0 - -declare module 'ord' { - declare export default function ordinal(any): string; -} diff --git a/flow-typed/npm/p-props_vx.x.x.js b/flow-typed/npm/p-props_vx.x.x.js deleted file mode 100644 index 53eadf24ed..0000000000 --- a/flow-typed/npm/p-props_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 95db2fdc8691a0ae9513aa9ff1aea5e9 -// flow-typed version: <>/p-props_v^1.2.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'p-props' - * - * 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 'p-props' { - declare module.exports: any; -} diff --git a/flow-typed/npm/p-series_vx.x.x.js b/flow-typed/npm/p-series_vx.x.x.js deleted file mode 100644 index c70921914c..0000000000 --- a/flow-typed/npm/p-series_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 73bcac411f4d50797d984966363e754b -// flow-typed version: <>/p-series_v^1.1.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'p-series' - * - * 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 'p-series' { - declare module.exports: any; -} diff --git a/flow-typed/npm/p-settle_vx.x.x.js b/flow-typed/npm/p-settle_vx.x.x.js deleted file mode 100644 index 1e0506bcff..0000000000 --- a/flow-typed/npm/p-settle_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: e4e79a8768c3d7d493a434bf20721134 -// flow-typed version: <>/p-settle_v^2.1.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'p-settle' - * - * 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 'p-settle' { - declare module.exports: any; -} diff --git a/flow-typed/npm/pegjs_vx.x.x.js b/flow-typed/npm/pegjs_vx.x.x.js deleted file mode 100644 index ff9cc302cc..0000000000 --- a/flow-typed/npm/pegjs_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 68f7ddf40484eb9aed74d98db8ecff15 -// flow-typed version: <>/pegjs_v^0.10.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'pegjs' - * - * 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 'pegjs' { - declare module.exports: any; -} diff --git a/flow-typed/npm/pify_v3.x.x.js b/flow-typed/npm/pify_v3.x.x.js deleted file mode 100644 index 9597b5b815..0000000000 --- a/flow-typed/npm/pify_v3.x.x.js +++ /dev/null @@ -1,22 +0,0 @@ -// flow-typed signature: 4e2c2165eabcf00092e6d9d2222940ac -// flow-typed version: 2e22276b15/pify_v3.x.x/flow_>=v0.25.x - -type $npm$pify$CPSFunction = (...args: any[]) => any; - -type $npm$pify$Options = { - multiArgs?: boolean, - include?: Array, - exclude?: Array, - excludeMain?: boolean, - errorFirst?: boolean, - promiseModule?: () => any -}; - -type $npm$pify$PromisifiedFunction = (...args: any[]) => Promise<*>; - -declare module "pify" { - declare module.exports: ( - input: $npm$pify$CPSFunction | Object, - options?: $npm$pify$Options - ) => (...args: any[]) => Promise<*> | Object; -} diff --git a/flow-typed/npm/plur_vx.x.x.js b/flow-typed/npm/plur_vx.x.x.js deleted file mode 100644 index f55a4d501d..0000000000 --- a/flow-typed/npm/plur_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 7f0638eee970f10d93a2cc1382756bf9 -// flow-typed version: <>/plur_v^3.0.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'plur' - * - * 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 'plur' { - declare module.exports: any; -} diff --git a/flow-typed/npm/present_vx.x.x.js b/flow-typed/npm/present_vx.x.x.js deleted file mode 100644 index 3441ef96a6..0000000000 --- a/flow-typed/npm/present_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 7537a3ae9713088de1f271b1f9dd355e -// flow-typed version: <>/present_v1.0.0/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'present' - * - * 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 'present' { - declare module.exports: () => number; -} diff --git a/flow-typed/npm/prettier_v1.x.x.js b/flow-typed/npm/prettier_v1.x.x.js deleted file mode 100644 index 0c24491525..0000000000 --- a/flow-typed/npm/prettier_v1.x.x.js +++ /dev/null @@ -1,178 +0,0 @@ -// flow-typed signature: 4eed8da2dc730dc33e7710b465eaa44b -// flow-typed version: cc7a557b34/prettier_v1.x.x/flow_>=v0.56.x - -declare module "prettier" { - declare type AST = Object; - declare type Doc = Object; - declare type FastPath = Object; - - declare type PrettierParserName = - | "babylon" - | "flow" - | "typescript" - | "postcss" - | "css" - | "less" - | "scss" - | "json" - | "graphql" - | "markdown" - | "vue"; - - declare type PrettierParser = { - [name: PrettierParserName]: (text: string, options?: Object) => AST - }; - - declare type CustomParser = ( - text: string, - parsers: PrettierParser, - options: Options - ) => AST; - - declare type Options = {| - printWidth?: number, - tabWidth?: number, - useTabs?: boolean, - semi?: boolean, - singleQuote?: boolean, - trailingComma?: "none" | "es5" | "all", - bracketSpacing?: boolean, - jsxBracketSameLine?: boolean, - arrowParens?: "avoid" | "always", - rangeStart?: number, - rangeEnd?: number, - parser?: PrettierParserName | CustomParser, - filepath?: string, - requirePragma?: boolean, - insertPragma?: boolean, - proseWrap?: "always" | "never" | "preserve", - plugins?: Array - |}; - - declare type Plugin = { - languages: SupportLanguage, - parsers: { [parserName: string]: Parser }, - printers: { [astFormat: string]: Printer } - }; - - declare type Parser = { - parse: ( - text: string, - parsers: { [parserName: string]: Parser }, - options: Object - ) => AST, - astFormat: string - }; - - declare type Printer = { - print: ( - path: FastPath, - options: Object, - print: (path: FastPath) => Doc - ) => Doc, - embed: ( - path: FastPath, - print: (path: FastPath) => Doc, - textToDoc: (text: string, options: Object) => Doc, - options: Object - ) => ?Doc - }; - - declare type CursorOptions = {| - cursorOffset: number, - printWidth?: $PropertyType, - tabWidth?: $PropertyType, - useTabs?: $PropertyType, - semi?: $PropertyType, - singleQuote?: $PropertyType, - trailingComma?: $PropertyType, - bracketSpacing?: $PropertyType, - jsxBracketSameLine?: $PropertyType, - arrowParens?: $PropertyType, - parser?: $PropertyType, - filepath?: $PropertyType, - requirePragma?: $PropertyType, - insertPragma?: $PropertyType, - proseWrap?: $PropertyType, - plugins?: $PropertyType - |}; - - declare type CursorResult = {| - formatted: string, - cursorOffset: number - |}; - - declare type ResolveConfigOptions = {| - useCache?: boolean, - config?: string, - editorconfig?: boolean - |}; - - declare type SupportLanguage = { - name: string, - since: string, - parsers: Array, - group?: string, - tmScope: string, - aceMode: string, - codemirrorMode: string, - codemirrorMimeType: string, - aliases?: Array, - extensions: Array, - filenames?: Array, - linguistLanguageId: number, - vscodeLanguageIds: Array - }; - - declare type SupportOption = {| - since: string, - type: "int" | "boolean" | "choice" | "path", - deprecated?: string, - redirect?: SupportOptionRedirect, - description: string, - oppositeDescription?: string, - default: SupportOptionValue, - range?: SupportOptionRange, - choices?: SupportOptionChoice - |}; - - declare type SupportOptionRedirect = {| - options: string, - value: SupportOptionValue - |}; - - declare type SupportOptionRange = {| - start: number, - end: number, - step: number - |}; - - declare type SupportOptionChoice = {| - value: boolean | string, - description?: string, - since?: string, - deprecated?: string, - redirect?: SupportOptionValue - |}; - - declare type SupportOptionValue = number | boolean | string; - - declare type SupportInfo = {| - languages: Array, - options: Array - |}; - - declare type Prettier = {| - format: (source: string, options?: Options) => string, - check: (source: string, options?: Options) => boolean, - formatWithCursor: (source: string, options: CursorOptions) => CursorResult, - resolveConfig: { - (filePath: string, options?: ResolveConfigOptions): Promise, - sync(filePath: string, options?: ResolveConfigOptions): Promise - }, - clearConfigCache: () => void, - getSupportInfo: (version?: string) => SupportInfo - |}; - - declare export default Prettier; -} diff --git a/flow-typed/npm/pretty-ms_v3.x.x.js b/flow-typed/npm/pretty-ms_v3.x.x.js deleted file mode 100644 index 6a58c8ee21..0000000000 --- a/flow-typed/npm/pretty-ms_v3.x.x.js +++ /dev/null @@ -1,13 +0,0 @@ -// flow-typed signature: d1a1105eeb2861d864f8362b22b6ec7e -// flow-typed version: 872f3c99bd/pretty-ms_v3.x.x/flow_>=v0.25.x - -type Options = { - secDecimalDigits?: number, - msDecimalDigits?: number, - compact?: boolean, - verbose?: boolean -}; - -declare module 'pretty-ms' { - declare module.exports: (ms: number, opts?: Options) => string; -} diff --git a/flow-typed/npm/pretty-quick_vx.x.x.js b/flow-typed/npm/pretty-quick_vx.x.x.js deleted file mode 100644 index cf6d2cda52..0000000000 --- a/flow-typed/npm/pretty-quick_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 90072aadb9a8a8fdfa40623ca5fc1c0c -// flow-typed version: <>/pretty-quick_v^1.6.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'pretty-quick' - * - * 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 'pretty-quick' { - declare module.exports: any; -} diff --git a/flow-typed/npm/prop-types_v15.x.x.js b/flow-typed/npm/prop-types_v15.x.x.js deleted file mode 100644 index ba9478bfe0..0000000000 --- a/flow-typed/npm/prop-types_v15.x.x.js +++ /dev/null @@ -1,35 +0,0 @@ -// flow-typed signature: d9a983bb1ac458a256c31c139047bdbb -// flow-typed version: 927687984d/prop-types_v15.x.x/flow_>=v0.41.x - -type $npm$propTypes$ReactPropsCheckType = ( - props: any, - propName: string, - componentName: string, - href?: string) => ?Error; - -declare module 'prop-types' { - declare var array: React$PropType$Primitive>; - declare var bool: React$PropType$Primitive; - declare var func: React$PropType$Primitive; - declare var number: React$PropType$Primitive; - declare var object: React$PropType$Primitive; - declare var string: React$PropType$Primitive; - declare var symbol: React$PropType$Primitive; - declare var any: React$PropType$Primitive; - declare var arrayOf: React$PropType$ArrayOf; - declare var element: React$PropType$Primitive; /* TODO */ - declare var instanceOf: React$PropType$InstanceOf; - declare var node: React$PropType$Primitive; /* TODO */ - declare var objectOf: React$PropType$ObjectOf; - declare var oneOf: React$PropType$OneOf; - declare var oneOfType: React$PropType$OneOfType; - declare var shape: React$PropType$Shape; - - declare function checkPropTypes( - propTypes: $Subtype<{[_: $Keys]: $npm$propTypes$ReactPropsCheckType}>, - values: V, - location: string, - componentName: string, - getStack: ?(() => ?string) - ) : void; -} diff --git a/flow-typed/npm/react-codemirror2_vx.x.x.js b/flow-typed/npm/react-codemirror2_vx.x.x.js deleted file mode 100644 index e61ab2f4d2..0000000000 --- a/flow-typed/npm/react-codemirror2_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 09f8b562454ea5b4d3425944e962cc8a -// flow-typed version: <>/react-codemirror2_v^5.1.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'react-codemirror2' - * - * 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 'react-codemirror2' { - declare module.exports: any; -} diff --git a/flow-typed/npm/react-dnd-html5-backend_v2.x.x.js b/flow-typed/npm/react-dnd-html5-backend_v2.x.x.js deleted file mode 100644 index 83e08fc4a6..0000000000 --- a/flow-typed/npm/react-dnd-html5-backend_v2.x.x.js +++ /dev/null @@ -1,21 +0,0 @@ -// flow-typed signature: b517cd8873674b6ac09e799503836168 -// flow-typed version: 30815cf324/react-dnd-html5-backend_v2.x.x/flow_>=v0.25.x - -declare type $npm$reactDnd$NativeTypes$FILE = "__NATIVE_FILE__"; -declare type $npm$reactDnd$NativeTypes$URL = "__NATIVE_URL__"; -declare type $npm$reactDnd$NativeTypes$TEXT = "__NATIVE_TEXT__"; -declare type $npm$reactDnd$NativeTypes = - | $npm$reactDnd$NativeTypes$FILE - | $npm$reactDnd$NativeTypes$URL - | $npm$reactDnd$NativeTypes$TEXT; - -declare module "react-dnd-html5-backend" { - declare module.exports: { - getEmptyImage(): Image, - NativeTypes: { - FILE: $npm$reactDnd$NativeTypes$FILE, - URL: $npm$reactDnd$NativeTypes$URL, - TEXT: $npm$reactDnd$NativeTypes$TEXT - } - }; -} diff --git a/flow-typed/npm/react-dnd-html5-backend_v5.x.x.js b/flow-typed/npm/react-dnd-html5-backend_v5.x.x.js deleted file mode 100644 index 83e08fc4a6..0000000000 --- a/flow-typed/npm/react-dnd-html5-backend_v5.x.x.js +++ /dev/null @@ -1,21 +0,0 @@ -// flow-typed signature: b517cd8873674b6ac09e799503836168 -// flow-typed version: 30815cf324/react-dnd-html5-backend_v2.x.x/flow_>=v0.25.x - -declare type $npm$reactDnd$NativeTypes$FILE = "__NATIVE_FILE__"; -declare type $npm$reactDnd$NativeTypes$URL = "__NATIVE_URL__"; -declare type $npm$reactDnd$NativeTypes$TEXT = "__NATIVE_TEXT__"; -declare type $npm$reactDnd$NativeTypes = - | $npm$reactDnd$NativeTypes$FILE - | $npm$reactDnd$NativeTypes$URL - | $npm$reactDnd$NativeTypes$TEXT; - -declare module "react-dnd-html5-backend" { - declare module.exports: { - getEmptyImage(): Image, - NativeTypes: { - FILE: $npm$reactDnd$NativeTypes$FILE, - URL: $npm$reactDnd$NativeTypes$URL, - TEXT: $npm$reactDnd$NativeTypes$TEXT - } - }; -} diff --git a/flow-typed/npm/react-dnd_v2.x.x.js b/flow-typed/npm/react-dnd_v2.x.x.js deleted file mode 100644 index ab3653e52e..0000000000 --- a/flow-typed/npm/react-dnd_v2.x.x.js +++ /dev/null @@ -1,217 +0,0 @@ -// flow-typed signature: d2d738b2c235ce318de1ed4d17999f94 -// flow-typed version: ae3d771aa0/react-dnd_v2.x.x/flow_>=v0.53.x - -declare module "react-dnd" { - declare type Identifier = string; - - declare type ClientOffset = { - x: number, - y: number - }; - - declare type ElementOrNode = React$Element | HTMLElement; - - declare type DndOptions

= { - arePropsEqual?: (props: P, otherProps: P) => boolean - }; - - declare type ComponentClassWithDefaultProps = Class< - React$Component - > & { defaultProps: D }; - - declare type _InstanceOf> = I; - declare type InstanceOf = _InstanceOf<*, C>; - - declare class ConnectedComponent extends React$Component

{ - static DecoratedComponent: C, - getDecoratedComponentInstance(): I, - getHandlerId(): Identifier, - props: P, - state: void - } - - declare type Connector = (< - P: SP, - D, - S, - C: ComponentClassWithDefaultProps - >( - component: C - ) => Class< - ConnectedComponent, { ...CP } & $Diff<$Diff, CP>> - >) & - (>>( - component: C - ) => Class< - ConnectedComponent, { ...CP } & $Diff> - >) & - (>( - component: C - ) => Class>>); - - // Drag Source - // ---------------------------------------------------------------------- - - declare type DragSourceType

= Identifier | ((props: P) => Identifier); - - declare type DragSourceSpec

= { - beginDrag: ( - props: P, - monitor: DragSourceMonitor, - component: React$Component - ) => Object, - - endDrag?: ( - props: P, - monitor: DragSourceMonitor, - component: ?React$Component - ) => void, - - canDrag?: (props: P, monitor: DragSourceMonitor) => boolean, - - isDragging?: (props: P, monitor: DragSourceMonitor) => boolean - }; - - declare type DragSourceMonitor = { - canDrag: () => boolean, - isDragging: () => boolean, - getItemType: () => Identifier, - getItem: () => Object, - getDropResult: () => Object, - didDrop: () => boolean, - getInitialClientOffset: () => ClientOffset, - getInitialSourceClientOffset: () => ClientOffset, - getClientOffset: () => ClientOffset, - getDifferenceFromInitialOffset: () => ClientOffset, - getSourceClientOffset: () => ClientOffset - }; - - declare type DragSourceConnector = { - dragSource: () => ConnectDragSource, - dragPreview: () => ConnectDragPreview - }; - - declare type DragSourceOptions = { - dropEffect?: string - }; - - declare type DragPreviewOptions = { - captureDraggingState?: boolean, - anchorX?: number, - anchorY?: number - }; - - declare type ConnectDragSource = ( - elementOrNode: T, - options?: DragSourceOptions - ) => ?T; - - declare type ConnectDragPreview = ( - elementOrNode: T, - options?: DragPreviewOptions - ) => ?T; - - declare type DragSourceCollector = ( - connect: DragSourceConnector, - monitor: DragSourceMonitor - ) => T; - - declare function DragSource( - type: DragSourceType, - spec: DragSourceSpec, - collect: DragSourceCollector, - options?: DndOptions - ): Connector<$Supertype, CP>; - - // Drop Target - // ---------------------------------------------------------------------- - - declare type DropTargetTypes

= - | Identifier - | Array - | ((props: P) => Identifier | Array); - - declare type DropTargetSpec

= { - drop?: ( - props: P, - monitor: DropTargetMonitor, - component: React$Component - ) => ?Object, - - hover?: ( - props: P, - monitor: DropTargetMonitor, - component: React$Component - ) => void, - - canDrop?: (props: P, monitor: DropTargetMonitor) => boolean - }; - - declare type DropTargetMonitor = { - canDrop: () => boolean, - isOver: (options?: { shallow: boolean }) => boolean, - getItemType: () => Identifier, - getItem: () => Object, - getDropResult: () => Object, - didDrop: () => boolean, - getInitialClientOffset: () => ClientOffset, - getInitialSourceClientOffset: () => ClientOffset, - getClientOffset: () => ClientOffset, - getDifferenceFromInitialOffset: () => ClientOffset, - getSourceClientOffset: () => ClientOffset - }; - - declare type DropTargetConnector = { - dropTarget: () => ConnectDropTarget - }; - - declare type ConnectDropTarget = (elementOrNode: T) => ?T; - - declare type DropTargetCollector = ( - connect: DropTargetConnector, - monitor: DropTargetMonitor - ) => T; - - declare function DropTarget( - types: DropTargetTypes, - spec: DropTargetSpec, - collect: DropTargetCollector, - options?: DndOptions - ): Connector<$Supertype, CP>; - - // Drag Layer - // ---------------------------------------------------------------------- - - declare type DragLayerMonitor = { - isDragging: () => boolean, - getItemType: () => Identifier, - getItem: () => Object, - getInitialClientOffset: () => ClientOffset, - getInitialSourceClientOffset: () => ClientOffset, - getClientOffset: () => ClientOffset, - getDifferenceFromInitialOffset: () => ClientOffset, - getSourceClientOffset: () => ClientOffset - }; - - declare function DragLayer( - collect: (monitor: DragLayerMonitor) => CP, - options?: DndOptions - ): Connector<$Supertype, CP>; - - // Drag Drop Context - // ---------------------------------------------------------------------- - - declare type ProviderProps = { - backend: mixed, - children: React$Element, - window?: Object - }; - - declare class DragDropContextProvider extends React$Component { - props: ProviderProps; - } - - declare function DragDropContext( - backend: mixed - ): Connector<$Supertype, CP>; -} diff --git a/flow-typed/npm/react-dnd_v5.x.x.js b/flow-typed/npm/react-dnd_v5.x.x.js deleted file mode 100644 index 315ea37f2c..0000000000 --- a/flow-typed/npm/react-dnd_v5.x.x.js +++ /dev/null @@ -1,210 +0,0 @@ -// flow-typed signature: d2d738b2c235ce318de1ed4d17999f94 -// flow-typed version: ae3d771aa0/react-dnd_v2.x.x/flow_>=v0.53.x - -declare module "react-dnd" { - declare type Identifier = string | Symbol; - - declare type ClientOffset = { x: number, y: number }; - - declare type ElementOrNode = React.Element<*> | HTMLElement; - - declare type DndOptions

= { - arePropsEqual?: (props: P, otherProps: P) => boolean - }; - - declare type ComponentClassWithDefaultProps = Class< - React.Component - > & { defaultProps: D }; - - declare type _InstanceOf> = I; - declare type InstanceOf = _InstanceOf<*, C>; - - declare class ConnectedComponent extends React.Component

{ - static DecoratedComponent: C, - getDecoratedComponentInstance(): I, - getHandlerId(): Identifier, - props: P, - state: void - } - - declare type Connector = (< - P: SP, - D, - S, - C: ComponentClassWithDefaultProps - >(component: C) => - & Class, { ...CP } & $Diff<$Diff, CP>>>) - & (>>(component: C) => - & Class, { ...CP } - & $Diff>> - ) - & (>(component: C) => - Class>> - ); - - // Drag Source - // ---------------------------------------------------------------------- - - declare type DragSourceType

= Identifier | ((props: P) => Identifier); - - declare type DragSourceSpec

= { - beginDrag: ( - props: P, - monitor: DragSourceMonitor, - component: React$Component - ) => Object, - - endDrag?: ( - props: P, - monitor: DragSourceMonitor, - component: ?React$Component - ) => void, - - canDrag?: (props: P, monitor: DragSourceMonitor) => boolean, - - isDragging?: (props: P, monitor: DragSourceMonitor) => boolean - }; - - declare type DragSourceMonitor = { - canDrag: () => boolean, - isDragging: () => boolean, - getItemType: () => Identifier, - getItem: () => Object, - getDropResult: () => Object, - didDrop: () => boolean, - getInitialClientOffset: () => ClientOffset, - getInitialSourceClientOffset: () => ClientOffset, - getClientOffset: () => ClientOffset, - getDifferenceFromInitialOffset: () => ClientOffset, - getSourceClientOffset: () => ClientOffset - }; - - declare type DragSourceConnector = { - dragSource: () => ConnectDragSource, - dragPreview: () => ConnectDragPreview - }; - - declare type DragSourceOptions = { - dropEffect?: string - }; - - declare type DragPreviewOptions = { - captureDraggingState?: boolean, - anchorX?: number, - anchorY?: number - }; - - declare type ConnectDragSource = ( - elementOrNode: T, - options?: DragSourceOptions - ) => ?T; - - declare type ConnectDragPreview = ( - elementOrNode: T, - options?: DragPreviewOptions - ) => ?T; - - declare type DragSourceCollector = ( - connect: DragSourceConnector, - monitor: DragSourceMonitor - ) => T; - - declare function DragSource( - type: DragSourceType, - spec: DragSourceSpec, - collect: DragSourceCollector, - options?: DndOptions - ): Connector; - - // Drop Target - // ---------------------------------------------------------------------- - - declare type DropTargetTypes

= - | Identifier - | Array - | ((props: P) => Identifier | Array); - - declare type DropTargetSpec

= { - drop?: ( - props: P, - monitor: DropTargetMonitor, - component: React$Component - ) => ?Object, - - hover?: ( - props: P, - monitor: DropTargetMonitor, - component: React$Component - ) => void, - - canDrop?: (props: P, monitor: DropTargetMonitor) => boolean - }; - - declare type DropTargetMonitor = { - canDrop: () => boolean, - isOver: (options?: { shallow: boolean }) => boolean, - getItemType: () => Identifier, - getItem: () => Object, - getDropResult: () => Object, - didDrop: () => boolean, - getInitialClientOffset: () => ClientOffset, - getInitialSourceClientOffset: () => ClientOffset, - getClientOffset: () => ClientOffset, - getDifferenceFromInitialOffset: () => ClientOffset, - getSourceClientOffset: () => ClientOffset - }; - - declare type DropTargetConnector = { - dropTarget: () => ConnectDropTarget - }; - - declare type ConnectDropTarget = (elementOrNode: T) => ?T; - - declare type DropTargetCollector = ( - connect: DropTargetConnector, - monitor: DropTargetMonitor - ) => T; - - declare function DropTarget( - types: DropTargetTypes, - spec: DropTargetSpec, - collect: DropTargetCollector, - options?: DndOptions - ): Connector; - - // Drag Layer - // ---------------------------------------------------------------------- - - declare type DragLayerMonitor = { - isDragging: () => boolean, - getItemType: () => Identifier, - getItem: () => Object, - getInitialClientOffset: () => ClientOffset, - getInitialSourceClientOffset: () => ClientOffset, - getClientOffset: () => ClientOffset, - getDifferenceFromInitialOffset: () => ClientOffset, - getSourceClientOffset: () => ClientOffset - }; - - declare function DragLayer( - collect: (monitor: DragLayerMonitor) => CP, - options?: DndOptions - ): Connector; - - // Drag Drop Context - // ---------------------------------------------------------------------- - - declare type ProviderProps = { - backend: mixed, - children: React$Element, - window?: Object - }; - - declare class DragDropContextProvider extends React$Component { - props: ProviderProps; - } - - declare function DragDropContext( - backend: mixed - ): Connector; -} diff --git a/flow-typed/npm/react-document-title_vx.x.x.js b/flow-typed/npm/react-document-title_vx.x.x.js deleted file mode 100644 index a90dd0ea48..0000000000 --- a/flow-typed/npm/react-document-title_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 060989c6ee925fd8ed2edf648b4e8f9c -// flow-typed version: <>/react-document-title_v^2.0.3/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'react-document-title' - * - * 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 'react-document-title' { - declare module.exports: any; -} diff --git a/flow-typed/npm/react-dropzone_v4.x.x.js b/flow-typed/npm/react-dropzone_v4.x.x.js deleted file mode 100644 index 7fbf5edaf3..0000000000 --- a/flow-typed/npm/react-dropzone_v4.x.x.js +++ /dev/null @@ -1,56 +0,0 @@ -// flow-typed signature: b7af14fb84f1e89e79e941a6bcd03d15 -// flow-typed version: 80022b0008/react-dropzone_v4.x.x/flow_>=v0.53.x - -declare module "react-dropzone" { - declare type ChildrenProps = { - draggedFiles: Array, - acceptedFiles: Array, - rejectedFiles: Array, - isDragActive: boolean, - isDragAccept: boolean, - isDragReject: boolean, - } - - declare type DropzoneFile = File & { - preview?: string; - } - - declare type DropzoneProps = { - accept?: string, - children?: React$Node | (ChildrenProps) => React$Node, - disableClick?: boolean, - disabled?: boolean, - disablePreview?: boolean, - preventDropOnDocument?: boolean, - inputProps?: Object, - multiple?: boolean, - name?: string, - maxSize?: number, - minSize?: number, - className?: string, - activeClassName?: string, - acceptClassName?: string, - rejectClassName?: string, - disabledClassName?: string, - style?: Object, - activeStyle?: Object, - acceptStyle?: Object, - rejectStyle?: Object, - disabledStyle?: Object, - onClick?: (event: SyntheticMouseEvent<>) => mixed, - onDrop?: (acceptedFiles: Array, rejectedFiles: Array, event: SyntheticDragEvent<>) => mixed, - onDropAccepted?: (acceptedFiles: Array, event: SyntheticDragEvent<>) => mixed, - onDropRejected?: (rejectedFiles: Array, event: SyntheticDragEvent<>) => mixed, - onDragStart?: (event: SyntheticDragEvent<>) => mixed, - onDragEnter?: (event: SyntheticDragEvent<>) => mixed, - onDragOver?: (event: SyntheticDragEvent<>) => mixed, - onDragLeave?: (event: SyntheticDragEvent<>) => mixed, - onFileDialogCancel?: () => mixed, - }; - - declare class Dropzone extends React$Component { - open(): void; - } - - declare module.exports: typeof Dropzone; -} diff --git a/flow-typed/npm/react-loadable_v5.x.x.js b/flow-typed/npm/react-loadable_v5.x.x.js deleted file mode 100644 index 201be4c459..0000000000 --- a/flow-typed/npm/react-loadable_v5.x.x.js +++ /dev/null @@ -1,57 +0,0 @@ -// flow-typed signature: 1b34e99bd1d0fc26555aaa615f1459b6 -// flow-typed version: 3a79d57475/react-loadable_v5.x.x/flow_>=v0.56.0 - -declare module 'react-loadable' { - declare type LoadingProps = { - isLoading: boolean, - pastDelay: boolean, - timedOut: boolean, - retry: () => void, - error: ?Error - }; - - declare type CommonOptions = { - loading: React$ComponentType, - delay?: number, - timeout?: number, - modules?: Array, - webpack?: () => Array - }; - - declare type OptionsWithoutRender = { - ...CommonOptions, - loader(): Promise | { default: React$ComponentType }> - }; - - declare type OptionsWithRender = { - ...CommonOptions, - loader(): Promise, - render(loaded: TModule, props: TProps): React$Node - }; - - declare type Options = OptionsWithoutRender | OptionsWithRender; - - declare type MapOptions = { - ...CommonOptions, - loader: { - [key: $Keys]: () => Promise<*> - }, - render(loaded: TModules, props: TProps): React$Node - }; - - declare class LoadableComponent extends React$Component { - static preload(): Promise - } - - declare type CaptureProps = { - report(moduleName: string): void - }; - - declare module.exports: { - (opts: Options): Class>, - Map(opts: MapOptions): Class>, - Capture: React$ComponentType, - preloadAll(): Promise, - preloadReady(): Promise, - }; -} diff --git a/flow-typed/npm/react-modal_v3.1.x.js b/flow-typed/npm/react-modal_v3.1.x.js deleted file mode 100644 index 9fdf7dd417..0000000000 --- a/flow-typed/npm/react-modal_v3.1.x.js +++ /dev/null @@ -1,52 +0,0 @@ -// flow-typed signature: 07baeb1a13e7992234dac3ebfeeb3c4f -// flow-typed version: ee87414e77/react-modal_v3.1.x/flow_>=v0.54.1 - -declare module 'react-modal' { - declare type DefaultProps = { - isOpen?: boolean, - portalClassName?: string, - bodyOpenClassName?: string, - ariaHideApp?: boolean, - closeTimeoutMS?: number, - shouldFocusAfterRender?: boolean, - shouldCloseOnEsc?: boolean, - shouldCloseOnOverlayClick?: boolean, - shouldReturnFocusAfterClose?: boolean, - parentSelector?: () => HTMLElement, - }; - - declare type Props = DefaultProps & { - style?: { - content?: { - [key: string]: string | number - }, - overlay?: { - [key: string]: string | number - } - }, - className?: string | { - base: string, - afterOpen: string, - beforeClose: string - }, - overlayClassName?: string | { - base: string, - afterOpen: string, - beforeClose: string - }, - appElement?: HTMLElement | string | null, - onAfterOpen?: () => void | Promise, - onRequestClose?: (SyntheticEvent<>) => void, - aria?: { - [key: string]: string - }, - role?: string, - contentLabel?: string - }; - - declare class Modal extends React$Component { - static setAppElement(element: HTMLElement | string | null): void; - } - - declare module.exports: typeof Modal; -} diff --git a/flow-typed/npm/react-redux_v5.x.x.js b/flow-typed/npm/react-redux_v5.x.x.js deleted file mode 100644 index 759ad5a56e..0000000000 --- a/flow-typed/npm/react-redux_v5.x.x.js +++ /dev/null @@ -1,261 +0,0 @@ -// flow-typed signature: 502cfd4f5e95c6308f747cdf16dc93ce -// flow-typed version: 1751d5bf0a/react-redux_v5.x.x/flow_>=v0.68.0 - -declare module "react-redux" { - import type { ComponentType, ElementConfig } from 'react'; - - // These types are copied directly from the redux libdef. Importing them in - // this libdef causes a loss in type coverage. - declare type DispatchAPI = (action: A) => A; - declare type Dispatch }> = DispatchAPI; - declare type Reducer = (state: S | void, action: A) => S; - declare type Store> = { - dispatch: D; - getState(): S; - subscribe(listener: () => void): () => void; - replaceReducer(nextReducer: Reducer): void - }; - - declare export class Provider extends React$Component<{ - store: Store, - children?: any - }> {} - - declare export function createProvider( - storeKey?: string, - subKey?: string - ): Provider<*, *, *>; - - /* - - S = State - A = Action - OP = OwnProps - SP = StateProps - DP = DispatchProps - MP = Merge props - MDP = Map dispatch to props object - RSP = Returned state props - RDP = Returned dispatch props - RMP = Returned merge props - CP = Props for returned component - Com = React Component - ST = Static properties of Com - EFO = Extra factory options (used only in connectAdvanced) - */ - - declare type MapStateToProps = (state: S, props: SP) => RSP; - - declare type MapDispatchToProps = (dispatch: Dispatch, ownProps: OP) => RDP; - - declare type MergeProps = ( - stateProps: SP, - dispatchProps: DP, - ownProps: MP - ) => RMP; - - declare type ConnectOptions = {| - pure?: boolean, - withRef?: boolean, - areStatesEqual?: (next: S, prev: S) => boolean, - areOwnPropsEqual?: (next: OP, prev: OP) => boolean, - areStatePropsEqual?: (next: RSP, prev: RSP) => boolean, - areMergedPropsEqual?: (next: RMP, prev: RMP) => boolean, - storeKey?: string - |}; - - declare type OmitDispatch = $Diff}>; - - declare type ConnectAdvancedOptions = { - getDisplayName?: (name: string) => string, - methodName?: string, - renderCountProp?: string, - shouldHandleStateChanges?: boolean, - storeKey?: string, - withRef?: boolean, - }; - - declare type SelectorFactoryOptions = { - getDisplayName: (name: string) => string, - methodName: string, - renderCountProp: ?string, - shouldHandleStateChanges: boolean, - storeKey: string, - withRef: boolean, - displayName: string, - wrappedComponentName: string, - WrappedComponent: Com, - }; - - declare type SelectorFactory< - Com: ComponentType<*>, - A, - S: Object, - OP: Object, - EFO: Object, - CP: Object - > = (dispatch: Dispatch, factoryOptions: SelectorFactoryOptions & EFO) => - MapStateToProps; - - declare export function connectAdvanced< - Com: ComponentType<*>, - A, - S: Object, - OP: Object, - CP: Object, - EFO: Object, - ST: {[_: $Keys]: any} - >( - selectorFactory: SelectorFactory, - connectAdvancedOptions: ?(ConnectAdvancedOptions & EFO), - ): (component: Com) => ComponentType & $Shape; - - declare export function connect< - Com: ComponentType<*>, - S: Object, - SP: Object, - RSP: Object, - CP: $Diff>, RSP>, - ST: {[_: $Keys]: any} - >( - mapStateToProps: MapStateToProps, - mapDispatchToProps?: null - ): (component: Com) => ComponentType & $Shape; - - declare export function connect< - Com: ComponentType<*>, - ST: {[_: $Keys]: any} - >( - mapStateToProps?: null, - mapDispatchToProps?: null - ): (component: Com) => ComponentType>> & $Shape; - - declare export function connect< - Com: ComponentType<*>, - A, - S: Object, - DP: Object, - SP: Object, - RSP: Object, - RDP: Object, - CP: $Diff<$Diff, RSP>, RDP>, - ST: $Subtype<{[_: $Keys]: any}> - >( - mapStateToProps: MapStateToProps, - mapDispatchToProps: MapDispatchToProps - ): (component: Com) => ComponentType & $Shape; - - declare export function connect< - Com: ComponentType<*>, - A, - OP: Object, - DP: Object, - PR: Object, - CP: $Diff, DP>, - ST: $Subtype<{[_: $Keys]: any}> - >( - mapStateToProps?: null, - mapDispatchToProps: MapDispatchToProps - ): (Com) => ComponentType; - - declare export function connect< - Com: ComponentType<*>, - MDP: Object, - ST: $Subtype<{[_: $Keys]: any}> - >( - mapStateToProps?: null, - mapDispatchToProps: MDP - ): (component: Com) => ComponentType<$Diff, MDP>> & $Shape; - - declare export function connect< - Com: ComponentType<*>, - S: Object, - SP: Object, - RSP: Object, - MDP: Object, - CP: $Diff, RSP>, - ST: $Subtype<{[_: $Keys]: any}> - >( - mapStateToProps: MapStateToProps, - mapDispatchToProps: MDP - ): (component: Com) => ComponentType<$Diff & SP> & $Shape; - - declare export function connect< - Com: ComponentType<*>, - A, - S: Object, - DP: Object, - SP: Object, - RSP: Object, - RDP: Object, - MP: Object, - RMP: Object, - CP: $Diff, RMP>, - ST: $Subtype<{[_: $Keys]: any}> - >( - mapStateToProps: MapStateToProps, - mapDispatchToProps: ?MapDispatchToProps, - mergeProps: MergeProps - ): (component: Com) => ComponentType & $Shape; - - declare export function connect< - Com: ComponentType<*>, - A, - S: Object, - DP: Object, - SP: Object, - RSP: Object, - RDP: Object, - MDP: Object, - MP: Object, - RMP: Object, - CP: $Diff, RMP>, - ST: $Subtype<{[_: $Keys]: any}> - >( - mapStateToProps: MapStateToProps, - mapDispatchToProps: MDP, - mergeProps: MergeProps - ): (component: Com) => ComponentType & $Shape; - - declare export function connect, - A, - S: Object, - DP: Object, - SP: Object, - RSP: Object, - RDP: Object, - MP: Object, - RMP: Object, - ST: $Subtype<{[_: $Keys]: any}> - >( - mapStateToProps: ?MapStateToProps, - mapDispatchToProps: ?MapDispatchToProps, - mergeProps: ?MergeProps, - options: ConnectOptions - ): (component: Com) => ComponentType<$Diff, RMP> & SP & DP & MP> & $Shape; - - declare export function connect, - A, - S: Object, - DP: Object, - SP: Object, - RSP: Object, - RDP: Object, - MDP: Object, - MP: Object, - RMP: Object, - ST: $Subtype<{[_: $Keys]: any}> - >( - mapStateToProps: ?MapStateToProps, - mapDispatchToProps: ?MapDispatchToProps, - mergeProps: MDP, - options: ConnectOptions - ): (component: Com) => ComponentType<$Diff, RMP> & SP & DP & MP> & $Shape; - - declare export default { - Provider: typeof Provider, - createProvider: typeof createProvider, - connect: typeof connect, - connectAdvanced: typeof connectAdvanced, - }; -} diff --git a/flow-typed/npm/react-select_vx.x.x.js b/flow-typed/npm/react-select_vx.x.x.js deleted file mode 100644 index f4c22d3f85..0000000000 --- a/flow-typed/npm/react-select_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 3f93acd92f8bec6938179961940afaae -// flow-typed version: <>/react-select_v1.2.1/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'react-select' - * - * 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 'react-select' { - declare module.exports: any; -} diff --git a/flow-typed/npm/react-test-renderer_v16.x.x.js b/flow-typed/npm/react-test-renderer_v16.x.x.js deleted file mode 100644 index d4a7146e3e..0000000000 --- a/flow-typed/npm/react-test-renderer_v16.x.x.js +++ /dev/null @@ -1,75 +0,0 @@ -// flow-typed signature: 9b9f4128694a7f68659d945b81fb78ff -// flow-typed version: 46dfe79a54/react-test-renderer_v16.x.x/flow_>=v0.47.x - -// Type definitions for react-test-renderer 16.x.x -// Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-test-renderer - -type ReactComponentInstance = React$Component; - -type ReactTestRendererJSON = { - type: string, - props: { [propName: string]: any }, - children: null | ReactTestRendererJSON[] -}; - -type ReactTestRendererTree = ReactTestRendererJSON & { - nodeType: "component" | "host", - instance: ?ReactComponentInstance, - rendered: null | ReactTestRendererTree -}; - -type ReactTestInstance = { - instance: ?ReactComponentInstance, - type: string, - props: { [propName: string]: any }, - parent: null | ReactTestInstance, - children: Array, - - find(predicate: (node: ReactTestInstance) => boolean): ReactTestInstance, - findByType(type: React$ElementType): ReactTestInstance, - findByProps(props: { [propName: string]: any }): ReactTestInstance, - - findAll( - predicate: (node: ReactTestInstance) => boolean, - options?: { deep: boolean } - ): ReactTestInstance[], - findAllByType( - type: React$ElementType, - options?: { deep: boolean } - ): ReactTestInstance[], - findAllByProps( - props: { [propName: string]: any }, - options?: { deep: boolean } - ): ReactTestInstance[] -}; - -type TestRendererOptions = { - createNodeMock(element: React$Element): any -}; - -declare module "react-test-renderer" { - declare export type ReactTestRenderer = { - toJSON(): null | ReactTestRendererJSON, - toTree(): null | ReactTestRendererTree, - unmount(nextElement?: React$Element): void, - update(nextElement: React$Element): void, - getInstance(): ?ReactComponentInstance, - root: ReactTestInstance - }; - - declare function create( - nextElement: React$Element, - options?: TestRendererOptions - ): ReactTestRenderer; -} - -declare module "react-test-renderer/shallow" { - declare export default class ShallowRenderer { - static createRenderer(): ShallowRenderer; - getMountedInstance(): ReactTestInstance; - getRenderOutput>(): E; - getRenderOutput(): React$Element; - render(element: React$Element, context?: any): void; - unmount(): void; - } -} diff --git a/flow-typed/npm/react-virtualized-auto-sizer_vx.x.x.js b/flow-typed/npm/react-virtualized-auto-sizer_vx.x.x.js deleted file mode 100644 index e86516e3c0..0000000000 --- a/flow-typed/npm/react-virtualized-auto-sizer_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 20bd12378cf0e549ccfa0c3bf9e0b832 -// flow-typed version: <>/react-virtualized-auto-sizer_v^1.0.2/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'react-virtualized-auto-sizer' - * - * 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 'react-virtualized-auto-sizer' { - declare module.exports: any; -} diff --git a/flow-typed/npm/react-window_vx.x.x.js b/flow-typed/npm/react-window_vx.x.x.js deleted file mode 100644 index d42a80fb00..0000000000 --- a/flow-typed/npm/react-window_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 74aa9038f677bc65d32fc6cb9fa045f3 -// flow-typed version: <>/react-window_v^1.1.2/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'react-window' - * - * 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 'react-window' { - declare module.exports: any; -} diff --git a/flow-typed/npm/redux-freeze_vx.x.x.js b/flow-typed/npm/redux-freeze_vx.x.x.js deleted file mode 100644 index 6ccad15d58..0000000000 --- a/flow-typed/npm/redux-freeze_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 7d0c9240f9e6d812a28a29706f40ef92 -// flow-typed version: <>/redux-freeze_v^0.1.5/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'redux-freeze' - * - * 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 'redux-freeze' { - declare module.exports: any; -} diff --git a/flow-typed/npm/redux-logger_vx.x.x.js b/flow-typed/npm/redux-logger_vx.x.x.js deleted file mode 100644 index 9047eaf3da..0000000000 --- a/flow-typed/npm/redux-logger_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 09a3294d4d8ef35cee7a03b327caf03d -// flow-typed version: <>/redux-logger_v^3.0.6/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'redux-logger' - * - * 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 'redux-logger' { - declare module.exports: any; -} diff --git a/flow-typed/npm/redux-promise_vx.x.x.js b/flow-typed/npm/redux-promise_vx.x.x.js deleted file mode 100644 index e0231339af..0000000000 --- a/flow-typed/npm/redux-promise_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 42b2735e387e99ff830dfcd2b0c3aa09 -// flow-typed version: <>/redux-promise_v^0.5.3/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'redux-promise' - * - * 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 'redux-promise' { - declare module.exports: any; -} diff --git a/flow-typed/npm/redux-thunk_vx.x.x.js b/flow-typed/npm/redux-thunk_vx.x.x.js deleted file mode 100644 index bbc9c7b601..0000000000 --- a/flow-typed/npm/redux-thunk_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 5bed5aafb6c51985e6fb71fbf7a7b46f -// flow-typed version: <>/redux-thunk_v^2.3.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'redux-thunk' - * - * 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 'redux-thunk' { - declare module.exports: any; -} diff --git a/flow-typed/npm/redux-undo_vx.x.x.js b/flow-typed/npm/redux-undo_vx.x.x.js deleted file mode 100644 index d56510a131..0000000000 --- a/flow-typed/npm/redux-undo_vx.x.x.js +++ /dev/null @@ -1,62 +0,0 @@ -// flow-typed signature: 04c7566abc4a08aa8d32e7ac6ebeeae2 -// flow-typed version: <>/redux-undo_v^0.6.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'redux-undo' - * - * 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 'redux-undo' { - declare module.exports: any; - /* - declare type UndoableState = { - present: T, - past: Array, - future: Array, - } - - declare type Action = { - type: string, - payload: T, - error?: boolean, - } - - declare type State = T - - declare type UndoableOptions = { - limit?: false | number, - filter?: (action: Action, currentState: State, previousState: State) => boolean, - undoType?: string, - redoType?: string, - jumpToPastType?: string, - jumpToFutureType?: string, - initialState?: ?T, - initTypes?: Array, - initialHistory?: UndoableState, - debug?: boolean, - } - - declare type Reducer = (state: State, action: Action) => State - - declare type UndoableReducer = Reducer, U> - - declare export default function undoable( - reducer: Reducer, - options?: UndoableOptions, - ): UndoableReducer; - - declare export var ActionTypes: { - UNDO: string, - REDO: string, - JUMP_TO_FUTURE: string, - JUMP_TO_PAST: string, - } - */ -} diff --git a/flow-typed/npm/redux_v4.x.x.js b/flow-typed/npm/redux_v4.x.x.js deleted file mode 100644 index d7a909d56a..0000000000 --- a/flow-typed/npm/redux_v4.x.x.js +++ /dev/null @@ -1,59 +0,0 @@ -// flow-typed signature: df80bdd535bfed9cf3223e077f3b4543 -// flow-typed version: c4c8963c9c/redux_v4.x.x/flow_>=v0.55.x - -declare module 'redux' { - - /* - - S = State - A = Action - D = Dispatch - - */ - - declare export type DispatchAPI = (action: A) => A; - declare export type Dispatch }> = DispatchAPI; - - declare export type MiddlewareAPI> = { - dispatch: D; - getState(): S; - }; - - declare export type Store> = { - // rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages) - dispatch: D; - getState(): S; - subscribe(listener: () => void): () => void; - replaceReducer(nextReducer: Reducer): void - }; - - declare export type Reducer = (state: S | void, action: A) => S; - - declare export type CombinedReducer = (state: $Shape & {} | void, action: A) => S; - - declare export type Middleware> = - (api: MiddlewareAPI) => - (next: D) => D; - - declare export type StoreCreator> = { - (reducer: Reducer, enhancer?: StoreEnhancer): Store; - (reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; - }; - - declare export type StoreEnhancer> = (next: StoreCreator) => StoreCreator; - - declare export function createStore(reducer: Reducer, enhancer?: StoreEnhancer): Store; - declare export function createStore(reducer: Reducer, preloadedState?: S, enhancer?: StoreEnhancer): Store; - - declare export function applyMiddleware(...middlewares: Array>): StoreEnhancer; - - declare export type ActionCreator = (...args: Array) => A; - declare export type ActionCreators = { [key: K]: ActionCreator }; - - declare export function bindActionCreators, D: DispatchAPI>(actionCreator: C, dispatch: D): C; - declare export function bindActionCreators, D: DispatchAPI>(actionCreators: C, dispatch: D): C; - - declare export function combineReducers(reducers: O): CombinedReducer<$ObjMap(r: Reducer) => S>, A>; - - declare export var compose: $Compose; -} diff --git a/flow-typed/npm/sass-loader_vx.x.x.js b/flow-typed/npm/sass-loader_vx.x.x.js deleted file mode 100644 index b08499a425..0000000000 --- a/flow-typed/npm/sass-loader_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: e0d476fe79e31367a2be0ea1618d7520 -// flow-typed version: <>/sass-loader_v^7.1.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'sass-loader' - * - * 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 'sass-loader' { - declare module.exports: any; -} diff --git a/flow-typed/npm/serialize-error_vx.x.x.js b/flow-typed/npm/serialize-error_vx.x.x.js deleted file mode 100644 index 9f8f3650ff..0000000000 --- a/flow-typed/npm/serialize-error_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 77a0770d432dbcb648846dd79aee5bb2 -// flow-typed version: <>/serialize-error_v^2.1.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'serialize-error' - * - * 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 'serialize-error' { - declare module.exports: any; -} diff --git a/flow-typed/npm/sparkly_vx.x.x.js b/flow-typed/npm/sparkly_vx.x.x.js deleted file mode 100644 index 43497ab624..0000000000 --- a/flow-typed/npm/sparkly_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 87f166d2e2ab511ca3d3e92f6661feae -// flow-typed version: <>/sparkly_v^4.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'sparkly' - * - * 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 'sparkly' { - declare module.exports: any; -} diff --git a/flow-typed/npm/stabilize_vx.x.x.js b/flow-typed/npm/stabilize_vx.x.x.js deleted file mode 100644 index c333131d76..0000000000 --- a/flow-typed/npm/stabilize_vx.x.x.js +++ /dev/null @@ -1,22 +0,0 @@ -// flow-typed signature: 88bb51b559055f8438f4cdc3ca4e6f27 -// flow-typed version: <>/stabilize_v1.0.0/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'stabilize' - * - * 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 'stabilize' { - declare export default function stringify( - value: any, - replacer?: (Array | (key: any, value: any) => any), - space?: string | number, - ): string; -} diff --git a/flow-typed/npm/sto-course-related-data_vx.x.x.js b/flow-typed/npm/sto-course-related-data_vx.x.x.js deleted file mode 100644 index e7e2e745bf..0000000000 --- a/flow-typed/npm/sto-course-related-data_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 6a00765c28651ee910bc1765b57c41d4 -// flow-typed version: <>/sto-course-related-data_v^4.0.2/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'sto-course-related-data' - * - * 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 'sto-course-related-data' { - declare module.exports: any; -} diff --git a/flow-typed/npm/style-loader_vx.x.x.js b/flow-typed/npm/style-loader_vx.x.x.js deleted file mode 100644 index 502a207bb9..0000000000 --- a/flow-typed/npm/style-loader_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 6fca13ed929873c281318e8bf8fcced7 -// flow-typed version: <>/style-loader_v^0.23.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'style-loader' - * - * 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 'style-loader' { - declare module.exports: any; -} diff --git a/flow-typed/npm/styled-components_v3.x.x.js b/flow-typed/npm/styled-components_v3.x.x.js deleted file mode 100644 index 70e9c09330..0000000000 --- a/flow-typed/npm/styled-components_v3.x.x.js +++ /dev/null @@ -1,291 +0,0 @@ -// flow-typed signature: f523b1ef4ab2de4542946d8ff8f9d2be -// flow-typed version: a92e9b07d7/styled-components_v3.x.x/flow_>=v0.75.x - -// @flow - -declare module 'styled-components' { - import type {Ref} from 'react' - - declare export type Interpolation = ((executionContext: C) => string) | string | number; - declare export type NameGenerator = (hash: number) => string; - - declare export type TaggedTemplateLiteral = {| (Array, Interpolation): R |}; - - // ---- FUNCTIONAL COMPONENT DEFINITIONS ---- - declare export type ReactComponentFunctional = - & { defaultProps: DefaultProps } - & ReactComponentFunctionalUndefinedDefaultProps - - declare export type ReactComponentFunctionalUndefinedDefaultProps = - React$StatelessFunctionalComponent - - // ---- CLASS COMPONENT DEFINITIONS ---- - declare class ReactComponent extends React$Component { - static defaultProps: DefaultProps - } - declare export type ReactComponentClass = Class> - declare export type ReactComponentClassUndefinedDefaultProps = Class> - - // ---- COMPONENT FUNCTIONS INPUT (UNION) & OUTPUT (INTERSECTION) ---- - declare export type ReactComponentUnion = - ReactComponentUnionWithDefaultProps - - declare type ReactComponentUnionWithDefaultProps = - | ReactComponentFunctional - | ReactComponentFunctionalUndefinedDefaultProps - | ReactComponentClass - | ReactComponentClassUndefinedDefaultProps - - declare export type ReactComponentIntersection = - & ReactComponentFunctional - & ReactComponentClass; - - // ---- WITHCOMPONENT ---- - declare type ReactComponentStyledWithComponent = < - Props, DefaultProps, - Input: - | ComponentList - | ReactComponentStyled - | ReactComponentUnionWithDefaultProps - >(Input) => ReactComponentStyled - - // ---- STATIC PROPERTIES ---- - declare export type ReactComponentStyledStaticProps = {| - attrs: (AdditionalProps) => ReactComponentStyledTaggedTemplateLiteral, - extend: ReactComponentStyledTaggedTemplateLiteral, - |} - - declare type ReactComponentStyledStaticPropsWithComponent = {| - ref: Ref<*> | (Ref<*> => any), - attrs: (AdditionalProps) => ReactComponentStyledTaggedTemplateLiteralWithComponent, - |} - - // ---- STYLED FUNCTION ---- - // Error: styled(CustomComponent).withComponent('a') - // Ok: styled('div').withComponent('a') - declare type Call = - & (ComponentListKeys => ReactComponentStyledTaggedTemplateLiteralWithComponent<{}, ComponentListKeys>) - & ((ReactComponentUnion) => ReactComponentStyledTaggedTemplateLiteral) - - // ---- STYLED COMPONENT ---- - declare type ReactComponentStyled = - & ReactComponentStyledStaticPropsWithComponent - & ReactComponentIntersection - - // ---- TAGGED TEMPLATE LITERAL ---- - declare type ReactComponentStyledTaggedTemplateLiteral = - & ReactComponentStyledStaticProps - & TaggedTemplateLiteral> - - declare export type ReactComponentStyledTaggedTemplateLiteralWithComponent = - & ReactComponentStyledStaticPropsWithComponent - & TaggedTemplateLiteral> - - // ---- WITHTHEME ---- - declare type WithThemeReactComponentClass = < - InputProps: { theme: Theme }, - InputDefaultProps: {}, - OutputProps: $Diff, - OutputDefaultProps: InputDefaultProps & { theme: Theme }, - >(ReactComponentClass) => ReactComponentClass - - declare type WithThemeReactComponentClassUndefinedDefaultProps = < - InputProps: { theme: Theme }, - OutputProps: $Diff, - >(ReactComponentClassUndefinedDefaultProps) => ReactComponentClass - - declare type WithThemeReactComponentFunctional = < - InputProps: { theme: Theme }, - InputDefaultProps: {}, - OutputProps: $Diff, - OutputDefaultProps: InputDefaultProps & { theme: Theme }, - >(ReactComponentFunctional) => ReactComponentFunctional - - declare type WithThemeReactComponentFunctionalUndefinedDefaultProps = < - InputProps: { theme: Theme }, - OutputProps: $Diff - >(ReactComponentFunctionalUndefinedDefaultProps) => ReactComponentFunctional - - declare type WithTheme = - & WithThemeReactComponentClass - & WithThemeReactComponentClassUndefinedDefaultProps - & WithThemeReactComponentFunctional - & WithThemeReactComponentFunctionalUndefinedDefaultProps - - // ---- MISC ---- - declare export type Theme = $ReadOnly<{[key: string]: mixed}>; - declare export type ThemeProviderProps = { - theme: Theme | ((outerTheme: Theme) => void) - }; - - declare class ThemeProvider extends React$Component {} - - declare class StyleSheetManager extends React$Component<{ sheet: mixed }> {} - - declare class ServerStyleSheet { - instance: StyleSheet; - collectStyles: (children: any) => React$Node; - getStyleTags: () => string; - getStyleElement: () => React$Node; - interleaveWithNodeStream: (readableStream: stream$Readable) => stream$Readable; - } - - declare export type ComponentListKeys = - $Subtype<$Keys> - - declare type StyledComponentsComponentListValue = - ReactComponentStyledTaggedTemplateLiteralWithComponent<{}, ComponentListKeys> - - // ---- COMPONENT LIST ---- - declare type StyledComponentsComponentList = {| - a: StyledComponentsComponentListValue, - abbr: StyledComponentsComponentListValue, - address: StyledComponentsComponentListValue, - area: StyledComponentsComponentListValue, - article: StyledComponentsComponentListValue, - aside: StyledComponentsComponentListValue, - audio: StyledComponentsComponentListValue, - b: StyledComponentsComponentListValue, - base: StyledComponentsComponentListValue, - bdi: StyledComponentsComponentListValue, - bdo: StyledComponentsComponentListValue, - big: StyledComponentsComponentListValue, - blockquote: StyledComponentsComponentListValue, - body: StyledComponentsComponentListValue, - br: StyledComponentsComponentListValue, - button: StyledComponentsComponentListValue, - canvas: StyledComponentsComponentListValue, - caption: StyledComponentsComponentListValue, - cite: StyledComponentsComponentListValue, - code: StyledComponentsComponentListValue, - col: StyledComponentsComponentListValue, - colgroup: StyledComponentsComponentListValue, - data: StyledComponentsComponentListValue, - datalist: StyledComponentsComponentListValue, - dd: StyledComponentsComponentListValue, - del: StyledComponentsComponentListValue, - details: StyledComponentsComponentListValue, - dfn: StyledComponentsComponentListValue, - dialog: StyledComponentsComponentListValue, - div: StyledComponentsComponentListValue, - dl: StyledComponentsComponentListValue, - dt: StyledComponentsComponentListValue, - em: StyledComponentsComponentListValue, - embed: StyledComponentsComponentListValue, - fieldset: StyledComponentsComponentListValue, - figcaption: StyledComponentsComponentListValue, - figure: StyledComponentsComponentListValue, - footer: StyledComponentsComponentListValue, - form: StyledComponentsComponentListValue, - h1: StyledComponentsComponentListValue, - h2: StyledComponentsComponentListValue, - h3: StyledComponentsComponentListValue, - h4: StyledComponentsComponentListValue, - h5: StyledComponentsComponentListValue, - h6: StyledComponentsComponentListValue, - head: StyledComponentsComponentListValue, - header: StyledComponentsComponentListValue, - hgroup: StyledComponentsComponentListValue, - hr: StyledComponentsComponentListValue, - html: StyledComponentsComponentListValue, - i: StyledComponentsComponentListValue, - iframe: StyledComponentsComponentListValue, - img: StyledComponentsComponentListValue, - input: StyledComponentsComponentListValue, - ins: StyledComponentsComponentListValue, - kbd: StyledComponentsComponentListValue, - keygen: StyledComponentsComponentListValue, - label: StyledComponentsComponentListValue, - legend: StyledComponentsComponentListValue, - li: StyledComponentsComponentListValue, - link: StyledComponentsComponentListValue, - main: StyledComponentsComponentListValue, - map: StyledComponentsComponentListValue, - mark: StyledComponentsComponentListValue, - menu: StyledComponentsComponentListValue, - menuitem: StyledComponentsComponentListValue, - meta: StyledComponentsComponentListValue, - meter: StyledComponentsComponentListValue, - nav: StyledComponentsComponentListValue, - noscript: StyledComponentsComponentListValue, - object: StyledComponentsComponentListValue, - ol: StyledComponentsComponentListValue, - optgroup: StyledComponentsComponentListValue, - option: StyledComponentsComponentListValue, - output: StyledComponentsComponentListValue, - p: StyledComponentsComponentListValue, - param: StyledComponentsComponentListValue, - picture: StyledComponentsComponentListValue, - pre: StyledComponentsComponentListValue, - progress: StyledComponentsComponentListValue, - q: StyledComponentsComponentListValue, - rp: StyledComponentsComponentListValue, - rt: StyledComponentsComponentListValue, - ruby: StyledComponentsComponentListValue, - s: StyledComponentsComponentListValue, - samp: StyledComponentsComponentListValue, - script: StyledComponentsComponentListValue, - section: StyledComponentsComponentListValue, - select: StyledComponentsComponentListValue, - small: StyledComponentsComponentListValue, - source: StyledComponentsComponentListValue, - span: StyledComponentsComponentListValue, - strong: StyledComponentsComponentListValue, - style: StyledComponentsComponentListValue, - sub: StyledComponentsComponentListValue, - summary: StyledComponentsComponentListValue, - sup: StyledComponentsComponentListValue, - table: StyledComponentsComponentListValue, - tbody: StyledComponentsComponentListValue, - td: StyledComponentsComponentListValue, - textarea: StyledComponentsComponentListValue, - tfoot: StyledComponentsComponentListValue, - th: StyledComponentsComponentListValue, - thead: StyledComponentsComponentListValue, - time: StyledComponentsComponentListValue, - title: StyledComponentsComponentListValue, - tr: StyledComponentsComponentListValue, - track: StyledComponentsComponentListValue, - u: StyledComponentsComponentListValue, - ul: StyledComponentsComponentListValue, - var: StyledComponentsComponentListValue, - video: StyledComponentsComponentListValue, - wbr: StyledComponentsComponentListValue, - - // SVG - circle: StyledComponentsComponentListValue, - clipPath: StyledComponentsComponentListValue, - defs: StyledComponentsComponentListValue, - ellipse: StyledComponentsComponentListValue, - g: StyledComponentsComponentListValue, - image: StyledComponentsComponentListValue, - line: StyledComponentsComponentListValue, - linearGradient: StyledComponentsComponentListValue, - mask: StyledComponentsComponentListValue, - path: StyledComponentsComponentListValue, - pattern: StyledComponentsComponentListValue, - polygon: StyledComponentsComponentListValue, - polyline: StyledComponentsComponentListValue, - radialGradient: StyledComponentsComponentListValue, - rect: StyledComponentsComponentListValue, - stop: StyledComponentsComponentListValue, - svg: StyledComponentsComponentListValue, - text: StyledComponentsComponentListValue, - tspan: StyledComponentsComponentListValue, - |} - - declare export var css: TaggedTemplateLiteral>; - declare export var createGlobalStyle: any; - declare export var keyframes: TaggedTemplateLiteral; - declare export var withTheme: WithTheme; - declare export var ServerStyleSheet: typeof ServerStyleSheet; - declare export var StyleSheetManager: typeof StyleSheetManager; - declare export var ThemeProvider: typeof ThemeProvider; - - declare export default { - css: TaggedTemplateLiteral>, - ...StyledComponentsComponentList, - } & { - [[call]]: Call - } -} diff --git a/flow-typed/npm/styled-components_vx.x.x.js b/flow-typed/npm/styled-components_vx.x.x.js deleted file mode 100644 index e841203c39..0000000000 --- a/flow-typed/npm/styled-components_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: d8b78195c5d8be700fa0155fbf301481 -// flow-typed version: <>/styled-components_v^4.0.0-beta.8/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'styled-components' - * - * 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 'styled-components' { - declare module.exports: any; -} diff --git a/flow-typed/npm/text-table_vx.x.x.js b/flow-typed/npm/text-table_vx.x.x.js deleted file mode 100644 index 9ed2249226..0000000000 --- a/flow-typed/npm/text-table_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 10439ff3762c06e09379be045ea8533d -// flow-typed version: <>/text-table_v^0.2.0/flow_v0.77.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'text-table' - * - * 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 'text-table' { - declare module.exports: any; -} diff --git a/flow-typed/npm/treo_vx.x.x.js b/flow-typed/npm/treo_vx.x.x.js deleted file mode 100644 index 606de86ad1..0000000000 --- a/flow-typed/npm/treo_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: f8d789eb47e639541102b14b734efbaf -// flow-typed version: <>/treo_v^0.6.0-rc2/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'treo' - * - * 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 'treo' { - declare module.exports: any; -} diff --git a/flow-typed/npm/typeface-fira-sans_vx.x.x.js b/flow-typed/npm/typeface-fira-sans_vx.x.x.js deleted file mode 100644 index 566c8c137e..0000000000 --- a/flow-typed/npm/typeface-fira-sans_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: d4084b0ceff17bceaf4a07f83c4e9437 -// flow-typed version: <>/typeface-fira-sans_v^0.0.54/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'typeface-fira-sans' - * - * 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 'typeface-fira-sans' { - declare module.exports: any; -} diff --git a/flow-typed/npm/uglifyjs-webpack-plugin_vx.x.x.js b/flow-typed/npm/uglifyjs-webpack-plugin_vx.x.x.js deleted file mode 100644 index 98c9ba8df8..0000000000 --- a/flow-typed/npm/uglifyjs-webpack-plugin_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 09c36098c163baf96165b80d35f80112 -// flow-typed version: <>/uglifyjs-webpack-plugin_v1.2.4/flow_v0.64.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'uglifyjs-webpack-plugin' - * - * 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 'uglifyjs-webpack-plugin' { - declare module.exports: any; -} diff --git a/flow-typed/npm/url-loader_vx.x.x.js b/flow-typed/npm/url-loader_vx.x.x.js deleted file mode 100644 index a89e120e4f..0000000000 --- a/flow-typed/npm/url-loader_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: d60fcd24b46e24501b0e5724ec5c385b -// flow-typed version: <>/url-loader_v^1.1.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'url-loader' - * - * 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 'url-loader' { - declare module.exports: any; -} diff --git a/flow-typed/npm/uuid_v3.x.x.js b/flow-typed/npm/uuid_v3.x.x.js deleted file mode 100644 index bf8d507b36..0000000000 --- a/flow-typed/npm/uuid_v3.x.x.js +++ /dev/null @@ -1,102 +0,0 @@ -// flow-typed signature: 3cf668e64747095cab0bb360cf2fb34f -// flow-typed version: d659bd0cb8/uuid_v3.x.x/flow_>=v0.32.x - -declare module "uuid" { - declare class uuid { - static ( - options?: {| - random?: number[], - rng?: () => number[] | Buffer - |}, - buffer?: number[] | Buffer, - offset?: number - ): string, - - static v1( - options?: {| - node?: number[], - clockseq?: number, - msecs?: number | Date, - nsecs?: number - |}, - buffer?: number[] | Buffer, - offset?: number - ): string, - - static v4( - options?: {| - random?: number[], - rng?: () => number[] | Buffer - |}, - buffer?: number[] | Buffer, - offset?: number - ): string - } - declare module.exports: Class; -} - -declare module "uuid/v1" { - declare class v1 { - static ( - options?: {| - node?: number[], - clockseq?: number, - msecs?: number | Date, - nsecs?: number - |}, - buffer?: number[] | Buffer, - offset?: number - ): string - } - - declare module.exports: Class; -} - -declare module "uuid/v3" { - declare class v3 { - static ( - name?: string | number[], - namespace?: string | number[], - buffer?: number[] | Buffer, - offset?: number - ): string, - - static name: string, - static DNS: string, - static URL: string - } - - declare module.exports: Class; -} - -declare module "uuid/v4" { - declare class v4 { - static ( - options?: {| - random?: number[], - rng?: () => number[] | Buffer - |}, - buffer?: number[] | Buffer, - offset?: number - ): string - } - - declare module.exports: Class; -} - -declare module "uuid/v5" { - declare class v5 { - static ( - name?: string | number[], - namespace?: string | number[], - buffer?: number[] | Buffer, - offset?: number - ): string, - - static name: string, - static DNS: string, - static URL: string - } - - declare module.exports: Class; -} diff --git a/flow-typed/npm/webpack-cli_vx.x.x.js b/flow-typed/npm/webpack-cli_vx.x.x.js deleted file mode 100644 index 90705142ee..0000000000 --- a/flow-typed/npm/webpack-cli_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 5eb55c02ff4e2ce1c6df1b4feb7e02bb -// flow-typed version: <>/webpack-cli_v^3.1.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'webpack-cli' - * - * 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 'webpack-cli' { - declare module.exports: any; -} diff --git a/flow-typed/npm/webpack-dev-server_vx.x.x.js b/flow-typed/npm/webpack-dev-server_vx.x.x.js deleted file mode 100644 index 55cec16037..0000000000 --- a/flow-typed/npm/webpack-dev-server_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 07b966d3a79caf3623573b24cd6f9348 -// flow-typed version: <>/webpack-dev-server_v^3.1.8/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'webpack-dev-server' - * - * 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 'webpack-dev-server' { - declare module.exports: any; -} diff --git a/flow-typed/npm/webpack-stylish_vx.x.x.js b/flow-typed/npm/webpack-stylish_vx.x.x.js deleted file mode 100644 index 59e275afb6..0000000000 --- a/flow-typed/npm/webpack-stylish_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: 991688d53feb1058c16c16b2bdede181 -// flow-typed version: <>/webpack-stylish_v^0.1.8/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'webpack-stylish' - * - * 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 'webpack-stylish' { - declare module.exports: any; -} diff --git a/flow-typed/npm/webpack_vx.x.x.js b/flow-typed/npm/webpack_vx.x.x.js deleted file mode 100644 index 2e71698fd1..0000000000 --- a/flow-typed/npm/webpack_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: ccb349d73e81241565fb99539ddf67cf -// flow-typed version: <>/webpack_v^4.19.1/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'webpack' - * - * 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 'webpack' { - declare module.exports: any; -} diff --git a/flow-typed/npm/whatwg-fetch_v2.x.x.js b/flow-typed/npm/whatwg-fetch_v2.x.x.js deleted file mode 100644 index e2e5d32a15..0000000000 --- a/flow-typed/npm/whatwg-fetch_v2.x.x.js +++ /dev/null @@ -1,6 +0,0 @@ -// flow-typed signature: 28ad27471ba2cb831af6a1f17b7f0cf0 -// flow-typed version: f3161dc07c/whatwg-fetch_v2.x.x/flow_>=v0.25.x - -declare module 'whatwg-fetch' { - declare module.exports: (input: string | Request, init?: RequestOptions) => Promise; -} diff --git a/flow-typed/npm/worker-loader_vx.x.x.js b/flow-typed/npm/worker-loader_vx.x.x.js deleted file mode 100644 index 8f29bc3766..0000000000 --- a/flow-typed/npm/worker-loader_vx.x.x.js +++ /dev/null @@ -1,18 +0,0 @@ -// flow-typed signature: ba2de14c6ba75abcae63730c411aeaac -// flow-typed version: <>/worker-loader_v^2.0.0/flow_v0.81.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'worker-loader' - * - * 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 'worker-loader' { - declare module.exports: any; -} diff --git a/mise.toml b/mise.toml index 8c89b920fb..de0b651d49 100644 --- a/mise.toml +++ b/mise.toml @@ -6,15 +6,15 @@ node = "24" "build-dev" = { dir = "{{ config_root }}/modules/gob-web", run = "node --run build-dev" } "build-peg" = { dir = "{{ config_root }}/modules/gob-hanson-format", run = "node --run build" } "bugsnag" = "curl -d 'apiKey=7e393deddaeb885f5b140b4320ecef6b' -d 'repository=https://github.com/hawkrives/gobbldygook' -d 'revision=$(git rev-parse --verify HEAD)' 'https://notify.bugsnag.com/deploy'" -"check" = { depends = ["lint", "flow", "test", "prettier-check"], description = "Run all code quality checks" } +"check" = { depends = ["lint", "typecheck", "test", "prettier-check"], description = "Run all code quality checks" } "count" = "echo $(fd -e scss | wc -l) files && echo $(fd -e scss | xargs wc -l | gsort | tail -n1) lines" "cover" = "./node_modules/.bin/jest --coverage && open coverage/index.html" -"flow" = "./node_modules/.bin/flow" "lint" = "./node_modules/.bin/eslint --cache --report-unused-disable-directives --max-warnings=0 modules/" "netlify" = "mise run build && mise run bugsnag" -"p" = "./node_modules/.bin/pretty-quick" -"prettier-check" = "./node_modules/.bin/prettier --check '{*,.*,{.circleci,modules,config,scripts}/**/*}.{js,json,scss,yml,yaml,md}'" -"pretty" = "./node_modules/.bin/prettier --write '{*,.*,{.circleci,modules,config,scripts}/**/*}.{js,json,scss,yml,yaml,md}'" +"prettier-check" = "./node_modules/.bin/prettier --check '{*,.*,{.circleci,modules,config,scripts}/**/*}.{js,ts,tsx,json,scss,yml,yaml,md}'" +"prettier" = "./node_modules/.bin/prettier --write '{*,.*,{.circleci,modules,config,scripts}/**/*}.{js,ts,tsx,json,scss,yml,yaml,md}'" "start" = { dir = "{{ config_root }}/modules/gob-web", run = "node --run start" } "test" = "./node_modules/.bin/jest" +"test:e2e" = "./node_modules/.bin/playwright test" "test-students" = "./modules/gob-cli/test-student test/example-students" +"typecheck" = "./node_modules/.bin/tsc --noEmit" diff --git a/modules/gob-cli/gob-benchmark/index.js b/modules/gob-cli/gob-benchmark/index.js deleted file mode 100644 index a05266f827..0000000000 --- a/modules/gob-cli/gob-benchmark/index.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable no-global-assign */ - -require = require("esm")(module /*, options*/) - -require("flow-remove-types/register")({ excludes: null }) - -require("./module.js").default() diff --git a/modules/gob-cli/gob-benchmark/module.js b/modules/gob-cli/gob-benchmark/index.ts similarity index 75% rename from modules/gob-cli/gob-benchmark/module.js rename to modules/gob-cli/gob-benchmark/index.ts index 2c0935d1ef..92bce6e175 100644 --- a/modules/gob-cli/gob-benchmark/module.js +++ b/modules/gob-cli/gob-benchmark/index.ts @@ -1,3 +1,5 @@ +#!/usr/bin/env node + import meow from "meow" import loadJsonFile from "load-json-file" import { evaluate } from "@gob/examine-student" @@ -22,27 +24,44 @@ async function load(filePath) { name, id, } = await loadJsonFile(filePath) - let areas = await Promise.all(studies.map(loadArea)) - let courses = await getAllCourses({ schedules, fabrications }) - - return { areas, courses, overrides, name, id } + let courses = await getAllCourses({ + schedules, + fabrications, + }) + return { + areas, + courses, + overrides, + name, + id, + } } function benchmarkArea({ area, courses, overrides, runs, graph }) { let { name, type, revision } = area console.log(`the '${name}' ${type} (${revision})`) - let times = range(runs).map(() => { const start = process.hrtime() - evaluate({ courses, overrides }, area) + evaluate( + { + courses, + overrides, + }, + area, + ) return now(start) }) - const avg = mean(times) + if (graph) { - console.log(` ${sparkly(times, { min: 0 })}`) + console.log( + ` ${sparkly(times, { + min: 0, + })}`, + ) } + console.log(` average time: ${ms(avg)} (over ${runs} runs)\n`) } @@ -51,13 +70,20 @@ async function benchmark({ runs, graph, files }) { for (const { areas, courses, overrides, name, id } of loadedFiles) { console.log(`## ${name} (${id}) ##`) + for (const area of areas) { - benchmarkArea({ area, courses, overrides, runs, graph }) + benchmarkArea({ + area, + courses, + overrides, + runs, + graph, + }) } } } -export default async function main() { +async function main() { const args = meow(` usage: gob-benchmark [student-file ...[student-file]] @@ -73,6 +99,11 @@ export default async function main() { let files = args.input let { runs = 50, graph = true } = args.flags - - await benchmark({ runs, graph, files }) + await benchmark({ + runs, + graph, + files, + }) } + +main() diff --git a/modules/gob-cli/gob-convert/index.js b/modules/gob-cli/gob-convert/index.js deleted file mode 100755 index a05266f827..0000000000 --- a/modules/gob-cli/gob-convert/index.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable no-global-assign */ - -require = require("esm")(module /*, options*/) - -require("flow-remove-types/register")({ excludes: null }) - -require("./module.js").default() diff --git a/modules/gob-cli/gob-convert/module.js b/modules/gob-cli/gob-convert/index.ts similarity index 89% rename from modules/gob-cli/gob-convert/module.js rename to modules/gob-cli/gob-convert/index.ts index 228be5d175..fe435a49df 100644 --- a/modules/gob-cli/gob-convert/module.js +++ b/modules/gob-cli/gob-convert/index.ts @@ -1,15 +1,15 @@ -// @flow +#!/usr/bin/env node const usage = ` usage: gob-convert < file outputs the converted file to stdout ` - import meow from "meow" import stdin from "get-stdin" import loadJsonFile from "load-json-file" import { getCourse } from "../lib/get-course" import { convertStudent } from "@gob/school-st-olaf-college-sis-import" + const { version } = require("../package.json") global.VERSION = version @@ -20,17 +20,17 @@ function args() { }) } -export default async function main() { +async function main() { let { input } = args() - let data = input.length ? await loadJsonFile(input[0]) : JSON.parse(await stdin()) - let hydrated = await convertStudent(data, getCourse) for (let schedule of Object.values(hydrated.schedules)) { - delete (schedule: any).courses + delete (schedule as any).courses } console.log(JSON.stringify(hydrated)) } + +main() diff --git a/modules/gob-cli/gob-examine/index.js b/modules/gob-cli/gob-examine/index.js deleted file mode 100755 index a05266f827..0000000000 --- a/modules/gob-cli/gob-examine/index.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable no-global-assign */ - -require = require("esm")(module /*, options*/) - -require("flow-remove-types/register")({ excludes: null }) - -require("./module.js").default() diff --git a/modules/gob-cli/gob-examine/module.js b/modules/gob-cli/gob-examine/index.ts similarity index 95% rename from modules/gob-cli/gob-examine/module.js rename to modules/gob-cli/gob-examine/index.ts index 6a98c6648a..018b7499eb 100644 --- a/modules/gob-cli/gob-examine/module.js +++ b/modules/gob-cli/gob-examine/index.ts @@ -1,3 +1,5 @@ +#!/usr/bin/env node + import meow from "meow" import stdin from "get-stdin" import loadJsonFile from "load-json-file" @@ -28,6 +30,7 @@ function condenseCourse(course) { function summarize(requirement, name, path, depth = 0) { let prose = "" const subReqs = filter(toPairs(requirement), ([k, _]) => isRequirementName(k)) + if (subReqs.length) { prose = "\n" + @@ -43,28 +46,36 @@ function summarize(requirement, name, path, depth = 0) { function stringifyChunk(expr) { let resultString = "" + switch (expr.$type) { case "boolean": resultString = stringifyBoolean(expr) break + case "course": resultString = stringifyCourse(expr) break + case "modifier": resultString = stringifyModifier(expr) break + case "occurrence": resultString = stringifyOccurrence(expr) break + case "of": resultString = stringifyOf(expr) break + case "reference": resultString = stringifyReference(expr) break + case "where": resultString = stringifyWhere(expr) break + default: throw new Error(`uh oh! unknown type "${expr.$type}"`) } @@ -98,12 +109,14 @@ function stringifyChildren(expr) { if (expr.$children === "$all") { return "all children" } + const str = map(expr.$children, stringifyReference).join(", ") return `(${str})` } function stringifyModifier(expr) { let modifier + if (expr.$from === "children") { modifier = `${stringifyChildren(expr)}` } else if (expr.$from === "filter") { @@ -155,6 +168,7 @@ function stringifyQualification({ $key, $operator, $value }) { } else if ($value.$type === "boolean") { let ds = [] let conjunction = "" + if ("$or" in $value) { ds = $value.$or conjunction = ` ${OR} ` @@ -166,8 +180,13 @@ function stringifyQualification({ $key, $operator, $value }) { const msg = `stringifyQualification(): neither $or nor $and could be found in ${val}` throw new TypeError(msg) } + return map(ds, (val) => - stringifyQualification({ $key, $operator, $value: val }), + stringifyQualification({ + $key, + $operator, + $value: val, + }), ).join(conjunction) } else { const msg = `stringifyQualification(): "${$value.$type}" is not a valid type for a qualification's value.` @@ -237,13 +256,12 @@ function indent(indentWith, string) { function proseify(requirement, name, path, depth = 0) { let prose = "" - const hasChildren = some(keys(requirement), isRequirementName) + if (hasChildren) { const subReqs = filter(toPairs(requirement), ([k, _]) => isRequirementName(k), ) - prose = map(subReqs, ([k, v]) => { return proseify(v, k, path.concat(k), depth + 1) }).join("\n") @@ -278,7 +296,13 @@ const checkAgainstArea = ({ courses, overrides }, args, areaData) => { overrides, }) } else { - result = evaluate({ courses, overrides }, areaData) + result = evaluate( + { + courses, + overrides, + }, + areaData, + ) path = [areaData.type, areaData.name] } @@ -296,6 +320,7 @@ const checkAgainstArea = ({ courses, overrides }, args, areaData) => { if (!args.status) { console.log(`[${areaData.type}] ${areaData.name}: failure`) } + process.exit(1) } else { if (!args.status) { @@ -306,14 +331,24 @@ const checkAgainstArea = ({ courses, overrides }, args, areaData) => { async function run({ overrides, studies, schedules, fabrications }, args) { let areaData = await Promise.all(studies.map(loadArea)) - let courses = await getAllCourses({ schedules, fabrications }) + let courses = await getAllCourses({ + schedules, + fabrications, + }) for (const area of areaData) { - checkAgainstArea({ courses, overrides }, args, area) + checkAgainstArea( + { + courses, + overrides, + }, + args, + area, + ) } } -export default async function main() { +async function main() { const args = meow(` usage: gob-examine @@ -326,11 +361,10 @@ export default async function main() { --status: no output; only use exit code --path: change the root of the evaluation `) - let { input, flags } = args - let data = input.length ? await loadJsonFile(input[0]) : JSON.parse(await stdin()) - run(data, flags) } + +main() diff --git a/modules/gob-cli/gob-lint-area/index.js b/modules/gob-cli/gob-lint-area/index.js deleted file mode 100755 index a05266f827..0000000000 --- a/modules/gob-cli/gob-lint-area/index.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable no-global-assign */ - -require = require("esm")(module /*, options*/) - -require("flow-remove-types/register")({ excludes: null }) - -require("./module.js").default() diff --git a/modules/gob-cli/gob-lint-area/index.ts b/modules/gob-cli/gob-lint-area/index.ts new file mode 100644 index 0000000000..300673e747 --- /dev/null +++ b/modules/gob-cli/gob-lint-area/index.ts @@ -0,0 +1,4 @@ +#!/usr/bin/env node + +// This module is not yet implemented +console.log("gob-lint-area is not yet implemented") diff --git a/modules/gob-cli/gob-lint-area/module.js b/modules/gob-cli/gob-lint-area/module.js deleted file mode 100644 index 46e7f7c045..0000000000 --- a/modules/gob-cli/gob-lint-area/module.js +++ /dev/null @@ -1 +0,0 @@ -// @flow diff --git a/modules/gob-cli/gob-validate/index.js b/modules/gob-cli/gob-validate/index.js deleted file mode 100755 index a05266f827..0000000000 --- a/modules/gob-cli/gob-validate/index.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable no-global-assign */ - -require = require("esm")(module /*, options*/) - -require("flow-remove-types/register")({ excludes: null }) - -require("./module.js").default() diff --git a/modules/gob-cli/gob-validate/module.js b/modules/gob-cli/gob-validate/index.ts similarity index 94% rename from modules/gob-cli/gob-validate/module.js rename to modules/gob-cli/gob-validate/index.ts index 58f5c5562c..a5762ecea0 100644 --- a/modules/gob-cli/gob-validate/module.js +++ b/modules/gob-cli/gob-validate/index.ts @@ -1,44 +1,41 @@ -// @flow +#!/usr/bin/env node const usage = ` usage: gob-validate < file validates the schedules of the given student ` - import meow from "meow" import stdin from "get-stdin" import loadJsonFile from "load-json-file" import { getCourse } from "../lib/get-course" import { Student } from "@gob/object-student" import { toPrettyTerm, buildDeptNum } from "@gob/school-st-olaf-college" + const { version } = require("../package.json") global.VERSION = version function args() { - return meow(usage, { booleanDefault: false }) + return meow(usage, { + booleanDefault: false, + }) } const print = (indent, message) => { console.log("".padStart(indent * 2, " ") + message) } -export default async function main() { +async function main() { let { input } = args() - let data = input.length ? await loadJsonFile(input[0]) : JSON.parse(await stdin()) - let student = new Student(data) - let promises = student.schedules.map(async (schedule) => { let [courses, conflictInfo] = await Promise.all([ schedule.getCourses(getCourse), schedule.validate(getCourse), ]) - let { hasConflict, warnings } = conflictInfo - return { ...schedule.toJSON(), courses, @@ -47,9 +44,7 @@ export default async function main() { warnings, } }) - let schedules = await Promise.all(promises.values()) - let anyConflicts = schedules.some((s) => s.hasConflict) for (let schedule of schedules) { @@ -63,7 +58,6 @@ export default async function main() { for (let course of courses) { print(1, buildDeptNum(course)) - let courseConflicts = warnings.get(course.clbid) if (!courseConflicts) { @@ -91,3 +85,5 @@ export default async function main() { console.log("No warnings") } } + +main() diff --git a/modules/gob-cli/lib/get-all-courses.js b/modules/gob-cli/lib/get-all-courses.ts similarity index 100% rename from modules/gob-cli/lib/get-all-courses.js rename to modules/gob-cli/lib/get-all-courses.ts diff --git a/modules/gob-cli/lib/get-course.js b/modules/gob-cli/lib/get-course.ts similarity index 90% rename from modules/gob-cli/lib/get-course.js rename to modules/gob-cli/lib/get-course.ts index fa484b156e..70bb3f9597 100644 --- a/modules/gob-cli/lib/get-course.js +++ b/modules/gob-cli/lib/get-course.ts @@ -1,5 +1,3 @@ -// @flow - import got from "got" import type { Course as CourseType, Result } from "@gob/types" import { List } from "immutable" @@ -24,8 +22,8 @@ export async function getCourseFromNetwork(clbid: string) { export async function getCourse( clbid: string, - term?: ?number, - fabrications?: ?(Array | List) = [], + term?: number | null | undefined, + fabrications: (Array | List) | null | undefined = [], ): Promise> { if (fabrications) { let fab = fabrications.find((c) => c.clbid === clbid) diff --git a/modules/gob-cli/lib/index.js b/modules/gob-cli/lib/index.ts similarity index 80% rename from modules/gob-cli/lib/index.js rename to modules/gob-cli/lib/index.ts index db5873577d..ecceb1c8ef 100644 --- a/modules/gob-cli/lib/index.js +++ b/modules/gob-cli/lib/index.ts @@ -1,3 +1 @@ -// @flow - export { getCourse } from "./get-course" diff --git a/modules/gob-cli/lib/load-area.js b/modules/gob-cli/lib/load-area.ts similarity index 95% rename from modules/gob-cli/lib/load-area.js rename to modules/gob-cli/lib/load-area.ts index 5fdcb002f1..44c06abcec 100644 --- a/modules/gob-cli/lib/load-area.js +++ b/modules/gob-cli/lib/load-area.ts @@ -1,8 +1,6 @@ -// @flow - import yaml from "js-yaml" import { enhanceHanson as enhance } from "@gob/hanson-format" -import { type AreaQuery } from "@gob/object-student" +import type { AreaQuery } from "@gob/object-student" import maxBy from "lodash/maxBy" import got from "got" diff --git a/modules/gob-colors/index.js b/modules/gob-colors/index.ts similarity index 99% rename from modules/gob-colors/index.js rename to modules/gob-colors/index.ts index 43cc52bad4..8baf2da51b 100644 --- a/modules/gob-colors/index.js +++ b/modules/gob-colors/index.ts @@ -1,4 +1,3 @@ -// @flow import { rgba } from "polished" export const red50 = "#ffebee" diff --git a/modules/gob-courses/alter-for-evaluation.js b/modules/gob-courses/alter-for-evaluation.ts similarity index 93% rename from modules/gob-courses/alter-for-evaluation.js rename to modules/gob-courses/alter-for-evaluation.ts index 822d27af26..6c661c9e17 100644 --- a/modules/gob-courses/alter-for-evaluation.js +++ b/modules/gob-courses/alter-for-evaluation.ts @@ -1,5 +1,3 @@ -// @flow - import toPairs from "lodash/toPairs" import fromPairs from "lodash/fromPairs" @@ -34,5 +32,5 @@ export function alterForEvaluation(course: Course): TrimmedCourse { } let pairs = toPairs(course).filter(([key]) => whitelist.has(key)) - return (fromPairs(pairs): any) + return fromPairs(pairs) as unknown as TrimmedCourse } diff --git a/modules/gob-courses/index.js b/modules/gob-courses/index.ts similarity index 85% rename from modules/gob-courses/index.js rename to modules/gob-courses/index.ts index b8b0ce6e1b..86e976df3b 100644 --- a/modules/gob-courses/index.js +++ b/modules/gob-courses/index.ts @@ -1,3 +1 @@ -// @flow - export { alterForEvaluation } from "./alter-for-evaluation" diff --git a/modules/gob-examine-student/index.js b/modules/gob-examine-student/index.ts similarity index 97% rename from modules/gob-examine-student/index.js rename to modules/gob-examine-student/index.ts index 907abd59df..980bb9df30 100644 --- a/modules/gob-examine-student/index.js +++ b/modules/gob-examine-student/index.ts @@ -1,5 +1,3 @@ -// @flow - export { evaluate } from "./source/evaluate" export { countCredits } from "./source/count-credits" export { default as pathToOverride } from "./source/path-to-override" diff --git a/modules/gob-examine-student/source/__tests__/__snapshots__/apply-filter.test.js.snap b/modules/gob-examine-student/source/__tests__/__snapshots__/apply-filter.test.ts.snap similarity index 100% rename from modules/gob-examine-student/source/__tests__/__snapshots__/apply-filter.test.js.snap rename to modules/gob-examine-student/source/__tests__/__snapshots__/apply-filter.test.ts.snap diff --git a/modules/gob-examine-student/source/__tests__/__snapshots__/collect-matches.test.js.snap b/modules/gob-examine-student/source/__tests__/__snapshots__/collect-matches.test.ts.snap similarity index 100% rename from modules/gob-examine-student/source/__tests__/__snapshots__/collect-matches.test.js.snap rename to modules/gob-examine-student/source/__tests__/__snapshots__/collect-matches.test.ts.snap diff --git a/modules/gob-examine-student/source/__tests__/__snapshots__/collect-taken-courses.test.js.snap b/modules/gob-examine-student/source/__tests__/__snapshots__/collect-taken-courses.test.ts.snap similarity index 100% rename from modules/gob-examine-student/source/__tests__/__snapshots__/collect-taken-courses.test.js.snap rename to modules/gob-examine-student/source/__tests__/__snapshots__/collect-taken-courses.test.ts.snap diff --git a/modules/gob-examine-student/source/__tests__/__snapshots__/compute-boolean.test.js.snap b/modules/gob-examine-student/source/__tests__/__snapshots__/compute-boolean.test.ts.snap similarity index 100% rename from modules/gob-examine-student/source/__tests__/__snapshots__/compute-boolean.test.js.snap rename to modules/gob-examine-student/source/__tests__/__snapshots__/compute-boolean.test.ts.snap diff --git a/modules/gob-examine-student/source/__tests__/__snapshots__/compute-course.test.js.snap b/modules/gob-examine-student/source/__tests__/__snapshots__/compute-course.test.ts.snap similarity index 100% rename from modules/gob-examine-student/source/__tests__/__snapshots__/compute-course.test.js.snap rename to modules/gob-examine-student/source/__tests__/__snapshots__/compute-course.test.ts.snap diff --git a/modules/gob-examine-student/source/__tests__/__snapshots__/compute-modifier.test.js.snap b/modules/gob-examine-student/source/__tests__/__snapshots__/compute-modifier.test.ts.snap similarity index 100% rename from modules/gob-examine-student/source/__tests__/__snapshots__/compute-modifier.test.js.snap rename to modules/gob-examine-student/source/__tests__/__snapshots__/compute-modifier.test.ts.snap diff --git a/modules/gob-examine-student/source/__tests__/apply-filter.test.js b/modules/gob-examine-student/source/__tests__/apply-filter.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/apply-filter.test.js rename to modules/gob-examine-student/source/__tests__/apply-filter.test.ts diff --git a/modules/gob-examine-student/source/__tests__/assert-keys.test.js b/modules/gob-examine-student/source/__tests__/assert-keys.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/assert-keys.test.js rename to modules/gob-examine-student/source/__tests__/assert-keys.test.ts diff --git a/modules/gob-examine-student/source/__tests__/check-for-course.test.js b/modules/gob-examine-student/source/__tests__/check-for-course.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/check-for-course.test.js rename to modules/gob-examine-student/source/__tests__/check-for-course.test.ts diff --git a/modules/gob-examine-student/source/__tests__/collect-matches.test.js b/modules/gob-examine-student/source/__tests__/collect-matches.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/collect-matches.test.js rename to modules/gob-examine-student/source/__tests__/collect-matches.test.ts diff --git a/modules/gob-examine-student/source/__tests__/collect-taken-courses.test.js b/modules/gob-examine-student/source/__tests__/collect-taken-courses.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/collect-taken-courses.test.js rename to modules/gob-examine-student/source/__tests__/collect-taken-courses.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compare-course-to-course.test.js b/modules/gob-examine-student/source/__tests__/compare-course-to-course.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compare-course-to-course.test.js rename to modules/gob-examine-student/source/__tests__/compare-course-to-course.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compare-course-to-qualification.test.js b/modules/gob-examine-student/source/__tests__/compare-course-to-qualification.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compare-course-to-qualification.test.js rename to modules/gob-examine-student/source/__tests__/compare-course-to-qualification.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compute-boolean.test.js b/modules/gob-examine-student/source/__tests__/compute-boolean.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compute-boolean.test.js rename to modules/gob-examine-student/source/__tests__/compute-boolean.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compute-chunk.test.js b/modules/gob-examine-student/source/__tests__/compute-chunk.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compute-chunk.test.js rename to modules/gob-examine-student/source/__tests__/compute-chunk.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compute-count-with-operator.test.js b/modules/gob-examine-student/source/__tests__/compute-count-with-operator.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compute-count-with-operator.test.js rename to modules/gob-examine-student/source/__tests__/compute-count-with-operator.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compute-course.test.js b/modules/gob-examine-student/source/__tests__/compute-course.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compute-course.test.js rename to modules/gob-examine-student/source/__tests__/compute-course.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compute-modifier.test.js b/modules/gob-examine-student/source/__tests__/compute-modifier.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compute-modifier.test.js rename to modules/gob-examine-student/source/__tests__/compute-modifier.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compute-occurrence.test.js b/modules/gob-examine-student/source/__tests__/compute-occurrence.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compute-occurrence.test.js rename to modules/gob-examine-student/source/__tests__/compute-occurrence.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compute-of.test.js b/modules/gob-examine-student/source/__tests__/compute-of.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compute-of.test.js rename to modules/gob-examine-student/source/__tests__/compute-of.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compute-reference.test.js b/modules/gob-examine-student/source/__tests__/compute-reference.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compute-reference.test.js rename to modules/gob-examine-student/source/__tests__/compute-reference.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compute-where.test.js b/modules/gob-examine-student/source/__tests__/compute-where.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compute-where.test.js rename to modules/gob-examine-student/source/__tests__/compute-where.test.ts diff --git a/modules/gob-examine-student/source/__tests__/compute.test.js b/modules/gob-examine-student/source/__tests__/compute.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/compute.test.js rename to modules/gob-examine-student/source/__tests__/compute.test.ts diff --git a/modules/gob-examine-student/source/__tests__/count-courses.test.js b/modules/gob-examine-student/source/__tests__/count-courses.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/count-courses.test.js rename to modules/gob-examine-student/source/__tests__/count-courses.test.ts diff --git a/modules/gob-examine-student/source/__tests__/count-credits.test.js b/modules/gob-examine-student/source/__tests__/count-credits.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/count-credits.test.js rename to modules/gob-examine-student/source/__tests__/count-credits.test.ts diff --git a/modules/gob-examine-student/source/__tests__/count-departments.test.js b/modules/gob-examine-student/source/__tests__/count-departments.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/count-departments.test.js rename to modules/gob-examine-student/source/__tests__/count-departments.test.ts diff --git a/modules/gob-examine-student/source/__tests__/count-terms.test.js b/modules/gob-examine-student/source/__tests__/count-terms.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/count-terms.test.js rename to modules/gob-examine-student/source/__tests__/count-terms.test.ts diff --git a/modules/gob-examine-student/source/__tests__/evaluate.test.js b/modules/gob-examine-student/source/__tests__/evaluate.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/evaluate.test.js rename to modules/gob-examine-student/source/__tests__/evaluate.test.ts diff --git a/modules/gob-examine-student/source/__tests__/filter-by-qualification.test.js b/modules/gob-examine-student/source/__tests__/filter-by-qualification.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/filter-by-qualification.test.js rename to modules/gob-examine-student/source/__tests__/filter-by-qualification.test.ts diff --git a/modules/gob-examine-student/source/__tests__/filter-by-where-clause.test.js b/modules/gob-examine-student/source/__tests__/filter-by-where-clause.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/filter-by-where-clause.test.js rename to modules/gob-examine-student/source/__tests__/filter-by-where-clause.test.ts diff --git a/modules/gob-examine-student/source/__tests__/find-course.test.js b/modules/gob-examine-student/source/__tests__/find-course.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/find-course.test.js rename to modules/gob-examine-student/source/__tests__/find-course.test.ts diff --git a/modules/gob-examine-student/source/__tests__/find-leaf-requirements.test.js b/modules/gob-examine-student/source/__tests__/find-leaf-requirements.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/find-leaf-requirements.test.js rename to modules/gob-examine-student/source/__tests__/find-leaf-requirements.test.ts diff --git a/modules/gob-examine-student/source/__tests__/get-departments.test.js b/modules/gob-examine-student/source/__tests__/get-departments.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/get-departments.test.js rename to modules/gob-examine-student/source/__tests__/get-departments.test.ts diff --git a/modules/gob-examine-student/source/__tests__/get-matches-from-children.test.js b/modules/gob-examine-student/source/__tests__/get-matches-from-children.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/get-matches-from-children.test.js rename to modules/gob-examine-student/source/__tests__/get-matches-from-children.test.ts diff --git a/modules/gob-examine-student/source/__tests__/get-matches-from-filter.test.js b/modules/gob-examine-student/source/__tests__/get-matches-from-filter.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/get-matches-from-filter.test.js rename to modules/gob-examine-student/source/__tests__/get-matches-from-filter.test.ts diff --git a/modules/gob-examine-student/source/__tests__/get-occurrences.test.js b/modules/gob-examine-student/source/__tests__/get-occurrences.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/get-occurrences.test.js rename to modules/gob-examine-student/source/__tests__/get-occurrences.test.ts diff --git a/modules/gob-examine-student/source/__tests__/get-override.test.js b/modules/gob-examine-student/source/__tests__/get-override.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/get-override.test.js rename to modules/gob-examine-student/source/__tests__/get-override.test.ts diff --git a/modules/gob-examine-student/source/__tests__/has-override.test.js b/modules/gob-examine-student/source/__tests__/has-override.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/has-override.test.js rename to modules/gob-examine-student/source/__tests__/has-override.test.ts diff --git a/modules/gob-examine-student/source/__tests__/humanize-operator.test.js b/modules/gob-examine-student/source/__tests__/humanize-operator.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/humanize-operator.test.js rename to modules/gob-examine-student/source/__tests__/humanize-operator.test.ts diff --git a/modules/gob-examine-student/source/__tests__/is-requirement-name.test.js b/modules/gob-examine-student/source/__tests__/is-requirement-name.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/is-requirement-name.test.js rename to modules/gob-examine-student/source/__tests__/is-requirement-name.test.ts diff --git a/modules/gob-examine-student/source/__tests__/path-to-override.test.js b/modules/gob-examine-student/source/__tests__/path-to-override.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/path-to-override.test.js rename to modules/gob-examine-student/source/__tests__/path-to-override.test.ts diff --git a/modules/gob-examine-student/source/__tests__/pluralize-area.test.js b/modules/gob-examine-student/source/__tests__/pluralize-area.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/pluralize-area.test.js rename to modules/gob-examine-student/source/__tests__/pluralize-area.test.ts diff --git a/modules/gob-examine-student/source/__tests__/simplify-course.test.js b/modules/gob-examine-student/source/__tests__/simplify-course.test.ts similarity index 100% rename from modules/gob-examine-student/source/__tests__/simplify-course.test.js rename to modules/gob-examine-student/source/__tests__/simplify-course.test.ts diff --git a/modules/gob-examine-student/source/apply-filter.js b/modules/gob-examine-student/source/apply-filter.ts similarity index 99% rename from modules/gob-examine-student/source/apply-filter.js rename to modules/gob-examine-student/source/apply-filter.ts index eb6b6359f3..2a7b755c27 100644 --- a/modules/gob-examine-student/source/apply-filter.js +++ b/modules/gob-examine-student/source/apply-filter.ts @@ -1,4 +1,3 @@ -// @flow import checkForCourse from "./check-for-course" import filterByWhereClause from "./filter-by-where-clause" import type { FilterExpression, Course } from "./types" diff --git a/modules/gob-examine-student/source/apply-fulfillment-to-expression.js b/modules/gob-examine-student/source/apply-fulfillment-to-expression.ts similarity index 98% rename from modules/gob-examine-student/source/apply-fulfillment-to-expression.js rename to modules/gob-examine-student/source/apply-fulfillment-to-expression.ts index 665f6fefe9..80ca17ce3a 100644 --- a/modules/gob-examine-student/source/apply-fulfillment-to-expression.js +++ b/modules/gob-examine-student/source/apply-fulfillment-to-expression.ts @@ -1,4 +1,3 @@ -// @flow import type { OrExpression, Expression, Fulfillment } from "./types" export default function applyFulfillmentToExpression( diff --git a/modules/gob-examine-student/source/apply-fulfillment-to-result.js b/modules/gob-examine-student/source/apply-fulfillment-to-result.ts similarity index 85% rename from modules/gob-examine-student/source/apply-fulfillment-to-result.js rename to modules/gob-examine-student/source/apply-fulfillment-to-result.ts index fdd62b0205..246303b911 100644 --- a/modules/gob-examine-student/source/apply-fulfillment-to-result.js +++ b/modules/gob-examine-student/source/apply-fulfillment-to-result.ts @@ -1,19 +1,18 @@ -// @flow import computeCountWithOperator from "./compute-count-with-operator" import type { Fulfillment, Expression, Course } from "./types" type ReturnType = { - computedResult: boolean, - matches: Course[], - counted: number, + computedResult: boolean + matches: Course[] + counted: number } type Args = { - fulfillment: Fulfillment, - expr: Expression, - computedResult: boolean, - matches: ?(Course[]), - counted: ?number, + fulfillment: Fulfillment + expr: Expression + computedResult: boolean + matches: Course[] | null | undefined + counted: number | null | undefined } export default function applyFulfillmentToResult({ @@ -32,7 +31,7 @@ export default function applyFulfillmentToResult({ return { computedResult, matches, counted } } - const counter = "$count" in expr ? (expr: any).$count : null + const counter = "$count" in expr ? (expr as any).$count : null if ( counter && (counter.$operator === "$lte" || counter.$operator === "$eq") diff --git a/modules/gob-examine-student/source/assert-keys.js b/modules/gob-examine-student/source/assert-keys.ts similarity index 98% rename from modules/gob-examine-student/source/assert-keys.js rename to modules/gob-examine-student/source/assert-keys.ts index 543fc7bfe8..2084666bf9 100644 --- a/modules/gob-examine-student/source/assert-keys.js +++ b/modules/gob-examine-student/source/assert-keys.ts @@ -1,4 +1,3 @@ -// @flow import reject from "lodash/reject" /** diff --git a/modules/gob-examine-student/source/check-for-course.js b/modules/gob-examine-student/source/check-for-course.ts similarity index 97% rename from modules/gob-examine-student/source/check-for-course.js rename to modules/gob-examine-student/source/check-for-course.ts index 964c4d9fc5..c53ea74cf3 100644 --- a/modules/gob-examine-student/source/check-for-course.js +++ b/modules/gob-examine-student/source/check-for-course.ts @@ -1,5 +1,3 @@ -// @flow - import compareCourseToCourse from "./compare-course-to-course" import type { Course } from "./types" diff --git a/modules/gob-examine-student/source/collect-matches.js b/modules/gob-examine-student/source/collect-matches.ts similarity index 99% rename from modules/gob-examine-student/source/collect-matches.js rename to modules/gob-examine-student/source/collect-matches.ts index 859161c465..a1bec31be7 100644 --- a/modules/gob-examine-student/source/collect-matches.js +++ b/modules/gob-examine-student/source/collect-matches.ts @@ -1,4 +1,3 @@ -// @flow import assertKeys from "./assert-keys" import flatMap from "lodash/flatMap" import uniqBy from "lodash/uniqBy" diff --git a/modules/gob-examine-student/source/collect-taken-courses.js b/modules/gob-examine-student/source/collect-taken-courses.ts similarity index 98% rename from modules/gob-examine-student/source/collect-taken-courses.js rename to modules/gob-examine-student/source/collect-taken-courses.ts index 45c6d5401b..b2ec9789f3 100644 --- a/modules/gob-examine-student/source/collect-taken-courses.js +++ b/modules/gob-examine-student/source/collect-taken-courses.ts @@ -1,4 +1,3 @@ -// @flow import isPlainObject from "lodash/isPlainObject" import flattenDeep from "lodash/flattenDeep" import uniq from "lodash/uniq" diff --git a/modules/gob-examine-student/source/compare-course-to-course.js b/modules/gob-examine-student/source/compare-course-to-course.ts similarity index 99% rename from modules/gob-examine-student/source/compare-course-to-course.js rename to modules/gob-examine-student/source/compare-course-to-course.ts index 790935b3d2..dea95ee926 100644 --- a/modules/gob-examine-student/source/compare-course-to-course.js +++ b/modules/gob-examine-student/source/compare-course-to-course.ts @@ -1,4 +1,3 @@ -// @flow import isEqualWith from "lodash/isEqualWith" import type { Course } from "./types" diff --git a/modules/gob-examine-student/source/compare-course-to-qualification.js b/modules/gob-examine-student/source/compare-course-to-qualification.ts similarity index 98% rename from modules/gob-examine-student/source/compare-course-to-qualification.js rename to modules/gob-examine-student/source/compare-course-to-qualification.ts index 2a359f6503..cdef1315ca 100644 --- a/modules/gob-examine-student/source/compare-course-to-qualification.js +++ b/modules/gob-examine-student/source/compare-course-to-qualification.ts @@ -1,4 +1,3 @@ -// @flow import isPlainObject from "lodash/isPlainObject" import includes from "lodash/includes" import every from "lodash/every" @@ -99,7 +98,7 @@ function compareCourseToQualificationViaOperator( { $key, $operator, $value }: Qualification, ) { // get the actual course out of the object - course = (course: any).$course || course + course = (course as any).$course || course // it's a static value; a number or string if ($operator === "$eq") { diff --git a/modules/gob-examine-student/source/compute-chunk.js b/modules/gob-examine-student/source/compute-chunk.ts similarity index 93% rename from modules/gob-examine-student/source/compute-chunk.js rename to modules/gob-examine-student/source/compute-chunk.ts index 48235c46d9..f51ed9487f 100644 --- a/modules/gob-examine-student/source/compute-chunk.js +++ b/modules/gob-examine-student/source/compute-chunk.ts @@ -1,4 +1,3 @@ -// @flow import keys from "lodash/keys" import take from "lodash/take" import xor from "lodash/xor" @@ -52,12 +51,12 @@ type StringifiedCourse = string * @returns {boolean} - the result of the expression */ type Args = { - expr: Expression, - ctx: Requirement, - courses: Course[], - dirty: Set, - fulfillment?: Fulfillment, - isNeeded?: boolean, + expr: Expression + ctx: Requirement + courses: Course[] + dirty: Set + fulfillment?: Fulfillment + isNeeded?: boolean } export default function computeChunk({ expr, @@ -77,8 +76,8 @@ export default function computeChunk({ assertKeys(expr, "$type") let computedResult = false - let matches: ?(Course[]) = undefined - let counted: ?number = undefined + let matches: Course[] | null | undefined = undefined + let counted: number | null | undefined = undefined // Modifiers, occurrences, references, and wheres don't need isNeeded, // because they don't result in recursive calls to computeChunk. @@ -131,7 +130,7 @@ export default function computeChunk({ } else if (!expr.$type) { throw new TypeError("computeChunk(): expr.$type is undefined!") } else { - ;(expr.$type: empty) + expr.$type as never throw new TypeError( `computeChunk(): the type "${expr.$type}" is not a valid expression type.`, ) @@ -193,11 +192,11 @@ export default function computeChunk({ * @returns {boolean} - the result of the modifier */ type BooleanChunkArgs = { - expr: BooleanExpression, - ctx: Requirement, - courses: Course[], - dirty: Set, - isNeeded: boolean, + expr: BooleanExpression + ctx: Requirement + courses: Course[] + dirty: Set + isNeeded: boolean } export function computeBoolean({ expr, @@ -221,7 +220,7 @@ export function computeBoolean({ // isNeeded is set to the negated `haveAnyBeenTrue`, because // that's how we check if we need to flag any further courses. let thisResult = computeChunk({ - expr: (req: any), + expr: req as any, ctx, courses, dirty, @@ -240,7 +239,7 @@ export function computeBoolean({ } else if (expr.$booleanType === "and") { const results = expr.$and.map((req) => computeChunk({ - expr: (req: any), + expr: req as any, ctx, courses, dirty, @@ -270,10 +269,10 @@ export function computeBoolean({ * @returns {boolean} - if the course was found or not */ type CourseChunkArgs = { - expr: CourseExpression, - courses: Course[], - dirty: Set, - isNeeded: boolean, + expr: CourseExpression + courses: Course[] + dirty: Set + isNeeded: boolean } export function computeCourse({ expr, @@ -290,7 +289,7 @@ export function computeCourse({ const keysNotFromQuery = xor(keys(expr.$course), keys(foundCourse)) if (keysNotFromQuery.length) { - ;(expr.$course: any)._extraKeys = keysNotFromQuery + ;(expr.$course as any)._extraKeys = keysNotFromQuery } expr._request = expr.$course @@ -319,9 +318,9 @@ export function computeCourse({ * @returns {boolean} - the result of the modifier */ type ModifierChunkArgs = { - expr: ModifierExpression, - ctx: Requirement, - courses: Course[], + expr: ModifierExpression + ctx: Requirement + courses: Course[] } export function computeModifier({ expr, ctx, courses }: ModifierChunkArgs) { assertKeys(expr, "$what", "$count", "$from") @@ -384,7 +383,7 @@ export function computeModifier({ expr, ctx, courses }: ModifierChunkArgs) { } filtered = filtered.map((course) => - "$course" in course ? (course: any).$course : course, + "$course" in course ? (course as any).$course : course, ) if (expr.$besides) { @@ -430,8 +429,8 @@ export function computeModifier({ expr, ctx, courses }: ModifierChunkArgs) { * @returns {boolean} - the result of the occurrence */ type OccurrenceChunkArgs = { - expr: OccurrenceExpression, - courses: Course[], + expr: OccurrenceExpression + courses: Course[] } export function computeOccurrence({ expr, courses }: OccurrenceChunkArgs) { assertKeys(expr, "$course", "$count") @@ -463,11 +462,11 @@ export function computeOccurrence({ expr, courses }: OccurrenceChunkArgs) { * @returns {boolean} - the result of the of-expression */ type OfChunkArgs = { - expr: OfExpression, - ctx: Requirement, - courses: Course[], - dirty: Set, - isNeeded: boolean, + expr: OfExpression + ctx: Requirement + courses: Course[] + dirty: Set + isNeeded: boolean } export function computeOf({ expr, @@ -484,7 +483,7 @@ export function computeOf({ // computeChunk return a boolean. // Number() converts that to a 0 or a 1, which then is added to `count`. let thisResult = computeChunk({ - expr: (req: any), + expr: req as any, ctx, courses, dirty, @@ -549,10 +548,13 @@ export function computeOf({ * @param {Requirement} ctx - the requirement context * @returns {boolean} - the result of the reference expression */ -type ComputeReferenceResult = { matches: ?(Course[]), computedResult: boolean } +type ComputeReferenceResult = { + matches: Course[] | null | undefined + computedResult: boolean +} type ReferenceChunkArgs = { - expr: ReferenceExpression, - ctx: Requirement, + expr: ReferenceExpression + ctx: Requirement } export function computeReference({ expr, @@ -591,8 +593,8 @@ export function computeReference({ * @returns {boolean} - the result of the where-expression */ type WhereChunkArgs = { - expr: WhereExpression, - courses: Course[], + expr: WhereExpression + courses: Course[] } export function computeWhere({ expr, courses }: WhereChunkArgs) { assertKeys(expr, "$where", "$count", "$distinct") diff --git a/modules/gob-examine-student/source/compute-count-with-operator.js b/modules/gob-examine-student/source/compute-count-with-operator.ts similarity index 85% rename from modules/gob-examine-student/source/compute-count-with-operator.js rename to modules/gob-examine-student/source/compute-count-with-operator.ts index 5edb9f3d84..5bb5b1856c 100644 --- a/modules/gob-examine-student/source/compute-count-with-operator.js +++ b/modules/gob-examine-student/source/compute-count-with-operator.ts @@ -1,13 +1,12 @@ -// @flow import type { CounterOperatorEnum } from "./types" export default function computeCountWithOperator({ comparator, has, needs, }: { - comparator: CounterOperatorEnum, - has: number, - needs: number, + comparator: CounterOperatorEnum + has: number + needs: number }): boolean { // compute the result if (comparator === "$eq") { diff --git a/modules/gob-examine-student/source/compute.js b/modules/gob-examine-student/source/compute.ts similarity index 95% rename from modules/gob-examine-student/source/compute.js rename to modules/gob-examine-student/source/compute.ts index d3b7b78e4d..7f224270c7 100644 --- a/modules/gob-examine-student/source/compute.js +++ b/modules/gob-examine-student/source/compute.ts @@ -1,4 +1,3 @@ -// @flow import applyFilter from "./apply-filter" import applyFulfillmentToExpression from "./apply-fulfillment-to-expression" import computeChunk from "./compute-chunk" @@ -21,11 +20,11 @@ import type { export default function compute( outerReq: Requirement | ParsedHansonFile | ParsedHansonRequirement, args: { - path: string[], - courses: Course[], - overrides: OverridesObject, - fulfillments: FulfillmentsObject, - dirty?: Set, + path: string[] + courses: Course[] + overrides: OverridesObject + fulfillments: FulfillmentsObject + dirty?: Set }, ) { let { diff --git a/modules/gob-examine-student/source/count-courses.js b/modules/gob-examine-student/source/count-courses.ts similarity index 98% rename from modules/gob-examine-student/source/count-courses.js rename to modules/gob-examine-student/source/count-courses.ts index 995e2428a0..78dfb2af52 100644 --- a/modules/gob-examine-student/source/count-courses.js +++ b/modules/gob-examine-student/source/count-courses.ts @@ -1,4 +1,3 @@ -// @flow import uniqBy from "lodash/uniqBy" import size from "lodash/size" import simplifyCourse from "./simplify-course" diff --git a/modules/gob-examine-student/source/count-credits.js b/modules/gob-examine-student/source/count-credits.ts similarity index 77% rename from modules/gob-examine-student/source/count-credits.js rename to modules/gob-examine-student/source/count-credits.ts index 6e1fd16254..aa190917cd 100644 --- a/modules/gob-examine-student/source/count-credits.js +++ b/modules/gob-examine-student/source/count-credits.ts @@ -1,7 +1,5 @@ -// @flow - import sumBy from "lodash/sumBy" -import { type Course as CourseType } from "@gob/types" +import type { Course as CourseType } from "@gob/types" // Sums up the number of credits offered by a set of courses export function countCredits(courses: Array = []) { diff --git a/modules/gob-examine-student/source/count-departments.js b/modules/gob-examine-student/source/count-departments.ts similarity index 98% rename from modules/gob-examine-student/source/count-departments.js rename to modules/gob-examine-student/source/count-departments.ts index 22b8569704..96e9450de8 100644 --- a/modules/gob-examine-student/source/count-departments.js +++ b/modules/gob-examine-student/source/count-departments.ts @@ -1,4 +1,3 @@ -// @flow import compact from "lodash/compact" import getDepartments from "./get-departments" import type { Course } from "./types" diff --git a/modules/gob-examine-student/source/count-terms.js b/modules/gob-examine-student/source/count-terms.ts similarity index 97% rename from modules/gob-examine-student/source/count-terms.js rename to modules/gob-examine-student/source/count-terms.ts index c0fe18bac5..0546d73564 100644 --- a/modules/gob-examine-student/source/count-terms.js +++ b/modules/gob-examine-student/source/count-terms.ts @@ -1,4 +1,3 @@ -// @flow import type { Course } from "./types" /** diff --git a/modules/gob-examine-student/source/evaluate.js b/modules/gob-examine-student/source/evaluate.ts similarity index 85% rename from modules/gob-examine-student/source/evaluate.js rename to modules/gob-examine-student/source/evaluate.ts index 42fb599f62..cb67ab476b 100644 --- a/modules/gob-examine-student/source/evaluate.js +++ b/modules/gob-examine-student/source/evaluate.ts @@ -1,4 +1,3 @@ -// @flow import assertKeys from "./assert-keys" import compute from "./compute" import type { @@ -10,12 +9,12 @@ import type { } from "./types" type Input = { - area: ParsedHansonFile, - courses: Array, + area: ParsedHansonFile + courses: Array - courses: Course[], - overrides: OverridesObject, - fulfillments: FulfillmentsObject, + courses: Course[] + overrides: OverridesObject + fulfillments: FulfillmentsObject } export function evaluate({ @@ -63,7 +62,7 @@ export function evaluate({ break } - let finalReqs = bits.map((b) => ("_result" in b ? (b: any)._result : false)) + let finalReqs = bits.map((b) => ("_result" in b ? (b as any)._result : false)) let maxProgress = finalReqs.length let currentProgress = finalReqs.filter(Boolean).length diff --git a/modules/gob-examine-student/source/exclude-course.js b/modules/gob-examine-student/source/exclude-course.ts similarity index 98% rename from modules/gob-examine-student/source/exclude-course.js rename to modules/gob-examine-student/source/exclude-course.ts index ba1f11745f..352bd01c5e 100644 --- a/modules/gob-examine-student/source/exclude-course.js +++ b/modules/gob-examine-student/source/exclude-course.ts @@ -1,4 +1,3 @@ -// @flow import reject from "lodash/reject" import compareCourseToCourse from "./compare-course-to-course" import type { Course } from "./types" diff --git a/modules/gob-examine-student/source/filter-by-where-clause.js b/modules/gob-examine-student/source/filter-by-where-clause.ts similarity index 95% rename from modules/gob-examine-student/source/filter-by-where-clause.js rename to modules/gob-examine-student/source/filter-by-where-clause.ts index b2699269cb..49e15d3a45 100644 --- a/modules/gob-examine-student/source/filter-by-where-clause.js +++ b/modules/gob-examine-student/source/filter-by-where-clause.ts @@ -1,4 +1,3 @@ -// @flow import filter from "lodash/filter" import forEach from "lodash/forEach" import map from "lodash/map" @@ -24,7 +23,7 @@ export default function filterByWhereClause( distinct, fullList, counter, - }: { distinct: boolean, fullList?: Course[], counter?: Counter } = {}, + }: { distinct: boolean; fullList?: Course[]; counter?: Counter } = {}, ) { // When filtering by an and-clause, we need access to both the // entire list of courses, and the result of the prior iteration. @@ -99,7 +98,7 @@ export function filterByQualification( distinct = false, fullList, counter, - }: { distinct: boolean, fullList?: Course[], counter?: Counter } = {}, + }: { distinct: boolean; fullList?: Course[]; counter?: Counter } = {}, ) { assertKeys(qualification, "$key", "$operator", "$value") const value = qualification.$value @@ -147,9 +146,9 @@ function applyQualifictionFunction({ fullList, list, }: { - value: QualificationFunctionValue, - fullList?: Course[], - list: Course[], + value: QualificationFunctionValue + fullList?: Course[] + list: Course[] }) { const func = qualificationFunctionLookup[value.$name] diff --git a/modules/gob-examine-student/source/find-course.js b/modules/gob-examine-student/source/find-course.ts similarity index 98% rename from modules/gob-examine-student/source/find-course.js rename to modules/gob-examine-student/source/find-course.ts index 86d3e5aa42..64f0222268 100644 --- a/modules/gob-examine-student/source/find-course.js +++ b/modules/gob-examine-student/source/find-course.ts @@ -1,4 +1,3 @@ -// @flow import find from "lodash/find" import compareCourseToCourse from "./compare-course-to-course" import type { Course } from "./types" diff --git a/modules/gob-examine-student/source/find-leaf-requirements.js b/modules/gob-examine-student/source/find-leaf-requirements.ts similarity index 99% rename from modules/gob-examine-student/source/find-leaf-requirements.js rename to modules/gob-examine-student/source/find-leaf-requirements.ts index fd3eda6dc4..73b3c32664 100644 --- a/modules/gob-examine-student/source/find-leaf-requirements.js +++ b/modules/gob-examine-student/source/find-leaf-requirements.ts @@ -1,4 +1,3 @@ -// @flow import flatten from "lodash/flatten" import map from "lodash/map" import compact from "lodash/compact" diff --git a/modules/gob-examine-student/source/get-departments.js b/modules/gob-examine-student/source/get-departments.ts similarity index 97% rename from modules/gob-examine-student/source/get-departments.js rename to modules/gob-examine-student/source/get-departments.ts index 5581d13233..bebe2e4810 100644 --- a/modules/gob-examine-student/source/get-departments.js +++ b/modules/gob-examine-student/source/get-departments.ts @@ -1,4 +1,3 @@ -// @flow import type { Course } from "./types" /** diff --git a/modules/gob-examine-student/source/get-fulfillment.js b/modules/gob-examine-student/source/get-fulfillment.ts similarity index 96% rename from modules/gob-examine-student/source/get-fulfillment.js rename to modules/gob-examine-student/source/get-fulfillment.ts index 706810c859..c1c019603c 100644 --- a/modules/gob-examine-student/source/get-fulfillment.js +++ b/modules/gob-examine-student/source/get-fulfillment.ts @@ -1,4 +1,3 @@ -// @flow import pathToOverride from "./path-to-override" import type { FulfillmentsPath, FulfillmentsObject } from "./types" diff --git a/modules/gob-examine-student/source/get-matches-from-children.js b/modules/gob-examine-student/source/get-matches-from-children.ts similarity index 95% rename from modules/gob-examine-student/source/get-matches-from-children.js rename to modules/gob-examine-student/source/get-matches-from-children.ts index 9981f09404..18d54e5208 100644 --- a/modules/gob-examine-student/source/get-matches-from-children.js +++ b/modules/gob-examine-student/source/get-matches-from-children.ts @@ -1,4 +1,3 @@ -// @flow import collectMatches from "./collect-matches" import isRequirementName from "./is-requirement-name" import flatten from "lodash/flatten" @@ -47,7 +46,7 @@ export default function getMatchesFromChildren( // (I opted for passing iteratee to uniq, rather than mapping, to let lodash optimize a bit.) // finally, collect the matching courses from the requested children - const matches = childKeys.map((key) => collectMatches((ctx: any)[key])) + const matches = childKeys.map((key) => collectMatches((ctx as any)[key])) const flatMatches = flatten(matches) const uniquedMatches = uniqBy(flatMatches, stringify) diff --git a/modules/gob-examine-student/source/get-matches-from-filter.js b/modules/gob-examine-student/source/get-matches-from-filter.ts similarity index 97% rename from modules/gob-examine-student/source/get-matches-from-filter.js rename to modules/gob-examine-student/source/get-matches-from-filter.ts index 612c0d63fe..2dff4186e5 100644 --- a/modules/gob-examine-student/source/get-matches-from-filter.js +++ b/modules/gob-examine-student/source/get-matches-from-filter.ts @@ -1,4 +1,3 @@ -// @flow import assertKeys from "./assert-keys" import type { Requirement } from "./types" diff --git a/modules/gob-examine-student/source/get-occurrences.js b/modules/gob-examine-student/source/get-occurrences.ts similarity index 98% rename from modules/gob-examine-student/source/get-occurrences.js rename to modules/gob-examine-student/source/get-occurrences.ts index 4c64c1ae41..725867380f 100644 --- a/modules/gob-examine-student/source/get-occurrences.js +++ b/modules/gob-examine-student/source/get-occurrences.ts @@ -1,4 +1,3 @@ -// @flow import filter from "lodash/filter" import simplifyCourse from "./simplify-course" import type { Course } from "./types" diff --git a/modules/gob-examine-student/source/get-override.js b/modules/gob-examine-student/source/get-override.ts similarity index 98% rename from modules/gob-examine-student/source/get-override.js rename to modules/gob-examine-student/source/get-override.ts index 96e51af4fc..7090757d6e 100644 --- a/modules/gob-examine-student/source/get-override.js +++ b/modules/gob-examine-student/source/get-override.ts @@ -1,4 +1,3 @@ -// @flow import pathToOverride from "./path-to-override" import type { OverridesPath, OverridesObject } from "./types" diff --git a/modules/gob-examine-student/source/has-override.js b/modules/gob-examine-student/source/has-override.ts similarity index 98% rename from modules/gob-examine-student/source/has-override.js rename to modules/gob-examine-student/source/has-override.ts index 3566190a25..687a8da825 100644 --- a/modules/gob-examine-student/source/has-override.js +++ b/modules/gob-examine-student/source/has-override.ts @@ -1,4 +1,3 @@ -// @flow import has from "lodash/has" import pathToOverride from "./path-to-override" import type { OverridesObject, OverridesPath } from "./types" diff --git a/modules/gob-examine-student/source/humanize-operator.js b/modules/gob-examine-student/source/humanize-operator.ts similarity index 97% rename from modules/gob-examine-student/source/humanize-operator.js rename to modules/gob-examine-student/source/humanize-operator.ts index 5d9544867f..fb2ebac5b7 100644 --- a/modules/gob-examine-student/source/humanize-operator.js +++ b/modules/gob-examine-student/source/humanize-operator.ts @@ -1,4 +1,3 @@ -// @flow import type { CounterOperatorEnum } from "./types" export default function humanizeOperator(operator: CounterOperatorEnum) { if (operator === "$gte") { diff --git a/modules/gob-examine-student/source/is-requirement-name.js b/modules/gob-examine-student/source/is-requirement-name.ts similarity index 98% rename from modules/gob-examine-student/source/is-requirement-name.js rename to modules/gob-examine-student/source/is-requirement-name.ts index 532a3c9f80..d2d57eb382 100644 --- a/modules/gob-examine-student/source/is-requirement-name.js +++ b/modules/gob-examine-student/source/is-requirement-name.ts @@ -1,4 +1,3 @@ -// @flow const isRequirementNameRegex = /^[A-Z0-9][A-Za-z0-9_\- /]*/ /** diff --git a/modules/gob-examine-student/source/path-to-override.js b/modules/gob-examine-student/source/path-to-override.ts similarity index 96% rename from modules/gob-examine-student/source/path-to-override.js rename to modules/gob-examine-student/source/path-to-override.ts index 011158dc23..2c7fb5528e 100644 --- a/modules/gob-examine-student/source/path-to-override.js +++ b/modules/gob-examine-student/source/path-to-override.ts @@ -1,5 +1,3 @@ -// @flow - const JOINER = "\x1C" /** diff --git a/modules/gob-examine-student/source/pluralize-area.js b/modules/gob-examine-student/source/pluralize-area.ts similarity index 98% rename from modules/gob-examine-student/source/pluralize-area.js rename to modules/gob-examine-student/source/pluralize-area.ts index 0312aff2da..54409365b1 100644 --- a/modules/gob-examine-student/source/pluralize-area.js +++ b/modules/gob-examine-student/source/pluralize-area.ts @@ -1,5 +1,3 @@ -// @flow - /** * Pluralizes an area type * @private diff --git a/modules/gob-examine-student/source/simplify-course.js b/modules/gob-examine-student/source/simplify-course.ts similarity index 99% rename from modules/gob-examine-student/source/simplify-course.js rename to modules/gob-examine-student/source/simplify-course.ts index 648c3a8f9c..bada33dcd8 100644 --- a/modules/gob-examine-student/source/simplify-course.js +++ b/modules/gob-examine-student/source/simplify-course.ts @@ -1,4 +1,3 @@ -// @flow // import memoize from 'lodash/memoize' // import identity from 'lodash/identity' import type { Course } from "./types" diff --git a/modules/gob-examine-student/source/types.js b/modules/gob-examine-student/source/types.js deleted file mode 100644 index 5737294118..0000000000 --- a/modules/gob-examine-student/source/types.js +++ /dev/null @@ -1,251 +0,0 @@ -// @flow - -import type { Course } from "@gob/types" - -export type { Course } - -import type { - ParsedHansonFile, - ParsedHansonRequirement, -} from "@gob/hanson-format" -export type { ParsedHansonFile, ParsedHansonRequirement } - -export type EvaluationResult = { - $type: "requirement", - result?: Expression, - filter?: Filter, - "children share courses"?: boolean, - _checked?: boolean, - _result?: boolean, - computed?: boolean, - overridden?: boolean, - error?: string, - progress: { - of: number, - at: number, - }, -} - -export type OverridesPath = string[] -export type OverridesObject = { [key: string]: any } -export type FulfillmentsPath = OverridesPath -export type FulfillmentsObject = { [key: string]: Fulfillment } - -export type AreaOfStudyTypeEnum = - | "degree" - | "major" - | "concentration" - | "emphasis" - | "interdisciplinary" - -export type AreaOfStudy = { - ...Requirement, - name: string, - type: AreaOfStudyTypeEnum, -} - -export type Fulfillment = { - $course: Course, -} - -export type Filter = FilterExpression - -export type Requirement = { - $type: "requirement", - result: Expression, - filter: Filter, - computed: boolean, - overridden?: boolean, - "children share courses"?: boolean, -} - -export type CounterOperatorEnum = "$gte" | "$lte" | "$eq" -export type Counter = { - $operator: CounterOperatorEnum, - $num: number, - $was?: "all" | "any" | "none", -} - -type Operator = "$lte" | "$lt" | "$eq" | "$gte" | "$gt" | "$ne" - -type BaseExpression = { - _fulfillment?: Fulfillment, - _matches?: Array, - _matched?: Array, - _result?: boolean, - _checked?: boolean, - _counted?: number, -} - -// type NotExpression = BaseExpression & {$type: 'not', $not: Expression[]} -export type OrExpression = { - ...BaseExpression, - $type: "boolean", - $booleanType: "or", - $or: Array, -} -export type AndExpression = { - ...BaseExpression, - $type: "boolean", - $booleanType: "and", - $and: Array, -} -export type BooleanExpression = OrExpression | AndExpression - -export type CourseExpression = { - ...BaseExpression, - _request?: Course, - _taken?: boolean, - $type: "course", - $course: Course, -} - -export type QualificationFunctionValue = { - $type: "function", - $name: string, - $prop: string, - $where: Qualifier, - "$computed-value": any, -} -type QualificationStaticValue = number | string -export type QualificationBooleanOrValue = { - $type: "boolean", - $booleanType: "or", - $or: Array, -} -export type QualificationBooleanAndValue = { - $type: "boolean", - $booleanType: "and", - $and: Array, -} -export type QualificationBooleanValue = - | QualificationBooleanOrValue - | QualificationBooleanAndValue - -export type QualificationValue = - | QualificationFunctionValue - | QualificationBooleanValue - | QualificationStaticValue - -export type Qualification = { - ...BaseExpression, - $type: "qualification", - $key: string, - $operator: Operator, - $value: QualificationValue, -} - -export type OrQualification = { - ...BaseExpression, - $type: "boolean", - $booleanType: "or", - $or: Array, -} -export type AndQualification = { - ...BaseExpression, - $type: "boolean", - $booleanType: "and", - $and: Array, -} -export type BooleanQualification = OrQualification | AndQualification -export type Qualifier = BooleanQualification | Qualification - -type ModifierWhatEnum = "course" | "credit" | "department" -type BaseModifierExpression = { - _fulfillment?: Fulfillment, - _matches?: Array, - _matched?: Array, - _result?: boolean, - _checked?: boolean, - _counted?: number, - $type: "modifier", - $count: Counter, - $what: ModifierWhatEnum, - $besides?: CourseExpression, -} -export type ModifierFilterExpression = { - ...BaseModifierExpression, - $from: "filter", -} -export type ModifierFilterWhereExpression = { - ...BaseModifierExpression, - $from: "filter-where", - $where: Qualifier, -} -export type ModifierChildrenExpression = { - ...BaseModifierExpression, - $from: "children", - $children: "$all" | Array, -} -export type ModifierChildrenWhereExpression = { - ...BaseModifierExpression, - $from: "children-where", - $children: "$all" | Array, - $where: Qualifier, -} -export type ModifierWhereExpression = { - ...BaseModifierExpression, - $from: "where", - $where: Qualification, -} -export type ModifierExpression = - | ModifierWhereExpression - | ModifierFilterExpression - | ModifierFilterWhereExpression - | ModifierChildrenExpression - | ModifierChildrenWhereExpression - -export type OccurrenceExpression = { - ...BaseExpression, - $type: "occurrence", - $count: Counter, - $course: Course, -} - -export type OfExpression = { - ...BaseExpression, - $type: "of", - $count: Counter, - $of: Array, -} - -export type ReferenceExpression = { - ...BaseExpression, - $type: "reference", - $requirement: string, -} - -type BaseFilterExpression = { - ...BaseExpression, - $type: "filter", - $distinct: boolean, -} -export type FilterWhereExpression = { - ...BaseFilterExpression, - $filterType: "where", - $where: Qualifier, -} -export type FilterOfExpression = { - ...BaseFilterExpression, - $filterType: "of", - $of: Array, -} -export type FilterExpression = FilterOfExpression | FilterWhereExpression - -export type WhereExpression = { - ...BaseExpression, - $type: "where", - $where: Qualifier, - $count: Counter, - $distinct: boolean, -} - -export type Expression = - | BooleanExpression - | CourseExpression - | ModifierExpression - | OccurrenceExpression - | OfExpression - | ReferenceExpression - | FilterExpression - | WhereExpression diff --git a/modules/gob-examine-student/source/types.ts b/modules/gob-examine-student/source/types.ts new file mode 100644 index 0000000000..b29ae94ed6 --- /dev/null +++ b/modules/gob-examine-student/source/types.ts @@ -0,0 +1,230 @@ +import type { Course } from "@gob/types" + +export type { Course } + +import type { + ParsedHansonFile, + ParsedHansonRequirement, +} from "@gob/hanson-format" +export type { ParsedHansonFile, ParsedHansonRequirement } + +export type EvaluationResult = { + $type: "requirement" + result?: Expression + filter?: Filter + "children share courses"?: boolean + _checked?: boolean + _result?: boolean + computed?: boolean + overridden?: boolean + error?: string + progress: { + of: number + at: number + } +} + +export type OverridesPath = string[] +export type OverridesObject = { [key: string]: any } +export type FulfillmentsPath = OverridesPath +export type FulfillmentsObject = { [key: string]: Fulfillment } + +export type AreaOfStudyTypeEnum = + | "degree" + | "major" + | "concentration" + | "emphasis" + | "interdisciplinary" + +export type AreaOfStudy = Requirement & { + name: string + type: AreaOfStudyTypeEnum +} + +export type Fulfillment = { + $course: Course +} + +export type Filter = FilterExpression + +export type Requirement = { + $type: "requirement" + result: Expression + filter: Filter + computed: boolean + overridden?: boolean + "children share courses"?: boolean +} + +export type CounterOperatorEnum = "$gte" | "$lte" | "$eq" +export type Counter = { + $operator: CounterOperatorEnum + $num: number + $was?: "all" | "any" | "none" +} + +type Operator = "$lte" | "$lt" | "$eq" | "$gte" | "$gt" | "$ne" + +type BaseExpression = { + _fulfillment?: Fulfillment + _matches?: Array + _matched?: Array + _result?: boolean + _checked?: boolean + _counted?: number +} + +// type NotExpression = BaseExpression & {$type: 'not', $not: Expression[]} +export type OrExpression = BaseExpression & { + $type: "boolean" + $booleanType: "or" + $or: Array +} +export type AndExpression = BaseExpression & { + $type: "boolean" + $booleanType: "and" + $and: Array +} +export type BooleanExpression = OrExpression | AndExpression + +export type CourseExpression = BaseExpression & { + _request?: Course + _taken?: boolean + $type: "course" + $course: Course +} + +export type QualificationFunctionValue = { + $type: "function" + $name: string + $prop: string + $where: Qualifier + "$computed-value": any +} +type QualificationStaticValue = number | string +export type QualificationBooleanOrValue = { + $type: "boolean" + $booleanType: "or" + $or: Array +} +export type QualificationBooleanAndValue = { + $type: "boolean" + $booleanType: "and" + $and: Array +} +export type QualificationBooleanValue = + | QualificationBooleanOrValue + | QualificationBooleanAndValue + +export type QualificationValue = + | QualificationFunctionValue + | QualificationBooleanValue + | QualificationStaticValue + +export type Qualification = BaseExpression & { + $type: "qualification" + $key: string + $operator: Operator + $value: QualificationValue +} + +export type OrQualification = BaseExpression & { + $type: "boolean" + $booleanType: "or" + $or: Array +} +export type AndQualification = BaseExpression & { + $type: "boolean" + $booleanType: "and" + $and: Array +} +export type BooleanQualification = OrQualification | AndQualification +export type Qualifier = BooleanQualification | Qualification + +type ModifierWhatEnum = "course" | "credit" | "department" +type BaseModifierExpression = { + _fulfillment?: Fulfillment + _matches?: Array + _matched?: Array + _result?: boolean + _checked?: boolean + _counted?: number + $type: "modifier" + $count: Counter + $what: ModifierWhatEnum + $besides?: CourseExpression +} +export type ModifierFilterExpression = BaseModifierExpression & { + $from: "filter" +} +export type ModifierFilterWhereExpression = BaseModifierExpression & { + $from: "filter-where" + $where: Qualifier +} +export type ModifierChildrenExpression = BaseModifierExpression & { + $from: "children" + $children: "$all" | Array +} +export type ModifierChildrenWhereExpression = BaseModifierExpression & { + $from: "children-where" + $children: "$all" | Array + $where: Qualifier +} +export type ModifierWhereExpression = BaseModifierExpression & { + $from: "where" + $where: Qualification +} +export type ModifierExpression = + | ModifierWhereExpression + | ModifierFilterExpression + | ModifierFilterWhereExpression + | ModifierChildrenExpression + | ModifierChildrenWhereExpression + +export type OccurrenceExpression = BaseExpression & { + $type: "occurrence" + $count: Counter + $course: Course +} + +export type OfExpression = BaseExpression & { + $type: "of" + $count: Counter + $of: Array +} + +export type ReferenceExpression = BaseExpression & { + $type: "reference" + $requirement: string +} + +type BaseFilterExpression = BaseExpression & { + $type: "filter" + $distinct: boolean +} +export type FilterWhereExpression = BaseFilterExpression & { + $filterType: "where" + $where: Qualifier +} +export type FilterOfExpression = BaseFilterExpression & { + $filterType: "of" + $of: Array +} +export type FilterExpression = FilterOfExpression | FilterWhereExpression + +export type WhereExpression = BaseExpression & { + $type: "where" + $where: Qualifier + $count: Counter + $distinct: boolean +} + +export type Expression = + | BooleanExpression + | CourseExpression + | ModifierExpression + | OccurrenceExpression + | OfExpression + | ReferenceExpression + | FilterExpression + | WhereExpression diff --git a/modules/gob-hanson-format-cli/compile-area.js b/modules/gob-hanson-format-cli/compile-area.ts similarity index 100% rename from modules/gob-hanson-format-cli/compile-area.js rename to modules/gob-hanson-format-cli/compile-area.ts diff --git a/modules/gob-hanson-format-cli/compile-student.js b/modules/gob-hanson-format-cli/compile-student.ts similarity index 100% rename from modules/gob-hanson-format-cli/compile-student.js rename to modules/gob-hanson-format-cli/compile-student.ts diff --git a/modules/gob-hanson-format-cli/parse-result.js b/modules/gob-hanson-format-cli/parse-result.ts similarity index 100% rename from modules/gob-hanson-format-cli/parse-result.js rename to modules/gob-hanson-format-cli/parse-result.ts diff --git a/modules/gob-hanson-format/__tests__/__snapshots__/enhance-hanson.test.js.snap b/modules/gob-hanson-format/__tests__/__snapshots__/enhance-hanson.test.ts.snap similarity index 100% rename from modules/gob-hanson-format/__tests__/__snapshots__/enhance-hanson.test.js.snap rename to modules/gob-hanson-format/__tests__/__snapshots__/enhance-hanson.test.ts.snap diff --git a/modules/gob-hanson-format/__tests__/enhance-hanson.test.js b/modules/gob-hanson-format/__tests__/enhance-hanson.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/enhance-hanson.test.js rename to modules/gob-hanson-format/__tests__/enhance-hanson.test.ts diff --git a/modules/gob-hanson-format/__tests__/expand-department.test.js b/modules/gob-hanson-format/__tests__/expand-department.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/expand-department.test.js rename to modules/gob-hanson-format/__tests__/expand-department.test.ts diff --git a/modules/gob-hanson-format/__tests__/normalize-department.test.js b/modules/gob-hanson-format/__tests__/normalize-department.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/normalize-department.test.js rename to modules/gob-hanson-format/__tests__/normalize-department.test.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/boolean-expression.test.js.snap b/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/boolean-expression.test.ts.snap similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/boolean-expression.test.js.snap rename to modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/boolean-expression.test.ts.snap diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/counters.test.js.snap b/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/counters.test.ts.snap similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/counters.test.js.snap rename to modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/counters.test.ts.snap diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/course-expression.test.js.snap b/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/course-expression.test.ts.snap similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/course-expression.test.js.snap rename to modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/course-expression.test.ts.snap diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/filter-expression.test.js.snap b/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/filter-expression.test.ts.snap similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/filter-expression.test.js.snap rename to modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/filter-expression.test.ts.snap diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/modifier-expression.test.js.snap b/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/modifier-expression.test.ts.snap similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/modifier-expression.test.js.snap rename to modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/modifier-expression.test.ts.snap diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/occurrence-expression.test.js.snap b/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/occurrence-expression.test.ts.snap similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/occurrence-expression.test.js.snap rename to modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/occurrence-expression.test.ts.snap diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/of-expression.test.js.snap b/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/of-expression.test.ts.snap similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/of-expression.test.js.snap rename to modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/of-expression.test.ts.snap diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/reference-expression.test.js.snap b/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/reference-expression.test.ts.snap similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/reference-expression.test.js.snap rename to modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/reference-expression.test.ts.snap diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/where-expression.test.js.snap b/modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/where-expression.test.ts.snap similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/where-expression.test.js.snap rename to modules/gob-hanson-format/__tests__/parse-hanson-string/__snapshots__/where-expression.test.ts.snap diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/boolean-expression.test.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/boolean-expression.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/boolean-expression.test.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/boolean-expression.test.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/counters.test.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/counters.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/counters.test.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/counters.test.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/course-expression.test.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/course-expression.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/course-expression.test.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/course-expression.test.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/filter-expression.test.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/filter-expression.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/filter-expression.test.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/filter-expression.test.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/generated-parser.test.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/generated-parser.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/generated-parser.test.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/generated-parser.test.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/modifier-expression.test.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/modifier-expression.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/modifier-expression.test.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/modifier-expression.test.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/occurrence-expression.test.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/occurrence-expression.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/occurrence-expression.test.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/occurrence-expression.test.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/of-expression.test.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/of-expression.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/of-expression.test.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/of-expression.test.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/parse-hanson-string.support.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/parse-hanson-string.support.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/parse-hanson-string.support.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/parse-hanson-string.support.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/reference-expression.test.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/reference-expression.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/reference-expression.test.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/reference-expression.test.ts diff --git a/modules/gob-hanson-format/__tests__/parse-hanson-string/where-expression.test.js b/modules/gob-hanson-format/__tests__/parse-hanson-string/where-expression.test.ts similarity index 100% rename from modules/gob-hanson-format/__tests__/parse-hanson-string/where-expression.test.js rename to modules/gob-hanson-format/__tests__/parse-hanson-string/where-expression.test.ts diff --git a/modules/gob-hanson-format/build-parser.sh b/modules/gob-hanson-format/build-parser.sh new file mode 100755 index 0000000000..b00fce605d --- /dev/null +++ b/modules/gob-hanson-format/build-parser.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +# Generate the parser +pegjs --allowed-start-rules Result,Filter < ./parse-hanson-string.pegjs > ./parse-hanson-string.js + +# Remove the CommonJS module.exports +sed -i '/^module\.exports = {$/,/^};$/d' ./parse-hanson-string.js + +# Add ES6 exports +cat >> ./parse-hanson-string.js << 'EXPORTS' + +// ES6 exports for compatibility with TypeScript +export { peg$SyntaxError as SyntaxError, peg$parse as parse }; +EXPORTS + +# Format with prettier to ensure consistency +../../node_modules/.bin/prettier --write ./parse-hanson-string.js + +echo "Parser built successfully with ES6 exports" diff --git a/modules/gob-hanson-format/convert-department.js b/modules/gob-hanson-format/convert-department.ts similarity index 96% rename from modules/gob-hanson-format/convert-department.js rename to modules/gob-hanson-format/convert-department.ts index 79bd23dd5e..5d3dee3436 100644 --- a/modules/gob-hanson-format/convert-department.js +++ b/modules/gob-hanson-format/convert-department.ts @@ -172,8 +172,7 @@ forEach( }, ) -// eslint-disable-next-line no-unused-vars -const geReqsMapping = { +const _geReqsMapping = { "history of western culture": "HWC", "historical studies in western culture": "HWC", "artistic studies": "ALS-A", @@ -210,8 +209,7 @@ const geReqsMapping = { ethics: "EIN", } -// eslint-disable-next-line no-unused-vars -const courseTypesMapping = { +const _courseTypesMapping = { L: "Lab", D: "Discussion", S: "Seminar", @@ -235,7 +233,7 @@ export function expandDepartment(dept: string) { `expandDepartment(): '${dept}' is not a valid department shorthand`, ) } - return toDepartmentNames[dept] + return toDepartmentNames[dept as keyof typeof toDepartmentNames] } export function normalizeDepartment(dept: string) { @@ -243,5 +241,7 @@ export function normalizeDepartment(dept: string) { if (!(dept in toDepartmentAbbreviations)) { return dept } - return toDepartmentAbbreviations[dept] + return toDepartmentAbbreviations[ + dept as keyof typeof toDepartmentAbbreviations + ] } diff --git a/modules/gob-hanson-format/enhance-hanson.js b/modules/gob-hanson-format/enhance-hanson.ts similarity index 97% rename from modules/gob-hanson-format/enhance-hanson.js rename to modules/gob-hanson-format/enhance-hanson.ts index f76d3c90b1..02b2dae891 100644 --- a/modules/gob-hanson-format/enhance-hanson.js +++ b/modules/gob-hanson-format/enhance-hanson.ts @@ -1,5 +1,3 @@ -// @flow - import isRequirementName from "@gob/examine-student/source/is-requirement-name" import fromPairs from "lodash/fromPairs" import toPairs from "lodash/toPairs" @@ -211,7 +209,7 @@ function enhanceRequirement( return returnedValue } -function assertString(key: string, value: mixed) { +function assertString(key: string, value: unknown) { return `\`${String(value)}\` should be \`string\`, not \`${typeof value}\`` } @@ -232,15 +230,15 @@ function extractRequirementNames(data: {}) { } type ParsePegArgs = { - variables?: Mapped, - titles: Mapped, - abbreviations: Mapped, + variables?: Mapped + titles: Mapped + abbreviations: Mapped } function parseWithPeg( value: string, args: ParsePegArgs & { startRule: PegStartRule }, -): Object { +): Record { let { variables = {}, titles, abbreviations, startRule } = args if (typeof value !== "string") { diff --git a/modules/gob-hanson-format/index.js b/modules/gob-hanson-format/index.ts similarity index 96% rename from modules/gob-hanson-format/index.js rename to modules/gob-hanson-format/index.ts index baeb1a411e..511ee2fa29 100644 --- a/modules/gob-hanson-format/index.js +++ b/modules/gob-hanson-format/index.ts @@ -1,5 +1,3 @@ -// @flow - export { expandDepartment, normalizeDepartment } from "./convert-department" export { enhanceHanson } from "./enhance-hanson" export { makeAreaSlug } from "./make-area-slug" diff --git a/modules/gob-hanson-format/make-area-slug.js b/modules/gob-hanson-format/make-area-slug.ts similarity index 94% rename from modules/gob-hanson-format/make-area-slug.js rename to modules/gob-hanson-format/make-area-slug.ts index 83f3f2b92e..3e25e85c6a 100644 --- a/modules/gob-hanson-format/make-area-slug.js +++ b/modules/gob-hanson-format/make-area-slug.ts @@ -1,4 +1,3 @@ -// @flow import kebabCase from "lodash/kebabCase" export function makeAreaSlug(name: string): string { diff --git a/modules/gob-hanson-format/package.json b/modules/gob-hanson-format/package.json index 4dd02a058a..62171e7ee2 100644 --- a/modules/gob-hanson-format/package.json +++ b/modules/gob-hanson-format/package.json @@ -9,7 +9,7 @@ "author": "Hawken MacKay Rives", "license": "MIT", "scripts": { - "build": "pegjs --allowed-start-rules Result,Filter < ./parse-hanson-string.pegjs > ./parse-hanson-string.js" + "build": "./build-parser.sh" }, "dependencies": { "@gob/examine-student": "^3.0.0-rc.2", diff --git a/modules/gob-hanson-format/parse-hanson-string.js b/modules/gob-hanson-format/parse-hanson-string.js index 75eb1727bd..a11f2f652f 100644 --- a/modules/gob-hanson-format/parse-hanson-string.js +++ b/modules/gob-hanson-format/parse-hanson-string.js @@ -422,9 +422,7 @@ function peg$parse(input, options) { if (ofList.length < count.$num) { throw new Error( - `you requested ${count.$num} items, but only gave ${ - ofList.length - } options (${JSON.stringify(ofList)}).`, + `you requested ${count.$num} items, but only gave ${ofList.length} options (${JSON.stringify(ofList)}).`, ) } @@ -4308,7 +4306,5 @@ function peg$parse(input, options) { } } -module.exports = { - SyntaxError: peg$SyntaxError, - parse: peg$parse, -} +// ES6 exports for compatibility with TypeScript +export { peg$SyntaxError as SyntaxError, peg$parse as parse } diff --git a/modules/gob-hanson-format/types.js b/modules/gob-hanson-format/types.js deleted file mode 100644 index a41131f545..0000000000 --- a/modules/gob-hanson-format/types.js +++ /dev/null @@ -1,53 +0,0 @@ -// @flow - -export type Mapped = { [key: string]: T } - -export type HansonFile = { - name: string, - type: string, - revision: string, - result: string, - dateAdded?: string, - sourcePath?: string, - slug?: string, - "available through"?: number, - [key: string]: Mapped, -} - -export type ParsedHansonFile = { - name: string, - type: string, - revision: string, - result: Object, - slug: string, - dateAdded?: string, - sourcePath?: string, - "available through"?: number, - $type: "requirement", - [key: string]: Mapped, -} - -export type HansonRequirement = { - "children share courses"?: boolean, - "student selected"?: boolean, - contract?: boolean, - declare?: Mapped, - description?: boolean, - filter?: ?string, - message?: string, - result: string, - [key: string]: Mapped, -} - -export type ParsedHansonRequirement = { - $type: "requirement", - "children share courses"?: boolean, - "student selected"?: boolean, - contract?: boolean, - declare?: Mapped, - description?: boolean, - filter: ?Mapped, - message: ?string, - result: ?Mapped, - [key: string]: Mapped, -} diff --git a/modules/gob-hanson-format/types.ts b/modules/gob-hanson-format/types.ts new file mode 100644 index 0000000000..9575279448 --- /dev/null +++ b/modules/gob-hanson-format/types.ts @@ -0,0 +1,51 @@ +export type Mapped = { [key: string]: T } + +export type HansonFile = { + name: string + type: string + revision: string + result: string + dateAdded?: string + sourcePath?: string + slug?: string + "available through"?: number + [key: string]: Mapped +} + +export type ParsedHansonFile = { + name: string + type: string + revision: string + result: Record + slug: string + dateAdded?: string + sourcePath?: string + "available through"?: number + $type: "requirement" + [key: string]: Mapped +} + +export type HansonRequirement = { + "children share courses"?: boolean + "student selected"?: boolean + contract?: boolean + declare?: Mapped + description?: boolean + filter?: string | null | undefined + message?: string + result: string + [key: string]: Mapped +} + +export type ParsedHansonRequirement = { + $type: "requirement" + "children share courses"?: boolean + "student selected"?: boolean + contract?: boolean + declare?: Mapped + description?: boolean + filter: Mapped | null | undefined + message: string | null | undefined + result: Mapped | null | undefined + [key: string]: Mapped +} diff --git a/modules/gob-lib/__tests__/compare-props.test.js b/modules/gob-lib/__tests__/compare-props.test.ts similarity index 100% rename from modules/gob-lib/__tests__/compare-props.test.js rename to modules/gob-lib/__tests__/compare-props.test.ts diff --git a/modules/gob-lib/__tests__/find-missing-number.test.js b/modules/gob-lib/__tests__/find-missing-number.test.ts similarity index 100% rename from modules/gob-lib/__tests__/find-missing-number.test.js rename to modules/gob-lib/__tests__/find-missing-number.test.ts diff --git a/modules/gob-lib/__tests__/find-word-for-progress.test.js b/modules/gob-lib/__tests__/find-word-for-progress.test.ts similarity index 100% rename from modules/gob-lib/__tests__/find-word-for-progress.test.js rename to modules/gob-lib/__tests__/find-word-for-progress.test.ts diff --git a/modules/gob-lib/__tests__/interpose.test.js b/modules/gob-lib/__tests__/interpose.test.ts similarity index 100% rename from modules/gob-lib/__tests__/interpose.test.js rename to modules/gob-lib/__tests__/interpose.test.ts diff --git a/modules/gob-lib/__tests__/random-char.test.js b/modules/gob-lib/__tests__/random-char.test.ts similarity index 100% rename from modules/gob-lib/__tests__/random-char.test.js rename to modules/gob-lib/__tests__/random-char.test.ts diff --git a/modules/gob-lib/__tests__/split-paragraph.test.js b/modules/gob-lib/__tests__/split-paragraph.test.ts similarity index 100% rename from modules/gob-lib/__tests__/split-paragraph.test.js rename to modules/gob-lib/__tests__/split-paragraph.test.ts diff --git a/modules/gob-lib/__tests__/stringify-error.test.js b/modules/gob-lib/__tests__/stringify-error.test.ts similarity index 100% rename from modules/gob-lib/__tests__/stringify-error.test.js rename to modules/gob-lib/__tests__/stringify-error.test.ts diff --git a/modules/gob-lib/__tests__/to-12-hour-time.test.js b/modules/gob-lib/__tests__/to-12-hour-time.test.ts similarity index 100% rename from modules/gob-lib/__tests__/to-12-hour-time.test.js rename to modules/gob-lib/__tests__/to-12-hour-time.test.ts diff --git a/modules/gob-lib/__tests__/zip-to-object-with-arrays.test.js b/modules/gob-lib/__tests__/zip-to-object-with-arrays.test.ts similarity index 100% rename from modules/gob-lib/__tests__/zip-to-object-with-arrays.test.js rename to modules/gob-lib/__tests__/zip-to-object-with-arrays.test.ts diff --git a/modules/gob-lib/compare-props.js b/modules/gob-lib/compare-props.js deleted file mode 100644 index 7d963f0ef3..0000000000 --- a/modules/gob-lib/compare-props.js +++ /dev/null @@ -1,10 +0,0 @@ -// @flow - -import every from "lodash/every" - -export function compareProps(oldProps: Object, newProps: Object): boolean { - return !every( - oldProps, - (_: mixed, key: string) => oldProps[key] === newProps[key], - ) -} diff --git a/modules/gob-lib/compare-props.ts b/modules/gob-lib/compare-props.ts new file mode 100644 index 0000000000..920b2743cd --- /dev/null +++ b/modules/gob-lib/compare-props.ts @@ -0,0 +1,11 @@ +import every from "lodash/every" + +export function compareProps( + oldProps: Record, + newProps: Record, +): boolean { + return !every( + oldProps, + (_: unknown, key: string) => oldProps[key] === newProps[key], + ) +} diff --git a/modules/gob-lib/errors.js b/modules/gob-lib/errors.ts similarity index 89% rename from modules/gob-lib/errors.js rename to modules/gob-lib/errors.ts index 759f405854..a94f5b314a 100644 --- a/modules/gob-lib/errors.js +++ b/modules/gob-lib/errors.ts @@ -1,4 +1,2 @@ -// @flow - export class AuthError extends Error {} export class NetworkError extends Error {} diff --git a/modules/gob-lib/fetch-helpers.js b/modules/gob-lib/fetch-helpers.ts similarity index 88% rename from modules/gob-lib/fetch-helpers.js rename to modules/gob-lib/fetch-helpers.ts index 9f259cc813..cb9fbd73c5 100644 --- a/modules/gob-lib/fetch-helpers.js +++ b/modules/gob-lib/fetch-helpers.ts @@ -1,5 +1,3 @@ -// @flow - import { NetworkError } from "./errors" export function status(response: Response): Response { @@ -16,7 +14,7 @@ export function classifyFetchErrors(err: Error) { } } -export function json(response: Response): Promise { +export function json(response: Response): Promise { return response.json() } diff --git a/modules/gob-lib/find-missing-number.js b/modules/gob-lib/find-missing-number.ts similarity index 74% rename from modules/gob-lib/find-missing-number.js rename to modules/gob-lib/find-missing-number.ts index 8e557b47e1..6c76f53dea 100644 --- a/modules/gob-lib/find-missing-number.js +++ b/modules/gob-lib/find-missing-number.ts @@ -1,6 +1,4 @@ -// @flow - -export function findMissingNumber(arr: number[]): ?number { +export function findMissingNumber(arr: number[]): number | null | undefined { if (arr.length === 0) { return null } diff --git a/modules/gob-lib/find-word-for-progress.js b/modules/gob-lib/find-word-for-progress.ts similarity index 98% rename from modules/gob-lib/find-word-for-progress.js rename to modules/gob-lib/find-word-for-progress.ts index b4168c811f..3917ed176e 100644 --- a/modules/gob-lib/find-word-for-progress.js +++ b/modules/gob-lib/find-word-for-progress.ts @@ -1,5 +1,3 @@ -// @flow - export function findWordForProgress( maxProgress: number, currentProgress: number, diff --git a/modules/gob-lib/index.js b/modules/gob-lib/index.ts similarity index 98% rename from modules/gob-lib/index.js rename to modules/gob-lib/index.ts index acf77389f1..b775ce2a5b 100644 --- a/modules/gob-lib/index.js +++ b/modules/gob-lib/index.ts @@ -1,5 +1,3 @@ -// @flow - export { compareProps } from "./compare-props" export { AuthError, NetworkError } from "./errors" export { status, classifyFetchErrors, json, text } from "./fetch-helpers" diff --git a/modules/gob-lib/interpose.js b/modules/gob-lib/interpose.ts similarity index 96% rename from modules/gob-lib/interpose.js rename to modules/gob-lib/interpose.ts index 4d0ba04cd8..7a55b09e11 100644 --- a/modules/gob-lib/interpose.js +++ b/modules/gob-lib/interpose.ts @@ -1,5 +1,3 @@ -// @flow - import reduce from "lodash/reduce" export function interpose(data: T[], value: U): (T | U)[] { diff --git a/modules/gob-lib/partition-by-index.js b/modules/gob-lib/partition-by-index.ts similarity index 88% rename from modules/gob-lib/partition-by-index.js rename to modules/gob-lib/partition-by-index.ts index 866449a98e..b82e4a3a26 100644 --- a/modules/gob-lib/partition-by-index.js +++ b/modules/gob-lib/partition-by-index.ts @@ -1,5 +1,3 @@ -// @flow - export function partitionByIndex(arr: Array): [T[], U[]] { let reduced = arr.reduce( (acc, val, idx) => { @@ -9,5 +7,5 @@ export function partitionByIndex(arr: Array): [T[], U[]] { }, [[], []], ) - return (reduced: any) + return reduced as any } diff --git a/modules/gob-lib/random-char.js b/modules/gob-lib/random-char.ts similarity index 95% rename from modules/gob-lib/random-char.js rename to modules/gob-lib/random-char.ts index e5e39c49ad..a962abcd18 100644 --- a/modules/gob-lib/random-char.js +++ b/modules/gob-lib/random-char.ts @@ -1,5 +1,3 @@ -// @flow - /** * A function to return a random character, modified from * stackoverflow.com/questions/10726909/random-alpha-numeric-string-in-javascript diff --git a/modules/gob-lib/split-paragraph.js b/modules/gob-lib/split-paragraph.ts similarity index 97% rename from modules/gob-lib/split-paragraph.js rename to modules/gob-lib/split-paragraph.ts index cf93c8b5e5..ac9475eaf0 100644 --- a/modules/gob-lib/split-paragraph.js +++ b/modules/gob-lib/split-paragraph.ts @@ -1,5 +1,3 @@ -// @flow - import words from "lodash/words" import deburr from "lodash/deburr" diff --git a/modules/gob-lib/stringify-error.js b/modules/gob-lib/stringify-error.ts similarity index 96% rename from modules/gob-lib/stringify-error.js rename to modules/gob-lib/stringify-error.ts index 461e221c6c..7c4f48d1cc 100644 --- a/modules/gob-lib/stringify-error.js +++ b/modules/gob-lib/stringify-error.ts @@ -1,5 +1,3 @@ -// @flow - export function stringifyError( err: any, filter?: Array | ((key: any, value: any) => any), diff --git a/modules/gob-lib/to-12-hour-time.js b/modules/gob-lib/to-12-hour-time.ts similarity index 98% rename from modules/gob-lib/to-12-hour-time.js rename to modules/gob-lib/to-12-hour-time.ts index 594d0aadb4..3966d66a84 100644 --- a/modules/gob-lib/to-12-hour-time.js +++ b/modules/gob-lib/to-12-hour-time.ts @@ -1,5 +1,3 @@ -// @flow - import padStart from "lodash/padStart" function split24HourTime(time) { diff --git a/modules/gob-lib/zip-to-object-with-arrays.js b/modules/gob-lib/zip-to-object-with-arrays.ts similarity index 90% rename from modules/gob-lib/zip-to-object-with-arrays.js rename to modules/gob-lib/zip-to-object-with-arrays.ts index e153652881..ce072a9c72 100644 --- a/modules/gob-lib/zip-to-object-with-arrays.js +++ b/modules/gob-lib/zip-to-object-with-arrays.ts @@ -1,5 +1,3 @@ -// @flow - import reduce from "lodash/reduce" import zip from "lodash/zip" import has from "lodash/has" @@ -7,7 +5,7 @@ import has from "lodash/has" export function zipToObjectWithArrays( keys: any[], vals: T[], -): { [key: string]: Array } { +): Record> { let arr = zip(keys, vals) return reduce( diff --git a/modules/gob-object-student/__tests__/__snapshots__/sort-studies-by-type.test.js.snap b/modules/gob-object-student/__tests__/__snapshots__/sort-studies-by-type.test.ts.snap similarity index 100% rename from modules/gob-object-student/__tests__/__snapshots__/sort-studies-by-type.test.js.snap rename to modules/gob-object-student/__tests__/__snapshots__/sort-studies-by-type.test.ts.snap diff --git a/modules/gob-object-student/__tests__/encode-student.test.js b/modules/gob-object-student/__tests__/encode-student.test.ts similarity index 100% rename from modules/gob-object-student/__tests__/encode-student.test.js rename to modules/gob-object-student/__tests__/encode-student.test.ts diff --git a/modules/gob-object-student/__tests__/find-course-warnings.test.js b/modules/gob-object-student/__tests__/find-course-warnings.test.ts similarity index 100% rename from modules/gob-object-student/__tests__/find-course-warnings.test.js rename to modules/gob-object-student/__tests__/find-course-warnings.test.ts diff --git a/modules/gob-object-student/__tests__/schedule.test.js b/modules/gob-object-student/__tests__/schedule.test.ts similarity index 100% rename from modules/gob-object-student/__tests__/schedule.test.js rename to modules/gob-object-student/__tests__/schedule.test.ts diff --git a/modules/gob-object-student/__tests__/sort-studies-by-type.test.js b/modules/gob-object-student/__tests__/sort-studies-by-type.test.ts similarity index 100% rename from modules/gob-object-student/__tests__/sort-studies-by-type.test.js rename to modules/gob-object-student/__tests__/sort-studies-by-type.test.ts diff --git a/modules/gob-object-student/__tests__/student.test.js b/modules/gob-object-student/__tests__/student.test.ts similarity index 99% rename from modules/gob-object-student/__tests__/student.test.js rename to modules/gob-object-student/__tests__/student.test.ts index 69ea6c7663..bb443a04b5 100644 --- a/modules/gob-object-student/__tests__/student.test.js +++ b/modules/gob-object-student/__tests__/student.test.ts @@ -82,7 +82,7 @@ describe("Student", () => { describe("addFabricationToStudent", () => { it("adds fabrications", () => { let stu = new Student() - let addedFabrication = stu.addFabrication(({ clbid: "123" }: any)) + let addedFabrication = stu.addFabrication({ clbid: "123" } as any) expect(addedFabrication.getFabrication("123")).toEqual({ clbid: "123" }) }) }) @@ -90,7 +90,7 @@ describe("addFabricationToStudent", () => { describe("removeFabricationFromStudent", () => { it("removes fabrications", () => { let stu = new Student() - stu = stu.addFabrication(({ clbid: "123" }: any)) + stu = stu.addFabrication({ clbid: "123" } as any) stu = stu.removeFabrication("123") expect(stu.getFabrication("123")).not.toBeDefined() }) diff --git a/modules/gob-object-student/__tests__/validate-schedule.test.js b/modules/gob-object-student/__tests__/validate-schedule.test.ts similarity index 100% rename from modules/gob-object-student/__tests__/validate-schedule.test.js rename to modules/gob-object-student/__tests__/validate-schedule.test.ts diff --git a/modules/gob-object-student/__tests__/validate-schedules.test.js b/modules/gob-object-student/__tests__/validate-schedules.test.ts similarity index 100% rename from modules/gob-object-student/__tests__/validate-schedules.test.js rename to modules/gob-object-student/__tests__/validate-schedules.test.ts diff --git a/modules/gob-object-student/area-types.js b/modules/gob-object-student/area-types.ts similarity index 63% rename from modules/gob-object-student/area-types.js rename to modules/gob-object-student/area-types.ts index c8b157e2e7..e76480d504 100644 --- a/modules/gob-object-student/area-types.js +++ b/modules/gob-object-student/area-types.ts @@ -1,6 +1,4 @@ -// @flow - -export const areaTypeConstants: { [key: string]: string } = { +export const areaTypeConstants: Record = { DEGREE: "degree", MAJOR: "major", CONCENTRATION: "concentration", diff --git a/modules/gob-object-student/encode-student.js b/modules/gob-object-student/encode-student.ts similarity index 94% rename from modules/gob-object-student/encode-student.js rename to modules/gob-object-student/encode-student.ts index 88a4a43c81..f7bbd0ea0b 100644 --- a/modules/gob-object-student/encode-student.js +++ b/modules/gob-object-student/encode-student.ts @@ -1,5 +1,3 @@ -// @flow - import stringify from "stabilize" import { Student } from "./student" diff --git a/modules/gob-object-student/filter-area-list.js b/modules/gob-object-student/filter-area-list.ts similarity index 95% rename from modules/gob-object-student/filter-area-list.js rename to modules/gob-object-student/filter-area-list.ts index 3893a0fe81..28922a1986 100644 --- a/modules/gob-object-student/filter-area-list.js +++ b/modules/gob-object-student/filter-area-list.ts @@ -1,12 +1,10 @@ -// @flow - import groupBy from "lodash/groupBy" import flatten from "lodash/flatten" import sortBy from "lodash/sortBy" import values from "lodash/values" import findLast from "lodash/findLast" -import { type ParsedHansonFile } from "@gob/hanson-format" +import type { ParsedHansonFile } from "@gob/hanson-format" function convertRevisionToYear(rev) { // The +1 is because the year is the beginning of the academic year, but @@ -32,7 +30,7 @@ function convertRevisionToYear(rev) { export function filterAreaList( areas: Array, availableThrough: number, -): $ReadOnlyArray { +): ReadonlyArray { // Remove all areas that are closed to new class years. let onlyAvailableAreas = areas.filter( (area) => diff --git a/modules/gob-object-student/find-course-warnings.js b/modules/gob-object-student/find-course-warnings.ts similarity index 91% rename from modules/gob-object-student/find-course-warnings.js rename to modules/gob-object-student/find-course-warnings.ts index 57859e3b96..3eca0ad1e5 100644 --- a/modules/gob-object-student/find-course-warnings.js +++ b/modules/gob-object-student/find-course-warnings.ts @@ -1,5 +1,3 @@ -// @flow - import { List, Map } from "immutable" import ordinal from "ord" import oxford from "listify" @@ -14,16 +12,16 @@ export type WarningTypeEnum = | "time-conflict" export type WarningType = { - warning: true, - type: WarningTypeEnum, - msg: string, + warning: true + type: WarningTypeEnum + msg: string } export function checkForInvalidYear( course: CourseType, scheduleYear: number, thisYear: number = new Date().getFullYear(), -): ?WarningType { +): WarningType | null | undefined { if (course.semester === 9 || course.semester === undefined) { return null } @@ -43,7 +41,7 @@ export function checkForInvalidYear( export function checkForInvalidSemester( course: CourseType, scheduleSemester: number, -): ?WarningType { +): WarningType | null | undefined { if (course.semester === scheduleSemester) { return null } @@ -58,8 +56,8 @@ export function checkForInvalidSemester( export function checkForInvalidity( courses: List, - { year, semester }: { year: number, semester: number }, -): Map> { + { year, semester }: { year: number; semester: number }, +): Map> { let results = courses.map((course) => { let invalidYear = checkForInvalidYear(course, year) let invalidSemester = checkForInvalidSemester(course, semester) @@ -71,7 +69,7 @@ export function checkForInvalidity( export function checkForTimeConflicts( courses: List, -): Map> { +): Map> { let results = courses .zip(findTimeConflicts(courses.toArray())) .map(([course, conflictSet]) => { diff --git a/modules/gob-object-student/get-active-courses.js b/modules/gob-object-student/get-active-courses.ts similarity index 98% rename from modules/gob-object-student/get-active-courses.js rename to modules/gob-object-student/get-active-courses.ts index 1c1b1da8af..964c2de01b 100644 --- a/modules/gob-object-student/get-active-courses.js +++ b/modules/gob-object-student/get-active-courses.ts @@ -1,5 +1,3 @@ -// @flow - import { List } from "immutable" import { Student } from "./student" import type { Course as CourseType } from "@gob/types" diff --git a/modules/gob-object-student/index.js b/modules/gob-object-student/index.ts similarity index 98% rename from modules/gob-object-student/index.js rename to modules/gob-object-student/index.ts index 9bc80b6e7f..24acbf50e8 100644 --- a/modules/gob-object-student/index.js +++ b/modules/gob-object-student/index.ts @@ -1,5 +1,3 @@ -// @flow - export { areaTypeConstants } from "./area-types" export { encodeStudent } from "./encode-student" export { filterAreaList } from "./filter-area-list" diff --git a/modules/gob-object-student/item-types.js b/modules/gob-object-student/item-types.ts similarity index 96% rename from modules/gob-object-student/item-types.js rename to modules/gob-object-student/item-types.ts index 22c05be645..938d85075c 100644 --- a/modules/gob-object-student/item-types.js +++ b/modules/gob-object-student/item-types.ts @@ -1,5 +1,3 @@ -// @flow - export const IDENT_COURSE = "gobbldygook/dnd/course" export const IDENT_AREA = "gobbldygook/dnd/area" export const IDENT_YEAR = "gobbldygook/dnd/year" diff --git a/modules/gob-object-student/schedule.js b/modules/gob-object-student/schedule.ts similarity index 88% rename from modules/gob-object-student/schedule.js rename to modules/gob-object-student/schedule.ts index c3f28d6ccb..171a3ec50f 100644 --- a/modules/gob-object-student/schedule.js +++ b/modules/gob-object-student/schedule.ts @@ -1,5 +1,3 @@ -// @flow - import uuid from "uuid/v4" import { randomChar } from "@gob/lib" import type { Result } from "@gob/types" @@ -12,13 +10,13 @@ import { } from "./validate-schedule" type ScheduleType = { - id: string, - active: boolean, - index: number, - title: string, - clbids: List, - year: number, - semester: number, + id: string + active: boolean + index: number + title: string + clbids: List + year: number + semester: number } const defaultValues: ScheduleType = { @@ -46,11 +44,11 @@ export class Schedule extends ScheduleRecord { } = data if (!List.isList(clbids)) { - clbids = List((clbids: any)) + clbids = List(clbids) } - if ((clbids: any).some((id) => typeof id === "number")) { - clbids = (clbids: any).map((id) => String(id).padStart(10, "0")) + if (clbids.some((id) => typeof id === "number")) { + clbids = clbids.map((id) => String(id).padStart(10, "0")) } super({ @@ -60,7 +58,7 @@ export class Schedule extends ScheduleRecord { active, title, id, - clbids: (clbids: any), + clbids, }) } diff --git a/modules/gob-object-student/sort-studies-by-type.js b/modules/gob-object-student/sort-studies-by-type.ts similarity index 81% rename from modules/gob-object-student/sort-studies-by-type.js rename to modules/gob-object-student/sort-studies-by-type.ts index 7ee8c8a007..8bc1be77cd 100644 --- a/modules/gob-object-student/sort-studies-by-type.js +++ b/modules/gob-object-student/sort-studies-by-type.ts @@ -1,7 +1,6 @@ -// @flow import sortBy from "lodash/sortBy" -import { type AreaQuery } from "./types" +import type { AreaQuery } from "./types" const types = ["degree", "major", "concentration", "emphasis"] export function sortStudiesByType(studies: Array) { diff --git a/modules/gob-object-student/student.js b/modules/gob-object-student/student.ts similarity index 84% rename from modules/gob-object-student/student.js rename to modules/gob-object-student/student.ts index c8e2ee5ca5..e76c0898f6 100644 --- a/modules/gob-object-student/student.js +++ b/modules/gob-object-student/student.ts @@ -1,5 +1,3 @@ -// @flow - import uuid from "uuid/v4" import { Record, OrderedMap, Map, List } from "immutable" @@ -16,24 +14,24 @@ import { getActiveCourses } from "./get-active-courses" import { encodeStudent } from "./encode-student" type StudentType = { - id: string, - name: string, - version: string, - matriculation: number, - graduation: number, - advisor: string, - dateLastModified: Date, - dateCreated: Date, - - creditsNeeded: number, - - studies: List, - schedules: OrderedMap, - overrides: OrderedMap, - fabrications: List, - fulfillments: OrderedMap, - - settings: OrderedMap, + id: string + name: string + version: string + matriculation: number + graduation: number + advisor: string + dateLastModified: Date + dateCreated: Date + + creditsNeeded: number + + studies: List + schedules: OrderedMap + overrides: OrderedMap + fabrications: List + fulfillments: OrderedMap + + settings: OrderedMap } const defaultValues: StudentType = { @@ -57,7 +55,7 @@ const defaultValues: StudentType = { const StudentRecord = Record(defaultValues) export class Student extends StudentRecord { - constructor(data: { [key: $Keys]: mixed } = {}) { + constructor(data: { [key: keyof StudentType]: any } = {}) { const now = new Date() let { @@ -85,52 +83,50 @@ export class Student extends StudentRecord { if (Array.isArray(schedules)) { schedules = OrderedMap(schedules.map((s: any) => [s.id, s])) } else if (!OrderedMap.isOrderedMap(schedules)) { - schedules = OrderedMap((schedules: any)) + schedules = OrderedMap(schedules as any) } - if ((schedules: any).some((s) => !(s instanceof Schedule))) { - schedules = (schedules: any).map((s) => new Schedule(s)) + if ((schedules as any).some((s) => !(s instanceof Schedule))) { + schedules = (schedules as any).map((s) => new Schedule(s)) } if (Array.isArray(fabrications)) { - fabrications = List((fabrications: any)) + fabrications = List(fabrications as any) } else if (List.isList(fabrications)) { - fabrications = List((fabrications: any)) + fabrications = List(fabrications as any) } else { - fabrications = Map((fabrications: any)).toList() + fabrications = Map(fabrications as any).toList() } if (!OrderedMap.isOrderedMap(overrides)) { - overrides = OrderedMap((overrides: any)) + overrides = OrderedMap(overrides as any) } if (!OrderedMap.isOrderedMap(settings)) { - settings = OrderedMap((settings: any)) + settings = OrderedMap(settings as any) } if (!OrderedMap.isOrderedMap(fulfillments)) { - fulfillments = OrderedMap((fulfillments: any)) + fulfillments = OrderedMap(fulfillments as any) } - super( - ({ - dateLastModified, - dateCreated, - id, - studies, - schedules, - matriculation, - graduation, - fulfillments, - settings, - overrides, - fabrications, - advisor, - version, - name, - creditsNeeded, - }: any), - ) + super({ + dateLastModified, + dateCreated, + id, + studies, + schedules, + matriculation, + graduation, + fulfillments, + settings, + overrides, + fabrications, + advisor, + version, + name, + creditsNeeded, + } as any) } get id(): string { @@ -181,11 +177,11 @@ export class Student extends StudentRecord { return this.set("graduation", newYear) } - get settings(): OrderedMap { + get settings(): OrderedMap { return this.get("settings") } - setSetting(key: string, value: mixed): this { + setSetting(key: string, value: unknown): this { return this.setIn(["settings", key], value) } @@ -205,7 +201,10 @@ export class Student extends StudentRecord { return this.setIn(["schedules", schedule.id], schedule) } - getScheduleForTerm(args: { year: number, semester: number }): ?Schedule { + getScheduleForTerm(args: { + year: number + semester: number + }): Schedule | undefined { let { year, semester } = args return this.schedules.find( (s) => s.active === true && s.year === year && s.semester === semester, @@ -213,8 +212,8 @@ export class Student extends StudentRecord { } findSchedulesForTerm(args: { - year: number, - semester: number, + year: number + semester: number }): List { let { year, semester } = args return this.schedules @@ -262,7 +261,7 @@ export class Student extends StudentRecord { }) } - destroySchedulesForTerm(args: {| year: number, semester: number |}): this { + destroySchedulesForTerm(args: { year: number; semester: number }): this { let { year, semester } = args if (year == null || semester == null) { @@ -283,7 +282,7 @@ export class Student extends StudentRecord { moveSchedule( scheduleId: string, - { year, semester }: { year: number, semester: number }, + { year, semester }: { year: number; semester: number }, ): this { return this.mergeIn(["schedules", scheduleId], { year, semester }) } @@ -333,9 +332,9 @@ export class Student extends StudentRecord { } moveCourseToSchedule(args: { - from: string, - to: string, - clbid: string, + from: string + to: string + clbid: string }): this { let { from, to, clbid } = args @@ -347,7 +346,7 @@ export class Student extends StudentRecord { reorderCourseInSchedule( scheduleId: string, - { clbid, index }: { clbid: string, index: number }, + { clbid, index }: { clbid: string; index: number }, ): this { return this.updateIn(["schedules", scheduleId, "clbids"], (ids) => { if (!ids) { @@ -447,7 +446,7 @@ export class Student extends StudentRecord { }) } - getFabrication(fabricationId: string): ?CourseType { + getFabrication(fabricationId: string): CourseType | undefined { return this.fabrications.find(({ clbid }) => clbid === fabricationId) } diff --git a/modules/gob-object-student/types.js b/modules/gob-object-student/types.js deleted file mode 100644 index 03c5f855c6..0000000000 --- a/modules/gob-object-student/types.js +++ /dev/null @@ -1,23 +0,0 @@ -// @flow - -import type { Course as CourseType, Result } from "@gob/types" - -export type { CourseType } - -import { List } from "immutable" - -export type AreaQuery = { - type: string, - name: string, - revision: string, -} - -export type OverrideType = mixed - -export type FulfillmentType = {||} - -export type CourseLookupFunc = ( - clbid: string, - term?: ?number, - fabrications?: ?(Array | List), -) => Promise> diff --git a/modules/gob-object-student/types.ts b/modules/gob-object-student/types.ts new file mode 100644 index 0000000000..582da447e5 --- /dev/null +++ b/modules/gob-object-student/types.ts @@ -0,0 +1,21 @@ +import type { Course as CourseType, Result } from "@gob/types" + +export type { CourseType } + +import { List } from "immutable" + +export type AreaQuery = { + type: string + name: string + revision: string +} + +export type OverrideType = unknown + +export type FulfillmentType = Record + +export type CourseLookupFunc = ( + clbid: string, + term?: number | null | undefined, + fabrications?: (Array | List) | null | undefined, +) => Promise> diff --git a/modules/gob-object-student/validate-schedule.js b/modules/gob-object-student/validate-schedule.ts similarity index 80% rename from modules/gob-object-student/validate-schedule.js rename to modules/gob-object-student/validate-schedule.ts index c289064561..33b13590e7 100644 --- a/modules/gob-object-student/validate-schedule.js +++ b/modules/gob-object-student/validate-schedule.ts @@ -1,13 +1,11 @@ -// @flow - import { findWarnings, type WarningType } from "./find-course-warnings" -import { type Course as CourseType } from "@gob/types" +import type { Course as CourseType } from "@gob/types" import { Schedule } from "./schedule" import { Map, List } from "immutable" export type Result = { - hasConflict: boolean, - warnings: Map>, + hasConflict: boolean + warnings: Map> } // Checks to see if the schedule is valid diff --git a/modules/gob-schedule-builder/combo-has-courses.js b/modules/gob-schedule-builder/combo-has-courses.ts similarity index 97% rename from modules/gob-schedule-builder/combo-has-courses.js rename to modules/gob-schedule-builder/combo-has-courses.ts index 99933c6ff8..0f539da224 100644 --- a/modules/gob-schedule-builder/combo-has-courses.js +++ b/modules/gob-schedule-builder/combo-has-courses.ts @@ -1,5 +1,3 @@ -// @flow - import takeWhile from "lodash/takeWhile" import { queryCourses } from "@gob/search-queries" diff --git a/modules/gob-schedule-builder/index.js b/modules/gob-schedule-builder/index.ts similarity index 93% rename from modules/gob-schedule-builder/index.js rename to modules/gob-schedule-builder/index.ts index 8669871de4..06e9651c93 100644 --- a/modules/gob-schedule-builder/index.js +++ b/modules/gob-schedule-builder/index.ts @@ -1,4 +1,2 @@ -// @flow - // can't use export * with babel: see https://github.com/babel/babel/issues/4446 export { comboHasCourses } from "./combo-has-courses" diff --git a/modules/gob-schedule-conflicts/__tests__/test.js b/modules/gob-schedule-conflicts/__tests__/test.ts similarity index 100% rename from modules/gob-schedule-conflicts/__tests__/test.js rename to modules/gob-schedule-conflicts/__tests__/test.ts diff --git a/modules/gob-schedule-conflicts/index.js b/modules/gob-schedule-conflicts/index.ts similarity index 97% rename from modules/gob-schedule-conflicts/index.js rename to modules/gob-schedule-conflicts/index.ts index 8fddfe6745..2f9ed50008 100644 --- a/modules/gob-schedule-conflicts/index.js +++ b/modules/gob-schedule-conflicts/index.ts @@ -1,5 +1,3 @@ -// @flow - import type { Course, Offering } from "@gob/types" export function removeColon(time: string): string { @@ -52,7 +50,7 @@ export function checkCoursesForTimeConflicts( } export function findTimeConflicts( - courses: $ReadOnlyArray, + courses: ReadonlyArray, ): Array> { // results = [ // [c1: null, c2: false, c3: true ], diff --git a/modules/gob-school-st-olaf-college-sis-import/__tests__/__support__/expected-schedules.js b/modules/gob-school-st-olaf-college-sis-import/__tests__/__support__/expected-schedules.ts similarity index 100% rename from modules/gob-school-st-olaf-college-sis-import/__tests__/__support__/expected-schedules.js rename to modules/gob-school-st-olaf-college-sis-import/__tests__/__support__/expected-schedules.ts diff --git a/modules/gob-school-st-olaf-college-sis-import/__tests__/__support__/sample-student.js b/modules/gob-school-st-olaf-college-sis-import/__tests__/__support__/sample-student.ts similarity index 100% rename from modules/gob-school-st-olaf-college-sis-import/__tests__/__support__/sample-student.js rename to modules/gob-school-st-olaf-college-sis-import/__tests__/__support__/sample-student.ts diff --git a/modules/gob-school-st-olaf-college-sis-import/__tests__/convert-imported-student.test.js b/modules/gob-school-st-olaf-college-sis-import/__tests__/convert-imported-student.test.ts similarity index 100% rename from modules/gob-school-st-olaf-college-sis-import/__tests__/convert-imported-student.test.js rename to modules/gob-school-st-olaf-college-sis-import/__tests__/convert-imported-student.test.ts diff --git a/modules/gob-school-st-olaf-college-sis-import/convert-imported-student.js b/modules/gob-school-st-olaf-college-sis-import/convert-imported-student.ts similarity index 80% rename from modules/gob-school-st-olaf-college-sis-import/convert-imported-student.js rename to modules/gob-school-st-olaf-college-sis-import/convert-imported-student.ts index fce02e0bb0..74abdd2884 100644 --- a/modules/gob-school-st-olaf-college-sis-import/convert-imported-student.js +++ b/modules/gob-school-st-olaf-college-sis-import/convert-imported-student.ts @@ -1,5 +1,3 @@ -// @flow - import { Student, Schedule, @@ -10,32 +8,29 @@ import { import { List, Set, Map } from "immutable" type PartialCourse = { - credits: number, - number: string, - clbid: string, - graded: string, - department: string, - lab: boolean, - section: string, - name: string, - gereqs: Array, - - year: number, - semester: number, - term: number, - - type?: string, - title?: string, - crsid?: string, - status?: string, - pf?: boolean, - instructors?: Array, - enrolled?: number, - max?: number, - groupid?: string, - prerequisites?: false | string, - - _fabrication?: true, + credits: number + number: string + clbid: string + graded: string + department: string + lab: boolean + section: string + name: string + gereqs: Array + year: number + semester: number + term: number + type?: string + title?: string + crsid?: string + status?: string + pf?: boolean + instructors?: Array + enrolled?: number + max?: number + groupid?: string + prerequisites?: false | string + _fabrication?: true } function fleshOutSisFabrication(input: PartialCourse): CourseType { @@ -100,22 +95,22 @@ function fleshOutSisFabrication(input: PartialCourse): CourseType { } type PartialSchedule = { - semester: number, - year: number, - courses: Array, + semester: number + year: number + courses: Array } export type PartialStudent = { - courses: Array, - degrees: Array, - majors: Array, - concentrations: Array, - emphases: Array, - matriculation: number, - graduation: number, - advisor: string, - name: string, - schedules: Array, + courses: Array + degrees: Array + majors: Array + concentrations: Array + emphases: Array + matriculation: number + graduation: number + advisor: string + name: string + schedules: Array } export async function convertStudent( @@ -146,8 +141,8 @@ export async function processSchedules( schedules: Array, getCourse: CourseLookupFunc, ): Promise<{ - schedules: Map, - fabrications: List, + schedules: Map + fabrications: List }> { let listOfSchedules = List(schedules) let scheds = listOfSchedules.map((sched) => { diff --git a/modules/gob-school-st-olaf-college-sis-import/index.js b/modules/gob-school-st-olaf-college-sis-import/index.ts similarity index 92% rename from modules/gob-school-st-olaf-college-sis-import/index.js rename to modules/gob-school-st-olaf-college-sis-import/index.ts index f24a4d4ac4..58c0eca454 100644 --- a/modules/gob-school-st-olaf-college-sis-import/index.js +++ b/modules/gob-school-st-olaf-college-sis-import/index.ts @@ -1,4 +1,2 @@ -// @flow - export { convertStudent } from "./convert-imported-student" export type { PartialStudent } from "./convert-imported-student" diff --git a/modules/gob-school-st-olaf-college/course-info/__tests__/expand-year.test.js b/modules/gob-school-st-olaf-college/course-info/__tests__/expand-year.test.ts similarity index 100% rename from modules/gob-school-st-olaf-college/course-info/__tests__/expand-year.test.js rename to modules/gob-school-st-olaf-college/course-info/__tests__/expand-year.test.ts diff --git a/modules/gob-school-st-olaf-college/course-info/__tests__/semester-name.test.js b/modules/gob-school-st-olaf-college/course-info/__tests__/semester-name.test.ts similarity index 100% rename from modules/gob-school-st-olaf-college/course-info/__tests__/semester-name.test.js rename to modules/gob-school-st-olaf-college/course-info/__tests__/semester-name.test.ts diff --git a/modules/gob-school-st-olaf-college/course-info/__tests__/to-pretty-term.test.js b/modules/gob-school-st-olaf-college/course-info/__tests__/to-pretty-term.test.ts similarity index 100% rename from modules/gob-school-st-olaf-college/course-info/__tests__/to-pretty-term.test.js rename to modules/gob-school-st-olaf-college/course-info/__tests__/to-pretty-term.test.ts diff --git a/modules/gob-school-st-olaf-college/course-info/expand-year.js b/modules/gob-school-st-olaf-college/course-info/expand-year.ts similarity index 61% rename from modules/gob-school-st-olaf-college/course-info/expand-year.js rename to modules/gob-school-st-olaf-college/course-info/expand-year.ts index 816b900a2c..e6cebc3417 100644 --- a/modules/gob-school-st-olaf-college/course-info/expand-year.js +++ b/modules/gob-school-st-olaf-college/course-info/expand-year.ts @@ -1,9 +1,7 @@ -// @flow - export function expandYear( year: string | number, - short?: boolean = false, - separator?: string = "—", + short: boolean = false, + separator: string = "—", ) { if (typeof year === "string") { year = parseInt(year, 10) @@ -16,7 +14,10 @@ export function expandYear( } // 2012 => 2012-2013 -export function expandYearToFull(year: ?number, separator?: string = "—") { +export function expandYearToFull( + year: number | null | undefined, + separator: string = "—", +) { if (year == null) { return "???" } @@ -25,11 +26,13 @@ export function expandYearToFull(year: ?number, separator?: string = "—") { } // 2012 => 2012-13 -export function expandYearToShort(year: ?number, separator?: string = "—") { +export function expandYearToShort( + year: number | null | undefined, + separator: string = "—", +) { if (year == null) { return "???" } - let nextYear = year + 1 - nextYear = String(nextYear).substr(-2, 2) + let nextYear = String(year + 1).slice(-2) return `${year}${separator}${nextYear}` } diff --git a/modules/gob-school-st-olaf-college/course-info/index.js b/modules/gob-school-st-olaf-college/course-info/index.ts similarity index 93% rename from modules/gob-school-st-olaf-college/course-info/index.js rename to modules/gob-school-st-olaf-college/course-info/index.ts index cc3981061e..212660a6e7 100644 --- a/modules/gob-school-st-olaf-college/course-info/index.js +++ b/modules/gob-school-st-olaf-college/course-info/index.ts @@ -1,5 +1,3 @@ -// @flow - export { expandYear } from "./expand-year" export { semesterName } from "./semester-name" export { toPrettyTerm } from "./to-pretty-term" diff --git a/modules/gob-school-st-olaf-college/course-info/semester-name.js b/modules/gob-school-st-olaf-college/course-info/semester-name.ts similarity index 97% rename from modules/gob-school-st-olaf-college/course-info/semester-name.js rename to modules/gob-school-st-olaf-college/course-info/semester-name.ts index e33475e24c..f7520cea65 100644 --- a/modules/gob-school-st-olaf-college/course-info/semester-name.js +++ b/modules/gob-school-st-olaf-college/course-info/semester-name.ts @@ -1,5 +1,3 @@ -// @flow - const SEMESTERS = { "0": "Abroad", "1": "Fall", @@ -8,7 +6,7 @@ const SEMESTERS = { "4": "Summer Session 1", "5": "Summer Session 2", "9": "Non-St. Olaf", -} +} as const // Takes a semester number and returns the associated semester string. export function semesterName(semester: string | number): string { diff --git a/modules/gob-school-st-olaf-college/course-info/to-pretty-term.js b/modules/gob-school-st-olaf-college/course-info/to-pretty-term.ts similarity index 97% rename from modules/gob-school-st-olaf-college/course-info/to-pretty-term.js rename to modules/gob-school-st-olaf-college/course-info/to-pretty-term.ts index 53404edabc..a280f8ee84 100644 --- a/modules/gob-school-st-olaf-college/course-info/to-pretty-term.js +++ b/modules/gob-school-st-olaf-college/course-info/to-pretty-term.ts @@ -1,5 +1,3 @@ -// @flow - import { semesterName } from "./semester-name" import { expandYear } from "./expand-year" diff --git a/modules/gob-school-st-olaf-college/deptnums/__tests__/build-dept-num.test.js b/modules/gob-school-st-olaf-college/deptnums/__tests__/build-dept-num.test.ts similarity index 100% rename from modules/gob-school-st-olaf-college/deptnums/__tests__/build-dept-num.test.js rename to modules/gob-school-st-olaf-college/deptnums/__tests__/build-dept-num.test.ts diff --git a/modules/gob-school-st-olaf-college/deptnums/__tests__/quacks-like-dept-num.test.js b/modules/gob-school-st-olaf-college/deptnums/__tests__/quacks-like-dept-num.test.ts similarity index 100% rename from modules/gob-school-st-olaf-college/deptnums/__tests__/quacks-like-dept-num.test.js rename to modules/gob-school-st-olaf-college/deptnums/__tests__/quacks-like-dept-num.test.ts diff --git a/modules/gob-school-st-olaf-college/deptnums/__tests__/split-dept-num.test.js b/modules/gob-school-st-olaf-college/deptnums/__tests__/split-dept-num.test.ts similarity index 100% rename from modules/gob-school-st-olaf-college/deptnums/__tests__/split-dept-num.test.js rename to modules/gob-school-st-olaf-college/deptnums/__tests__/split-dept-num.test.ts diff --git a/modules/gob-school-st-olaf-college/deptnums/build-dept-num.js b/modules/gob-school-st-olaf-college/deptnums/build-dept-num.ts similarity index 79% rename from modules/gob-school-st-olaf-college/deptnums/build-dept-num.js rename to modules/gob-school-st-olaf-college/deptnums/build-dept-num.ts index 6508e581b5..571fb015fe 100644 --- a/modules/gob-school-st-olaf-college/deptnums/build-dept-num.js +++ b/modules/gob-school-st-olaf-college/deptnums/build-dept-num.ts @@ -1,5 +1,3 @@ -// @flow - /** * Builds a deptnum string from a course. * @@ -9,12 +7,12 @@ */ export function buildDeptNum( course: { - +department: string, - +number: number | string, - +section?: string, - +type?: string, + readonly department: string + readonly number: number | string + readonly section?: string + readonly type?: string }, - includeSection?: boolean = false, + includeSection: boolean = false, ) { let { department, number, section = "", type = null } = course diff --git a/modules/gob-school-st-olaf-college/deptnums/dept-num-regex.js b/modules/gob-school-st-olaf-college/deptnums/dept-num-regex.ts similarity index 90% rename from modules/gob-school-st-olaf-college/deptnums/dept-num-regex.js rename to modules/gob-school-st-olaf-college/deptnums/dept-num-regex.ts index 8159e44aca..599e6de06f 100644 --- a/modules/gob-school-st-olaf-college/deptnums/dept-num-regex.js +++ b/modules/gob-school-st-olaf-college/deptnums/dept-num-regex.ts @@ -1,4 +1,2 @@ -// @flow - export const deptNumRegex = /(([A-Z]+)(?=\/)(?:\/)([A-Z]+)|[A-Z]+) *([0-9]{3,}) *([A-Z]?)/i diff --git a/modules/gob-school-st-olaf-college/deptnums/index.js b/modules/gob-school-st-olaf-college/deptnums/index.ts similarity index 95% rename from modules/gob-school-st-olaf-college/deptnums/index.js rename to modules/gob-school-st-olaf-college/deptnums/index.ts index a38e4ec651..c7ff08026b 100644 --- a/modules/gob-school-st-olaf-college/deptnums/index.js +++ b/modules/gob-school-st-olaf-college/deptnums/index.ts @@ -1,5 +1,3 @@ -// @flow - export { buildDeptNum } from "./build-dept-num" export { deptNumRegex } from "./dept-num-regex" export { quacksLikeDeptNum } from "./quacks-like-dept-num" diff --git a/modules/gob-school-st-olaf-college/deptnums/quacks-like-dept-num.js b/modules/gob-school-st-olaf-college/deptnums/quacks-like-dept-num.ts similarity index 95% rename from modules/gob-school-st-olaf-college/deptnums/quacks-like-dept-num.js rename to modules/gob-school-st-olaf-college/deptnums/quacks-like-dept-num.ts index 4aee35198c..41abab31db 100644 --- a/modules/gob-school-st-olaf-college/deptnums/quacks-like-dept-num.js +++ b/modules/gob-school-st-olaf-college/deptnums/quacks-like-dept-num.ts @@ -1,5 +1,3 @@ -// @flow - import { deptNumRegex } from "./dept-num-regex" // Checks if a string looks like a deptnum. diff --git a/modules/gob-school-st-olaf-college/deptnums/split-dept-num.js b/modules/gob-school-st-olaf-college/deptnums/split-dept-num.ts similarity index 88% rename from modules/gob-school-st-olaf-college/deptnums/split-dept-num.js rename to modules/gob-school-st-olaf-college/deptnums/split-dept-num.ts index da65c2400d..e95a846a85 100644 --- a/modules/gob-school-st-olaf-college/deptnums/split-dept-num.js +++ b/modules/gob-school-st-olaf-college/deptnums/split-dept-num.ts @@ -1,11 +1,9 @@ -// @flow - import { deptNumRegex } from "./dept-num-regex" export type DeptNum = { - department: string, - number: number, - section?: string, + department: string + number: number + section?: string } /** @@ -18,8 +16,8 @@ export type DeptNum = { */ export function splitDeptNum( deptNumString: string, - includeSection?: boolean = false, -): ?DeptNum { + includeSection: boolean = false, +): DeptNum | null | undefined { // "AS/RE 230A" -> ["AS/RE 230A", "AS/RE", "AS", "RE", "230", "A"] // -> {department: 'AS/RE', number: 230} let matches = deptNumRegex.exec(deptNumString) diff --git a/modules/gob-school-st-olaf-college/index.js b/modules/gob-school-st-olaf-college/index.ts similarity index 94% rename from modules/gob-school-st-olaf-college/index.js rename to modules/gob-school-st-olaf-college/index.ts index dc069372f8..6c4b8488b9 100644 --- a/modules/gob-school-st-olaf-college/index.js +++ b/modules/gob-school-st-olaf-college/index.ts @@ -1,5 +1,3 @@ -// @flow - export { expandYear, semesterName, toPrettyTerm } from "./course-info" export { diff --git a/modules/gob-search-queries-cli/parse-query.js b/modules/gob-search-queries-cli/parse-query.ts similarity index 100% rename from modules/gob-search-queries-cli/parse-query.js rename to modules/gob-search-queries-cli/parse-query.ts diff --git a/modules/gob-search-queries/__tests__/__snapshots__/build-query-from-string.test.js.snap b/modules/gob-search-queries/__tests__/__snapshots__/build-query-from-string.test.ts.snap similarity index 100% rename from modules/gob-search-queries/__tests__/__snapshots__/build-query-from-string.test.js.snap rename to modules/gob-search-queries/__tests__/__snapshots__/build-query-from-string.test.ts.snap diff --git a/modules/gob-search-queries/__tests__/__snapshots__/query-courses.test.js.snap b/modules/gob-search-queries/__tests__/__snapshots__/query-courses.test.ts.snap similarity index 100% rename from modules/gob-search-queries/__tests__/__snapshots__/query-courses.test.js.snap rename to modules/gob-search-queries/__tests__/__snapshots__/query-courses.test.ts.snap diff --git a/modules/gob-search-queries/__tests__/build-query-from-string.test.js b/modules/gob-search-queries/__tests__/build-query-from-string.test.ts similarity index 100% rename from modules/gob-search-queries/__tests__/build-query-from-string.test.js rename to modules/gob-search-queries/__tests__/build-query-from-string.test.ts diff --git a/modules/gob-search-queries/__tests__/check-course-against-query.test.js b/modules/gob-search-queries/__tests__/check-course-against-query.test.ts similarity index 100% rename from modules/gob-search-queries/__tests__/check-course-against-query.test.js rename to modules/gob-search-queries/__tests__/check-course-against-query.test.ts diff --git a/modules/gob-search-queries/__tests__/query-courses.test.js b/modules/gob-search-queries/__tests__/query-courses.test.ts similarity index 100% rename from modules/gob-search-queries/__tests__/query-courses.test.js rename to modules/gob-search-queries/__tests__/query-courses.test.ts diff --git a/modules/gob-search-queries/build-query-from-string.js b/modules/gob-search-queries/build-query-from-string.ts similarity index 97% rename from modules/gob-search-queries/build-query-from-string.js rename to modules/gob-search-queries/build-query-from-string.ts index 739b010ef6..f5e477d461 100644 --- a/modules/gob-search-queries/build-query-from-string.js +++ b/modules/gob-search-queries/build-query-from-string.ts @@ -1,5 +1,3 @@ -// @flow - import flatten from "lodash/flatten" import mapValues from "lodash/mapValues" import toPairs from "lodash/toPairs" @@ -158,7 +156,7 @@ function organizeValues([key, values], words = false, profWords = false) { export function buildQueryFromString( queryString: string = "", - opts: { words?: boolean, profWords?: boolean } = {}, + opts: { words?: boolean; profWords?: boolean } = {}, ) { queryString = queryString.trim() if (queryString.endsWith(":")) { @@ -177,15 +175,11 @@ export function buildQueryFromString( // Split apart the string into an array let matches = queryString.split(rex) - ;(matches: Array) // Remove extra whitespace and remove empty strings let cleaned = matches.map((s) => s.trim()).filter((s) => s !== "") - // Grab the keys and values from the lists let [keys, values] = partitionByIndex(cleaned) - ;(keys: Array) - ;(values: Array) if (stringThing && quacksLikeDeptNum(stringThing)) { let deptnum = splitDeptNum(stringThing, true) diff --git a/modules/gob-search-queries/check-course-against-query.js b/modules/gob-search-queries/check-course-against-query.ts similarity index 93% rename from modules/gob-search-queries/check-course-against-query.js rename to modules/gob-search-queries/check-course-against-query.ts index e48fa60f30..303019d687 100644 --- a/modules/gob-search-queries/check-course-against-query.js +++ b/modules/gob-search-queries/check-course-against-query.ts @@ -1,5 +1,3 @@ -// @flow - import toPairs from "lodash/toPairs" import type { Course } from "@gob/types" @@ -24,9 +22,12 @@ const BOOLEANS: Set = new Set([ "$XOR", ]) -type Query = { [key: string]: mixed } +type Query = Record -function checkQueryBit(course: Course, [key: string, values: Array]) { +function checkQueryBit( + course: Course, + [key, values]: [string, unknown[]], +): boolean { if (!Object.prototype.hasOwnProperty.call(course, key)) { return false } @@ -86,7 +87,7 @@ function checkQueryBit(course: Course, [key: string, values: Array]) { case "$XOR": return internalMatches.filter(isTrue).length === 1 default: - ;(boolBit: empty) + boolBit as never return false } } diff --git a/modules/gob-search-queries/index.js b/modules/gob-search-queries/index.ts similarity index 96% rename from modules/gob-search-queries/index.js rename to modules/gob-search-queries/index.ts index f3e4510c6e..65d16b093b 100644 --- a/modules/gob-search-queries/index.js +++ b/modules/gob-search-queries/index.ts @@ -1,5 +1,3 @@ -// @flow - // can't use export * with babel: see https://github.com/babel/babel/issues/4446 export { buildQueryFromString } from "./build-query-from-string" export { checkCourseAgainstQuery } from "./check-course-against-query" diff --git a/modules/gob-search-queries/query-courses.js b/modules/gob-search-queries/query-courses.ts similarity index 82% rename from modules/gob-search-queries/query-courses.js rename to modules/gob-search-queries/query-courses.ts index 005d023f49..28a14613b5 100644 --- a/modules/gob-search-queries/query-courses.js +++ b/modules/gob-search-queries/query-courses.ts @@ -1,5 +1,3 @@ -// @flow - import filter from "lodash/filter" import { checkCourseAgainstQuery } from "./check-course-against-query" import type { Course } from "@gob/types" @@ -11,6 +9,9 @@ import type { Course } from "@gob/types" * @param {Array} courses - the courses to query * @returns {Array} - the courses that matched the query */ -export function queryCourses(queryObj: Object, courses: Array) { +export function queryCourses( + queryObj: Record, + courses: Array, +) { return filter(courses, (c) => checkCourseAgainstQuery(queryObj, c)) } diff --git a/modules/gob-treo-plugin-batch-get/index.js b/modules/gob-treo-plugin-batch-get/index.ts similarity index 100% rename from modules/gob-treo-plugin-batch-get/index.js rename to modules/gob-treo-plugin-batch-get/index.ts diff --git a/modules/gob-treo-plugin-query/index.js b/modules/gob-treo-plugin-query/index.ts similarity index 100% rename from modules/gob-treo-plugin-query/index.js rename to modules/gob-treo-plugin-query/index.ts diff --git a/modules/gob-types/course.js b/modules/gob-types/course.js deleted file mode 100644 index e729bdebb2..0000000000 --- a/modules/gob-types/course.js +++ /dev/null @@ -1,40 +0,0 @@ -// @flow - -export type Offering = {| - +day: string, - +location?: string, - +start: string, - +end: string, -|} - -export type Course = {| - +type: "course", - +clbid: string, - +credits: number, - +crsid: string, - +description: Array, - +department: string, - +enrolled: number, - +gereqs: Array, - +groupid: string, - +instructors: Array, - +lab?: boolean, - +level: number, - +max: number, - +name: string, - +notes?: string, - +number: number | string, - +pf: boolean, - +prerequisites: false | string, - +section: string, - +status: string, - +semester: number, - +title?: string, - +type: string, - +year: number, - +term?: number, - +offerings?: Array, - +revisions: Array<{| - +_updated: string, - |}>, -|} diff --git a/modules/gob-types/course.ts b/modules/gob-types/course.ts new file mode 100644 index 0000000000..e3f9ff3cfb --- /dev/null +++ b/modules/gob-types/course.ts @@ -0,0 +1,38 @@ +export type Offering = { + readonly day: string + readonly location?: string + readonly start: string + readonly end: string +} + +export type Course = { + readonly $type: "course" + readonly clbid: string + readonly credits: number + readonly crsid: string + readonly description: Array + readonly department: string + readonly enrolled: number + readonly gereqs: Array + readonly groupid: string + readonly instructors: Array + readonly lab?: boolean + readonly level: number + readonly max: number + readonly name: string + readonly notes?: string + readonly number: number | string + readonly pf: boolean + readonly prerequisites: false | string + readonly section: string + readonly status: string + readonly semester: number + readonly title?: string + readonly type: string + readonly year: number + readonly term?: number + readonly offerings?: Array + readonly revisions: Array<{ + readonly _updated: string + }> +} diff --git a/modules/gob-types/index.js b/modules/gob-types/index.js deleted file mode 100644 index 2c50f1d934..0000000000 --- a/modules/gob-types/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// @flow - -export { Course, Offering } from "./course" - -export type Result = - | { error: false, result: T, meta?: Object } - | { error: true, result: Error, meta?: Object } diff --git a/modules/gob-types/index.ts b/modules/gob-types/index.ts new file mode 100644 index 0000000000..1af5dbaea7 --- /dev/null +++ b/modules/gob-types/index.ts @@ -0,0 +1,5 @@ +export type { Course, Offering } from "./course" + +export type Result = + | { error: false; result: T; meta?: Record } + | { error: true; result: Error; meta?: Record } diff --git a/modules/gob-web-database/__mocks__/index.js b/modules/gob-web-database/__mocks__/index.ts similarity index 95% rename from modules/gob-web-database/__mocks__/index.js rename to modules/gob-web-database/__mocks__/index.ts index 3fbfcd6279..9308dab15c 100644 --- a/modules/gob-web-database/__mocks__/index.js +++ b/modules/gob-web-database/__mocks__/index.ts @@ -1,6 +1,4 @@ /* global jest */ -// @flow - import treo from "treo" // Use fake-indexeddb if real IndexedDB is not available (Node.js), but use real IndexedDB when possible (browser) @@ -11,7 +9,6 @@ if (typeof global.indexedDB === "undefined") { global.IDBObjectStore = require("fake-indexeddb/lib/FDBObjectStore") } -// $FlowExpectedError const { createDatabase } = jest.requireActual("../index") treo.Database.prototype.__clear = function clearDatabase() { diff --git a/modules/gob-web-database/index.js b/modules/gob-web-database/index.ts similarity index 89% rename from modules/gob-web-database/index.js rename to modules/gob-web-database/index.ts index 2825ac26e9..8b4dfdb370 100644 --- a/modules/gob-web-database/index.js +++ b/modules/gob-web-database/index.ts @@ -1,8 +1,5 @@ -// @flow - import treo, { Database } from "treo" -import Promise from "es6-promise" treo.Promise = Promise import queryTreoDatabase from "@gob/treo-plugin-query" diff --git a/modules/gob-web-database/schema.js b/modules/gob-web-database/schema.ts similarity index 100% rename from modules/gob-web-database/schema.js rename to modules/gob-web-database/schema.ts diff --git a/modules/gob-web/analytics.js b/modules/gob-web/analytics.ts similarity index 94% rename from modules/gob-web/analytics.js rename to modules/gob-web/analytics.ts index 048820b41f..0a52b78f83 100644 --- a/modules/gob-web/analytics.js +++ b/modules/gob-web/analytics.ts @@ -1,4 +1,3 @@ -// @flow import bugsnag from "bugsnag-js" const BUGSNAG_KEY = "7e393deddaeb885f5b140b4320ecef6b" @@ -18,7 +17,7 @@ export function isogram() { let script = document.createElement("script") script.async = true script.src = "//www.google-analytics.com/analytics.js" - ;(document: any).body.appendChild(script) + ;(document as any).body.appendChild(script) } export function ga(...args: any[]) { diff --git a/modules/gob-web/app.js b/modules/gob-web/app.tsx similarity index 99% rename from modules/gob-web/app.js rename to modules/gob-web/app.tsx index d256e574de..19cdd5b348 100644 --- a/modules/gob-web/app.js +++ b/modules/gob-web/app.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import { Router } from "@reach/router" import { Helmet, HelmetProvider } from "react-helmet-async" diff --git a/modules/gob-web/components/area-of-study/picker.js b/modules/gob-web/components/area-of-study/picker.tsx similarity index 87% rename from modules/gob-web/components/area-of-study/picker.js rename to modules/gob-web/components/area-of-study/picker.tsx index 67968ee7a1..fcdabb3e2f 100644 --- a/modules/gob-web/components/area-of-study/picker.js +++ b/modules/gob-web/components/area-of-study/picker.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import Select from "react-select" import uniqueId from "lodash/uniqueId" @@ -9,19 +7,19 @@ import type { ParsedHansonFile } from "@gob/hanson-format" import { filterAreaList } from "@gob/object-student" export type Selection = { - name: string, - type: string, - revision?: string, - label: string, - value: string, + name: string + type: string + revision?: string + label: string + value: string } type Props = { - selections: Array, - type: string, - label?: string, - onChange: (Array) => any, - availableThrough?: number, + selections: Array + type: string + label?: string + onChange: (arg0: Array) => any + availableThrough?: number } export function getOptions( diff --git a/modules/gob-web/components/area-of-study/provider.js b/modules/gob-web/components/area-of-study/provider.ts similarity index 71% rename from modules/gob-web/components/area-of-study/provider.js rename to modules/gob-web/components/area-of-study/provider.ts index 4bc8c1ee57..a46d1c588f 100644 --- a/modules/gob-web/components/area-of-study/provider.js +++ b/modules/gob-web/components/area-of-study/provider.ts @@ -1,20 +1,17 @@ -// @flow - import * as React from "react" - import { db } from "../../helpers/db" -import { type ParsedHansonFile } from "@gob/hanson-format" +import type { ParsedHansonFile } from "@gob/hanson-format" type Props = { - children: ({ - loading: boolean, - areas: Array, - }) => React.Node, + children: (data: { + loading: boolean + areas: Array + }) => React.ReactNode } type State = { - loading: boolean, - areas: Array, + loading: boolean + areas: Array } export class AreaOfStudyProvider extends React.PureComponent { diff --git a/modules/gob-web/components/avatar-letter.js b/modules/gob-web/components/avatar-letter.tsx similarity index 93% rename from modules/gob-web/components/avatar-letter.js rename to modules/gob-web/components/avatar-letter.tsx index 6897f5cb27..5a7f51e6fe 100644 --- a/modules/gob-web/components/avatar-letter.js +++ b/modules/gob-web/components/avatar-letter.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import isString from "lodash/isString" import styled, { css } from "styled-components" @@ -32,8 +31,8 @@ const Wrapper = styled.div` ` type Props = { - className?: string, - value: string, + className?: string + value: string } export const AvatarLetter = ({ className, value = "" }: Props) => ( diff --git a/modules/gob-web/components/button.js b/modules/gob-web/components/button.ts similarity index 99% rename from modules/gob-web/components/button.js rename to modules/gob-web/components/button.ts index 90a6707d4b..5eb9c42eba 100644 --- a/modules/gob-web/components/button.js +++ b/modules/gob-web/components/button.ts @@ -1,5 +1,3 @@ -// @flow - import styled from "styled-components" import * as theme from "../theme" diff --git a/modules/gob-web/components/card.js b/modules/gob-web/components/card.ts similarity index 95% rename from modules/gob-web/components/card.js rename to modules/gob-web/components/card.ts index b12ec9ffb5..cce78de7ae 100644 --- a/modules/gob-web/components/card.js +++ b/modules/gob-web/components/card.ts @@ -1,5 +1,3 @@ -// @flow - import styled from "styled-components" export const Card = styled.div` diff --git a/modules/gob-web/components/content-editable.js b/modules/gob-web/components/content-editable.tsx similarity index 85% rename from modules/gob-web/components/content-editable.js rename to modules/gob-web/components/content-editable.tsx index 60271b582d..bf44e5a38b 100644 --- a/modules/gob-web/components/content-editable.js +++ b/modules/gob-web/components/content-editable.tsx @@ -1,21 +1,20 @@ -// @flow import * as React from "react" import cx from "classnames" -type Props = {| - className?: string, - disabled?: boolean, - multiLine?: boolean, - onBlur?: (string) => any, - onChange: (string) => any, - onFocus?: (string) => any, - onKeyDown?: (string) => any, - placeholder?: string, - value?: string, -|} +type Props = { + className?: string + disabled?: boolean + multiLine?: boolean + onBlur?: (arg: string) => unknown + onChange: (arg: string) => unknown + onFocus?: (arg: string) => unknown + onKeyDown?: (arg: string) => unknown + placeholder?: string + value?: string +} type State = { - lastValue: ?string, + lastValue: string | null | undefined } // from http://stackoverflow.com/questions/22677931/react-js-onchange-event-for-contenteditable diff --git a/modules/gob-web/components/course-removal-box.js b/modules/gob-web/components/course-removal-box.tsx similarity index 92% rename from modules/gob-web/components/course-removal-box.js rename to modules/gob-web/components/course-removal-box.tsx index 3a5e5751d4..f850c8f81e 100644 --- a/modules/gob-web/components/course-removal-box.js +++ b/modules/gob-web/components/course-removal-box.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import { DropTarget } from "react-dnd" import { connect } from "react-redux" @@ -44,11 +42,11 @@ const Box = styled.div` ` type Props = { - canDrop: boolean, // react-dnd - connectDropTarget: (React.Element<*>) => any, // react-dnd - isOver: boolean, // react-dnd - changeStudent: ChangeStudentFunc, - student: Student, + canDrop: boolean // react-dnd + connectDropTarget: (arg0: React.ReactElement) => unknown // react-dnd + isOver: boolean // react-dnd + changeStudent: ChangeStudentFunc + student: Student } function CourseRemovalBox(props: Props) { diff --git a/modules/gob-web/components/icon.js b/modules/gob-web/components/icon.ts similarity index 98% rename from modules/gob-web/components/icon.js rename to modules/gob-web/components/icon.ts index b56d22e04a..8a333d4f66 100644 --- a/modules/gob-web/components/icon.js +++ b/modules/gob-web/components/icon.ts @@ -1,5 +1,3 @@ -// @flow - import styled, { css } from "styled-components" export const Icon = styled.svg.attrs({ diff --git a/modules/gob-web/components/list.js b/modules/gob-web/components/list.tsx similarity index 92% rename from modules/gob-web/components/list.js rename to modules/gob-web/components/list.tsx index f200216995..82020b0404 100644 --- a/modules/gob-web/components/list.js +++ b/modules/gob-web/components/list.tsx @@ -1,4 +1,3 @@ -// @flow import React, { Children as ReactChildren, isValidElement, @@ -41,9 +40,9 @@ export const InlineListItem = styled.li` ` type ListProps = { - children?: any, - className?: string, - type?: "inline" | "number" | "bullet" | "plain", + children?: any + className?: string + type?: "inline" | "number" | "bullet" | "plain" } export default function List(props: ListProps) { diff --git a/modules/gob-web/components/loading-comp.js b/modules/gob-web/components/loading-comp.tsx similarity index 89% rename from modules/gob-web/components/loading-comp.js rename to modules/gob-web/components/loading-comp.tsx index 3810bb9f8a..ce03c50b88 100644 --- a/modules/gob-web/components/loading-comp.js +++ b/modules/gob-web/components/loading-comp.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { Card } from "./card" import { RaisedButton } from "./button" @@ -12,10 +10,10 @@ let CenteredCard = styled(Card)` ` export function LoadingComponent(props: { - error: ?Error, - retry: () => any, - timedOut: boolean, - pastDelay: boolean, + error: Error | null | undefined + retry: () => any + timedOut: boolean + pastDelay: boolean }) { if (props.error) { return ( diff --git a/modules/gob-web/components/loading.js b/modules/gob-web/components/loading.tsx similarity index 94% rename from modules/gob-web/components/loading.js rename to modules/gob-web/components/loading.tsx index 992c41217d..fc8ab2c13d 100644 --- a/modules/gob-web/components/loading.js +++ b/modules/gob-web/components/loading.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import styled, { keyframes } from "styled-components" import cx from "classnames" @@ -72,10 +71,10 @@ const Message = styled.figcaption` ` type LoadingProps = { - children?: any, - error?: boolean, - info?: boolean, - warning?: boolean, + children?: any + error?: boolean + info?: boolean + warning?: boolean } export default function Loading({ diff --git a/modules/gob-web/components/modal.js b/modules/gob-web/components/modal.tsx similarity index 84% rename from modules/gob-web/components/modal.js rename to modules/gob-web/components/modal.tsx index 6002c14b3b..f14f25a126 100644 --- a/modules/gob-web/components/modal.js +++ b/modules/gob-web/components/modal.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import cx from "classnames" import ReactModal from "react-modal" @@ -10,10 +9,10 @@ if (!global.TESTING) { import "./modal.scss" type ModalProps = { - backdropClassName?: string, - children?: any, - className?: string, - onClose: () => any, + backdropClassName?: string + children?: any + className?: string + onClose: () => any } export default function Modal(props: ModalProps) { diff --git a/modules/gob-web/components/progress-bar.js b/modules/gob-web/components/progress-bar.tsx similarity index 93% rename from modules/gob-web/components/progress-bar.js rename to modules/gob-web/components/progress-bar.tsx index 8ad613bce9..05be71158e 100644 --- a/modules/gob-web/components/progress-bar.js +++ b/modules/gob-web/components/progress-bar.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import styled from "styled-components" import { findWordForProgress } from "@gob/lib" @@ -42,10 +41,10 @@ const BarFill = styled.div` ` type Props = { - className?: string, - colorful?: boolean, - max?: number, - value: number, + className?: string + colorful?: boolean + max?: number + value: number } export default function ProgressBar(props: Props) { diff --git a/modules/gob-web/components/separator.js b/modules/gob-web/components/separator.tsx similarity index 87% rename from modules/gob-web/components/separator.js rename to modules/gob-web/components/separator.tsx index 6fae75d16e..e1de0fc266 100644 --- a/modules/gob-web/components/separator.js +++ b/modules/gob-web/components/separator.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import styled from "styled-components" @@ -23,10 +22,10 @@ const FlexSpacerRule = styled(Rule)` ` type Props = { - className?: string, - flex?: number, - style?: Object, - type?: "spacer" | "line" | "flex-spacer", + className?: string + flex?: number + style?: Record + type?: "spacer" | "line" | "flex-spacer" } export default function Separator(props: Props) { diff --git a/modules/gob-web/components/sidebar--course-search.js b/modules/gob-web/components/sidebar--course-search.tsx similarity index 88% rename from modules/gob-web/components/sidebar--course-search.js rename to modules/gob-web/components/sidebar--course-search.tsx index f0bb2e37ef..085cca2fc1 100644 --- a/modules/gob-web/components/sidebar--course-search.js +++ b/modules/gob-web/components/sidebar--course-search.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { CourseSearcher } from "../modules/course-searcher" import CourseRemovalBox from "../components/course-removal-box" @@ -8,10 +6,10 @@ import { Student } from "@gob/object-student" import type { Undoable } from "../types" type Props = { - term: ?string, - navigate: (string) => mixed, - student: Undoable, - queryString?: string, + term: string | null | undefined + navigate: (arg0: string) => unknown + student: Undoable + queryString?: string } export function CourseSearcherSidebar(props: Props) { diff --git a/modules/gob-web/components/sidebar-toolbar.js b/modules/gob-web/components/sidebar-toolbar.tsx similarity index 94% rename from modules/gob-web/components/sidebar-toolbar.js rename to modules/gob-web/components/sidebar-toolbar.tsx index 04a75e688e..4174191c10 100644 --- a/modules/gob-web/components/sidebar-toolbar.js +++ b/modules/gob-web/components/sidebar-toolbar.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import { Link } from "@reach/router" import { connect } from "react-redux" @@ -22,13 +20,13 @@ import { Student } from "@gob/object-student" import type { Undoable } from "../types" type Props = { - redo: (string) => any, - student: Undoable, - undo: (string) => any, + redo: (arg0: string) => any + student: Undoable + undo: (arg0: string) => any - search?: boolean, - share?: boolean, - backTo?: "picker" | "overview", + search?: boolean + share?: boolean + backTo?: "picker" | "overview" } const ToolsCard = styled(Card)` diff --git a/modules/gob-web/components/sidebar.js b/modules/gob-web/components/sidebar.ts similarity index 97% rename from modules/gob-web/components/sidebar.js rename to modules/gob-web/components/sidebar.ts index 91b1fdd73c..afe39e1c61 100644 --- a/modules/gob-web/components/sidebar.js +++ b/modules/gob-web/components/sidebar.ts @@ -1,5 +1,3 @@ -// @flow - import styled from "styled-components" export const Sidebar = styled.aside` diff --git a/modules/gob-web/components/toolbar.js b/modules/gob-web/components/toolbar.ts similarity index 97% rename from modules/gob-web/components/toolbar.js rename to modules/gob-web/components/toolbar.ts index 0892495c67..2a8f6d703e 100644 --- a/modules/gob-web/components/toolbar.js +++ b/modules/gob-web/components/toolbar.ts @@ -1,5 +1,3 @@ -// @flow - import styled from "styled-components" import { FlatButton } from "./button" import { Icon } from "./icon" diff --git a/modules/gob-web/helpers/__tests__/find-first-available-semester.test.js b/modules/gob-web/helpers/__tests__/find-first-available-semester.test.ts similarity index 100% rename from modules/gob-web/helpers/__tests__/find-first-available-semester.test.js rename to modules/gob-web/helpers/__tests__/find-first-available-semester.test.ts diff --git a/modules/gob-web/helpers/__tests__/find-first-available-year.test.js b/modules/gob-web/helpers/__tests__/find-first-available-year.test.ts similarity index 100% rename from modules/gob-web/helpers/__tests__/find-first-available-year.test.js rename to modules/gob-web/helpers/__tests__/find-first-available-year.test.ts diff --git a/modules/gob-web/helpers/__tests__/load-student.test.js b/modules/gob-web/helpers/__tests__/load-student.test.ts similarity index 100% rename from modules/gob-web/helpers/__tests__/load-student.test.js rename to modules/gob-web/helpers/__tests__/load-student.test.ts diff --git a/modules/gob-web/helpers/__tests__/save-student.test.js b/modules/gob-web/helpers/__tests__/save-student.test.ts similarity index 100% rename from modules/gob-web/helpers/__tests__/save-student.test.js rename to modules/gob-web/helpers/__tests__/save-student.test.ts diff --git a/modules/gob-web/helpers/alter-course-for-evaluation.js b/modules/gob-web/helpers/alter-course-for-evaluation.ts similarity index 86% rename from modules/gob-web/helpers/alter-course-for-evaluation.js rename to modules/gob-web/helpers/alter-course-for-evaluation.ts index f5283d6894..a2acb083b7 100644 --- a/modules/gob-web/helpers/alter-course-for-evaluation.js +++ b/modules/gob-web/helpers/alter-course-for-evaluation.ts @@ -1,3 +1 @@ -// @flow - export { alterForEvaluation as alterCourse } from "@gob/courses" diff --git a/modules/gob-worker-load-data/source/db.js b/modules/gob-web/helpers/db.ts similarity index 89% rename from modules/gob-worker-load-data/source/db.js rename to modules/gob-web/helpers/db.ts index 3fd0604c29..c91fe5df85 100644 --- a/modules/gob-worker-load-data/source/db.js +++ b/modules/gob-web/helpers/db.ts @@ -1,5 +1,3 @@ -// @flow - import { createDatabase } from "@gob/web-database" export const db = createDatabase() diff --git a/modules/gob-web/helpers/find-first-available-semester.js b/modules/gob-web/helpers/find-first-available-semester.ts similarity index 99% rename from modules/gob-web/helpers/find-first-available-semester.js rename to modules/gob-web/helpers/find-first-available-semester.ts index c25d42fd68..c1a861e8af 100644 --- a/modules/gob-web/helpers/find-first-available-semester.js +++ b/modules/gob-web/helpers/find-first-available-semester.ts @@ -1,4 +1,3 @@ -// @flow import max from "lodash/max" import uniq from "lodash/uniq" import sortBy from "lodash/sortBy" diff --git a/modules/gob-web/helpers/find-first-available-year.js b/modules/gob-web/helpers/find-first-available-year.ts similarity index 99% rename from modules/gob-web/helpers/find-first-available-year.js rename to modules/gob-web/helpers/find-first-available-year.ts index 96810768b0..ff3e5c789d 100644 --- a/modules/gob-web/helpers/find-first-available-year.js +++ b/modules/gob-web/helpers/find-first-available-year.ts @@ -1,4 +1,3 @@ -// @flow import uniq from "lodash/uniq" import sortBy from "lodash/sortBy" import max from "lodash/max" diff --git a/modules/gob-web/helpers/fulfill-fulfillments.js b/modules/gob-web/helpers/fulfill-fulfillments.ts similarity index 100% rename from modules/gob-web/helpers/fulfill-fulfillments.js rename to modules/gob-web/helpers/fulfill-fulfillments.ts diff --git a/modules/gob-web/helpers/get-courses.js b/modules/gob-web/helpers/get-courses.ts similarity index 93% rename from modules/gob-web/helpers/get-courses.js rename to modules/gob-web/helpers/get-courses.ts index 379dfc58be..9357481f9a 100644 --- a/modules/gob-web/helpers/get-courses.js +++ b/modules/gob-web/helpers/get-courses.ts @@ -1,5 +1,3 @@ -// @flow - import { db } from "./db" import { status, json } from "@gob/lib" import type { Course as CourseType, Result } from "@gob/types" @@ -25,7 +23,7 @@ export function getCourseFromNetwork(clbid: string): Promise { return request.then((course) => { networkCache.delete(clbid) - return (course: any) + return course as any }) } @@ -54,8 +52,8 @@ export function getCourseFromDatabase(clbid: string): Promise { // Gets a course from the database. export async function getCourse( clbid: string, - term?: ?number, - fabrications?: ?(Array | List) = [], + term?: number | null | undefined, + fabrications: (Array | List) | null | undefined = [], ): Promise> { if (fabrications) { let fab = fabrications.find((c) => c.clbid === clbid) diff --git a/modules/gob-web/helpers/load-area.js b/modules/gob-web/helpers/load-area.ts similarity index 92% rename from modules/gob-web/helpers/load-area.js rename to modules/gob-web/helpers/load-area.ts index 45b18e9b7c..7cbd3c4545 100644 --- a/modules/gob-web/helpers/load-area.js +++ b/modules/gob-web/helpers/load-area.ts @@ -1,10 +1,8 @@ -// @flow - import { db } from "./db" import { enhanceHanson, type ParsedHansonFile } from "@gob/hanson-format" import some from "lodash/some" import maxBy from "lodash/maxBy" -import { type AreaQuery } from "@gob/object-student" +import type { AreaQuery } from "@gob/object-student" function resolveArea(areas, query) { if (areas.length === 1) { @@ -21,8 +19,8 @@ function resolveArea(areas, query) { } type ResultOrError = - | { error: true, message: string, data: T } - | { error: false, data: T } + | { error: true; message: string; data: T } + | { error: false; data: T } function loadAreaFromDatabase(areaQuery: AreaQuery) { const { name, type, revision } = areaQuery diff --git a/modules/gob-web/helpers/load-student.js b/modules/gob-web/helpers/load-student.ts similarity index 97% rename from modules/gob-web/helpers/load-student.js rename to modules/gob-web/helpers/load-student.ts index b4d16bb412..9f21f8bf41 100644 --- a/modules/gob-web/helpers/load-student.js +++ b/modules/gob-web/helpers/load-student.ts @@ -1,5 +1,3 @@ -// @flow - import { Student } from "@gob/object-student" export async function loadStudent(studentId: string) { diff --git a/modules/gob-web/helpers/query-course-database.js b/modules/gob-web/helpers/query-course-database.ts similarity index 91% rename from modules/gob-web/helpers/query-course-database.js rename to modules/gob-web/helpers/query-course-database.ts index 4d3b698550..ad2351479d 100644 --- a/modules/gob-web/helpers/query-course-database.js +++ b/modules/gob-web/helpers/query-course-database.ts @@ -1,5 +1,3 @@ -// @flow - import { db } from "./db" import { buildQueryFromString } from "@gob/search-queries" import compact from "lodash/compact" @@ -9,8 +7,8 @@ import { type Course } from "@gob/types" export function queryCourseDatabase( queryString: string, - baseQuery: Object = {}, -): Array { + baseQuery: Record = {}, +): Promise> { let queryObject = buildQueryFromString(queryString, { words: true, profWords: true, diff --git a/modules/gob-web/helpers/save-student.js b/modules/gob-web/helpers/save-student.ts similarity index 98% rename from modules/gob-web/helpers/save-student.js rename to modules/gob-web/helpers/save-student.ts index 7ae400c660..abf3bcf803 100644 --- a/modules/gob-web/helpers/save-student.js +++ b/modules/gob-web/helpers/save-student.ts @@ -1,5 +1,3 @@ -// @flow - import stringify from "stabilize" import { Student } from "@gob/object-student" diff --git a/modules/gob-web/icons/ionicons-all.js b/modules/gob-web/icons/ionicons-all.tsx similarity index 100% rename from modules/gob-web/icons/ionicons-all.js rename to modules/gob-web/icons/ionicons-all.tsx diff --git a/modules/gob-web/icons/ionicons.js b/modules/gob-web/icons/ionicons.tsx similarity index 100% rename from modules/gob-web/icons/ionicons.js rename to modules/gob-web/icons/ionicons.tsx diff --git a/modules/gob-web/index.js b/modules/gob-web/index.tsx similarity index 86% rename from modules/gob-web/index.js rename to modules/gob-web/index.tsx index 11fffa6f67..ea089a3906 100644 --- a/modules/gob-web/index.js +++ b/modules/gob-web/index.tsx @@ -1,5 +1,3 @@ -// @flow - import "typeface-fira-sans" import "./styles/normalize.scss" import "./styles/css-colors.scss" @@ -19,7 +17,7 @@ loadData().catch((err) => console.error(err)) // ... attach the db for debugging import { db } from "./helpers/db" -global._db = db +globalThis._db = db // Kick off the GUI console.log("3. 2.. 1... Blast off! 🚀") @@ -29,14 +27,15 @@ import App from "./app" // Create the redux store import configureStore from "./redux" import { Provider } from "react-redux" +import type { Store } from "redux" import Notifications from "./modules/notifications" const store = configureStore() // for debugging -global._dispatch = store.dispatch -global._store = store +globalThis._dispatch = store.dispatch +globalThis._store = store -let renderFunc = (chosenStore) => { +let renderFunc = (chosenStore: Store) => { let renderEl = document.getElementById("gobbldygook") if (!renderEl) { return diff --git a/modules/gob-web/modules/area-editor/controller.js b/modules/gob-web/modules/area-editor/controller.tsx similarity index 95% rename from modules/gob-web/modules/area-editor/controller.js rename to modules/gob-web/modules/area-editor/controller.tsx index d70f8eecc8..0be9d5dd24 100644 --- a/modules/gob-web/modules/area-editor/controller.js +++ b/modules/gob-web/modules/area-editor/controller.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import { Card } from "../../components/card" import styled from "styled-components" @@ -27,9 +25,9 @@ function read() { function replace(state) { const hash = LZString.compressToEncodedURIComponent(stabilize(state)) - const url = new URL((document.location: any)) + const url = new URL(document.location.href) url.hash = hash - window.history.replaceState(null, null, url) + window.history.replaceState(null, "", url) } class AreaTextEditor extends React.Component { @@ -90,7 +88,7 @@ class AreaInfoViewer extends React.Component { diff --git a/modules/gob-web/modules/area-editor/editor.js b/modules/gob-web/modules/area-editor/editor.tsx similarity index 94% rename from modules/gob-web/modules/area-editor/editor.js rename to modules/gob-web/modules/area-editor/editor.tsx index cdce91dadc..f06d64559a 100644 --- a/modules/gob-web/modules/area-editor/editor.js +++ b/modules/gob-web/modules/area-editor/editor.tsx @@ -1,11 +1,7 @@ -// @flow - import * as React from "react" import styled from "styled-components" import CodeMirror from "@uiw/react-codemirror" -// $FlowFixMe import { javascript } from "@codemirror/lang-javascript" -// $FlowFixMe import { oneDark } from "@codemirror/theme-one-dark" import { Card } from "../../components/card" diff --git a/modules/gob-web/modules/area-editor/index.js b/modules/gob-web/modules/area-editor/index.ts similarity index 84% rename from modules/gob-web/modules/area-editor/index.js rename to modules/gob-web/modules/area-editor/index.ts index 5c1bb9deeb..20840998dd 100644 --- a/modules/gob-web/modules/area-editor/index.js +++ b/modules/gob-web/modules/area-editor/index.ts @@ -1,3 +1 @@ -// @flow - export { Controller as AreaEditor } from "./controller" diff --git a/modules/gob-web/modules/area-of-study/area-of-study.js b/modules/gob-web/modules/area-of-study/area-of-study.tsx similarity index 79% rename from modules/gob-web/modules/area-of-study/area-of-study.js rename to modules/gob-web/modules/area-of-study/area-of-study.tsx index 07d80f0f83..3ff80644c6 100644 --- a/modules/gob-web/modules/area-of-study/area-of-study.js +++ b/modules/gob-web/modules/area-of-study/area-of-study.tsx @@ -1,28 +1,25 @@ -// @flow - import React from "react" import cx from "classnames" import { Icon } from "../../components/icon" import { TopLevelRequirement } from "./requirement" import ProgressBar from "../../components/progress-bar" import { chevronUp, chevronDown } from "../../icons/ionicons" -import { type EvaluationResult } from "@gob/examine-student" -import { type AreaQuery } from "@gob/object-student" - +import type { EvaluationResult } from "@gob/examine-student" +import type { AreaQuery } from "@gob/object-student" import "./area-of-study.scss" type Props = { - isOpen?: boolean, - style?: {}, + isOpen?: boolean + style?: {} - areaOfStudy: AreaQuery, - error?: ?string, - examining?: boolean, - results: ?EvaluationResult, - onToggleOpen?: (Event) => mixed, - onAddOverride?: (Array, Event) => mixed, - onRemoveOverride?: (Array, Event) => mixed, - onToggleOverride?: (Array, Event) => mixed, + areaOfStudy: AreaQuery + error?: string | null | undefined + examining?: boolean + results: EvaluationResult | null | undefined + onToggleOpen?: (arg0: Event) => unknown + onAddOverride?: (arg0: Array, arg1: Event) => unknown + onRemoveOverride?: (arg0: Array, arg1: Event) => unknown + onToggleOverride?: (arg0: Array, arg1: Event) => unknown } export class AreaOfStudy extends React.Component { @@ -90,7 +87,7 @@ export class AreaOfStudy extends React.Component { {isOpen ? { } } -const CatalogLink = ({ slug, name }: { slug: ?string, name: string }) => { +const CatalogLink = ({ + slug, + name, +}: { + slug: string | null | undefined + name: string +}) => { if (!slug) { return {name} } diff --git a/modules/gob-web/modules/area-of-study/connected.js b/modules/gob-web/modules/area-of-study/connected.tsx similarity index 94% rename from modules/gob-web/modules/area-of-study/connected.js rename to modules/gob-web/modules/area-of-study/connected.tsx index 19d807aa06..df8b3a3ac8 100644 --- a/modules/gob-web/modules/area-of-study/connected.js +++ b/modules/gob-web/modules/area-of-study/connected.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { connect } from "react-redux" import { Student, type AreaQuery } from "@gob/object-student" @@ -12,14 +10,14 @@ import { } from "../../redux/students/actions/change" type Props = { - areaOfStudy: AreaQuery, - student: Student, - changeStudent: ChangeStudentFunc, + areaOfStudy: AreaQuery + student: Student + changeStudent: ChangeStudentFunc } -type State = {| - isOpen: boolean, -|} +type State = { + isOpen: boolean +} class AreaOfStudyConnector extends React.Component { state = { diff --git a/modules/gob-web/modules/area-of-study/expression--course.js b/modules/gob-web/modules/area-of-study/expression--course.tsx similarity index 86% rename from modules/gob-web/modules/area-of-study/expression--course.js rename to modules/gob-web/modules/area-of-study/expression--course.tsx index c119f3e0c0..3119ec37ec 100644 --- a/modules/gob-web/modules/area-of-study/expression--course.js +++ b/modules/gob-web/modules/area-of-study/expression--course.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import cx from "classnames" import { semesterName } from "@gob/school-st-olaf-college" @@ -7,18 +5,18 @@ import { semesterName } from "@gob/school-st-olaf-college" import "./expression--course.scss" type Props = { - _result?: boolean, - _taken?: boolean, - department: string, - international?: boolean, - lab?: boolean, - level?: number, - number?: number, - section?: string, - semester?: number, - style?: Object, - type?: string, - year?: number, + _result?: boolean + _taken?: boolean + department: string + international?: boolean + lab?: boolean + level?: number + number?: number + section?: string + semester?: number + style?: Record + type?: string + year?: number } export default function CourseExpression(props: Props) { diff --git a/modules/gob-web/modules/area-of-study/expression--filter.js b/modules/gob-web/modules/area-of-study/expression--filter.tsx similarity index 92% rename from modules/gob-web/modules/area-of-study/expression--filter.js rename to modules/gob-web/modules/area-of-study/expression--filter.tsx index 763291f324..4a6318aeaf 100644 --- a/modules/gob-web/modules/area-of-study/expression--filter.js +++ b/modules/gob-web/modules/area-of-study/expression--filter.tsx @@ -1,12 +1,10 @@ -// @flow - import React from "react" import Expression, { makeWhereQualifier } from "./expression" import type { OfExpression, WhereExpression } from "@gob/examine-student" import type { Props } from "./expression" -function FilterOf({ expr, ctx }: { expr: OfExpression, ctx: mixed }) { +function FilterOf({ expr, ctx }: { expr: OfExpression; ctx: unknown }) { return (

Filter:

diff --git a/modules/gob-web/modules/area-of-study/expression.js b/modules/gob-web/modules/area-of-study/expression.tsx similarity index 96% rename from modules/gob-web/modules/area-of-study/expression.js rename to modules/gob-web/modules/area-of-study/expression.tsx index d478d98660..521258f79b 100644 --- a/modules/gob-web/modules/area-of-study/expression.js +++ b/modules/gob-web/modules/area-of-study/expression.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import cx from "classnames" import CourseExpression from "./expression--course" @@ -153,7 +151,12 @@ function makeWhereExpression({ expr }) { const description = `${counted} of ${needs} ${distinct}${word} from courses where ${qualifier}` let matches = expr._matches || [] - let contents: ?Array = matches.map((course: Course, i) => ( + + if (!matches || !matches.length) { + return { description, contents: null } + } + + let contents: Array = matches.map((course: Course, i) => ( )) - if (contents && !contents.length) { - contents = null - } - return { description, contents } } @@ -181,9 +180,9 @@ function makeOccurrenceExpression({ expr }) { export type Props = { // $FlowFixMe TODO rives - expr: any, - hideIndicator?: boolean, - ctx?: mixed, + expr: any + hideIndicator?: boolean + ctx?: unknown } export default function Expression(props: Props) { diff --git a/modules/gob-web/modules/area-of-study/index.js b/modules/gob-web/modules/area-of-study/index.ts similarity index 94% rename from modules/gob-web/modules/area-of-study/index.js rename to modules/gob-web/modules/area-of-study/index.ts index 0fc06e1309..09ed96a271 100644 --- a/modules/gob-web/modules/area-of-study/index.js +++ b/modules/gob-web/modules/area-of-study/index.ts @@ -1,5 +1,3 @@ -// @flow - export { AreaOfStudy as PlainAreaOfStudy } from "./area-of-study" export { AreaOfStudyProvider } from "./provider" export { ConnectedAreaOfStudy as AreaOfStudy } from "./connected" diff --git a/modules/gob-web/modules/area-of-study/provider.js b/modules/gob-web/modules/area-of-study/provider.ts similarity index 80% rename from modules/gob-web/modules/area-of-study/provider.js rename to modules/gob-web/modules/area-of-study/provider.ts index 9c3d376de8..f7acc23b25 100644 --- a/modules/gob-web/modules/area-of-study/provider.js +++ b/modules/gob-web/modules/area-of-study/provider.ts @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import { type EvaluationResult } from "@gob/examine-student" import { Student, type AreaQuery } from "@gob/object-student" @@ -7,21 +5,20 @@ import { checkStudentAgainstArea } from "../../workers/check-student" import { loadArea } from "../../helpers/load-area" type Props = { - areaOfStudy: AreaQuery, - student: Student, - children: ({ - examining: boolean, - results: ?EvaluationResult, - error: ?string, - }) => React.Node, + areaOfStudy: AreaQuery + student: Student + children: (data: { + examining: boolean + results: EvaluationResult | null | undefined + error: string | null | undefined + }) => React.ReactNode } -type State = {| - examining: boolean, - results: ?EvaluationResult, - error: ?string, -|} - +type State = { + examining: boolean + results: EvaluationResult | null | undefined + error: string | null | undefined +} export class AreaOfStudyProvider extends React.Component { state = { examining: false, diff --git a/modules/gob-web/modules/area-of-study/requirement.js b/modules/gob-web/modules/area-of-study/requirement.tsx similarity index 87% rename from modules/gob-web/modules/area-of-study/requirement.js rename to modules/gob-web/modules/area-of-study/requirement.tsx index 370bceb081..2c7efdac7c 100644 --- a/modules/gob-web/modules/area-of-study/requirement.js +++ b/modules/gob-web/modules/area-of-study/requirement.tsx @@ -1,4 +1,3 @@ -// @flow import React, { Component } from "react" import cx from "classnames" import { isRequirementName } from "@gob/examine-student" @@ -13,28 +12,28 @@ import ResultIndicator from "./result-indicator" import "./requirement.scss" type RequirementInfo = { - computed?: boolean, - description?: string, - filter?: Object, - message?: string, - result?: Object, - overridden?: boolean, - [key: string]: RequirementInfo, + computed?: boolean + description?: string + filter?: Record + message?: string + result?: Record + overridden?: boolean + [key: string]: RequirementInfo } type Props = { - onAddOverride: (string[], Event) => any, - onRemoveOverride: (string[], Event) => any, - onToggleOverride: (string[], Event) => any, - path: string[], - topLevel?: boolean, - info: ?RequirementInfo, - name?: string, + onAddOverride: (path: string[], event: Event) => any + onRemoveOverride: (path: string[], event: Event) => any + onToggleOverride: (path: string[], event: Event) => any + path: string[] + topLevel?: boolean + info: RequirementInfo | null | undefined + name?: string } type RequirementProps = Props & { - isOpen?: boolean, - onToggleOpen: () => any, + isOpen?: boolean + onToggleOpen: () => any } function Requirement(props: RequirementProps) { @@ -92,7 +91,7 @@ function Requirement(props: RequirementProps) { { @@ -164,7 +163,7 @@ export function TopLevelRequirement(props: Props) { ) => mixed, - value: string, - label: string, - options: Array<[string, string]>, + onChange: (ev: React.SyntheticEvent) => unknown + value: string + label: string + options: Array<[string, string]> }) { let { onChange, value, label, options } = props let id = `labelled-select-${uniqueId()}` diff --git a/modules/gob-web/modules/course-searcher/lib.js b/modules/gob-web/modules/course-searcher/lib.ts similarity index 91% rename from modules/gob-web/modules/course-searcher/lib.js rename to modules/gob-web/modules/course-searcher/lib.ts index c5d2b3d5de..3c9bd43f50 100644 --- a/modules/gob-web/modules/course-searcher/lib.js +++ b/modules/gob-web/modules/course-searcher/lib.ts @@ -1,5 +1,3 @@ -// @flow - import type { Course as CourseType } from "@gob/types" import { List, Set } from "immutable" import oxford from "listify" @@ -73,8 +71,7 @@ const GROUP_BY_TO_KEY = { year: YEAR, none: null, } - -const SORT_BY_TO_KEY: { [key: SORT_BY_KEY]: Array<(CourseType) => string> } = { +const SORT_BY_TO_KEY: Record string>> = { year: [YEAR, SEMESTER, DEPARTMENT, NUMBER, SECTION], title: [TITLE, DEPARTMENT, NUMBER, SECTION], department: [DEPARTMENT, NUMBER, SECTION], @@ -82,7 +79,7 @@ const SORT_BY_TO_KEY: { [key: SORT_BY_KEY]: Array<(CourseType) => string> } = { time: [TIME_OF_DAY, DEPARTMENT, NUMBER, SECTION], } -const GROUP_BY_TO_TITLE: { [key: GROUP_BY_KEY]: (string) => string } = { +const GROUP_BY_TO_TITLE: Record string> = { day: (days) => days, department: (depts) => depts, gened: (gereqs) => gereqs, @@ -98,15 +95,15 @@ const REVERSE_ORDER: Set = Set.of("year", "term", "semester") export function sortAndGroup( results: List, args: { - sorting: SORT_BY_KEY, - grouping: GROUP_BY_KEY, - filtering: string, - limiting: string, + sorting: SORT_BY_KEY + grouping: GROUP_BY_KEY + filtering: string + limiting: string }, ): { - results: List, - keys: Array, - years: Set, + results: List + keys: Array + years: Set } { let { sorting, grouping, filtering, limiting } = args console.time("query: grouping/sorting") diff --git a/modules/gob-web/modules/course-searcher/querent.js b/modules/gob-web/modules/course-searcher/querent.ts similarity index 80% rename from modules/gob-web/modules/course-searcher/querent.js rename to modules/gob-web/modules/course-searcher/querent.ts index 2158eef269..817c7da2a8 100644 --- a/modules/gob-web/modules/course-searcher/querent.js +++ b/modules/gob-web/modules/course-searcher/querent.ts @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import type { Course as CourseType } from "@gob/types" import { queryCourseDatabase } from "../../helpers/query-course-database" @@ -10,29 +8,29 @@ import { List, Set } from "immutable" import type { GROUP_BY_KEY, SORT_BY_KEY } from "./constants" type Props = { - query: string, - term?: ?number, - children: ({ - error: ?string, - inProgress: boolean, - didSearch: boolean, - results: List, - keys: Array, - years: Set, - }) => React.Node, - groupBy: GROUP_BY_KEY, - sortBy: SORT_BY_KEY, - limitTo: string, - filterBy: string, + query: string + term?: number | null | undefined + children: (arg0: { + error: string | null | undefined + inProgress: boolean + didSearch: boolean + results: List + keys: Array + years: Set + }) => React.ReactNode + groupBy: GROUP_BY_KEY + sortBy: SORT_BY_KEY + limitTo: string + filterBy: string } -type State = {| - error: ?string, - inProgress: boolean, - didSearch: boolean, - results: List, - grouped: List, -|} +type State = { + error: string | null | undefined + inProgress: boolean + didSearch: boolean + results: List + grouped: List +} const memSortAndGroup: typeof sortAndGroup = mem(sortAndGroup, { maxAge: 10000, @@ -69,7 +67,10 @@ export class Querent extends React.Component { this._isMounted = false } - submitQuery = async (query: string, { term }: { term: ?number }) => { + submitQuery = async ( + query: string, + { term }: { term: number | null | undefined }, + ) => { if (!query && term == null) { return } diff --git a/modules/gob-web/modules/course-searcher/results-list.js b/modules/gob-web/modules/course-searcher/results-list.tsx similarity index 93% rename from modules/gob-web/modules/course-searcher/results-list.js rename to modules/gob-web/modules/course-searcher/results-list.tsx index e70a59ad12..a06a6bdb74 100644 --- a/modules/gob-web/modules/course-searcher/results-list.js +++ b/modules/gob-web/modules/course-searcher/results-list.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import { VariableSizeList } from "react-window" import { List } from "immutable" @@ -13,9 +11,9 @@ import type { GROUP_BY_KEY } from "./constants" type Results = List type Props = { - groupedBy: GROUP_BY_KEY, - results: Results, - studentId?: string, + groupedBy: GROUP_BY_KEY + results: Results + studentId?: string } const TermList = styled(VariableSizeList)` @@ -103,7 +101,7 @@ export class CourseResultsList extends React.Component { return getRowHeight(item) } - renderHeader = (title: string, { style }: { style: Object }) => { + renderHeader = (title: string, { style }: { style: Record }) => { if (!title) { return null } @@ -115,7 +113,7 @@ export class CourseResultsList extends React.Component { ) } - renderRow = (args: { index: number, style: Object }) => { + renderRow = (args: { index: number; style: Record }) => { let { index, style } = args let item = this.props.results.get(index) diff --git a/modules/gob-web/modules/course-searcher/searcher.js b/modules/gob-web/modules/course-searcher/searcher.tsx similarity index 86% rename from modules/gob-web/modules/course-searcher/searcher.js rename to modules/gob-web/modules/course-searcher/searcher.tsx index a854d0f196..60ce637e8a 100644 --- a/modules/gob-web/modules/course-searcher/searcher.js +++ b/modules/gob-web/modules/course-searcher/searcher.tsx @@ -1,6 +1,4 @@ -// @flow import React from "react" - import { toPrettyTerm, expandYear } from "@gob/school-st-olaf-college" import { Card } from "../../components/card" import { LabelledSelect } from "./labelled-select" @@ -19,18 +17,18 @@ import { Querent } from "./querent" import "./searcher.scss" type Props = { - onCloseSearcher?: ?() => mixed, - term?: ?number, - studentId?: string, + onCloseSearcher?: (() => unknown) | null | undefined + term?: number | null | undefined + studentId?: string } type State = { - query: string, - groupBy: GROUP_BY_KEY, - sortBy: SORT_BY_KEY, - limitTo: string, - filterBy: string, - hasQueried: boolean, + query: string + groupBy: GROUP_BY_KEY + sortBy: SORT_BY_KEY + limitTo: string + filterBy: string + hasQueried: boolean } export class CourseSearcher extends React.Component { @@ -43,31 +41,31 @@ export class CourseSearcher extends React.Component { hasQueried: false, } - handleSortChange = (ev: SyntheticEvent) => { + handleSortChange = (ev: React.SyntheticEvent) => { let value: string = ev.currentTarget.value - this.setState(() => ({ sortBy: (value: any) })) + this.setState(() => ({ sortBy: value as any })) } - handleGroupByChange = (ev: SyntheticEvent) => { + handleGroupByChange = (ev: React.SyntheticEvent) => { let value: string = ev.currentTarget.value - this.setState(() => ({ groupBy: (value: any), filterBy: "" })) + this.setState(() => ({ groupBy: value as any, filterBy: "" })) } - handleFilterByChange = (ev: SyntheticEvent) => { + handleFilterByChange = (ev: React.SyntheticEvent) => { let value: string = ev.currentTarget.value - this.setState(() => ({ filterBy: (value: any) })) + this.setState(() => ({ filterBy: value as any })) } - handleLimitToChange = (ev: SyntheticEvent) => { + handleLimitToChange = (ev: React.SyntheticEvent) => { let value: string = ev.currentTarget.value - this.setState(() => ({ limitTo: (value: any) })) + this.setState(() => ({ limitTo: value as any })) } updateQuery = (query: string) => { this.setState(() => ({ query })) } - handleQueryChange = (ev: SyntheticKeyboardEvent) => { + handleQueryChange = (ev: React.KeyboardEvent) => { this.updateQuery(ev.currentTarget.value) } diff --git a/modules/gob-web/modules/course-table/course-list.js b/modules/gob-web/modules/course-table/course-list.tsx similarity index 88% rename from modules/gob-web/modules/course-table/course-list.js rename to modules/gob-web/modules/course-table/course-list.tsx index 8ad864f0ed..f0cf982258 100644 --- a/modules/gob-web/modules/course-table/course-list.js +++ b/modules/gob-web/modules/course-table/course-list.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import range from "lodash/range" import styled, { css } from "styled-components" @@ -7,7 +5,7 @@ import { DraggableCourse } from "../course" import { PlainList, ListItem } from "../../components/list" import MissingCourse from "./missing-course" import EmptyCourseSlot from "./empty-course-slot" -import { type WarningType } from "@gob/object-student" +import type { WarningType } from "@gob/object-student" import { Map, List as IList } from "immutable" import type { Course as CourseType, Result } from "@gob/types" @@ -42,12 +40,12 @@ const Empty = styled(EmptyCourseSlot)` ` type Props = { - courses: Array>, - usedSlots: number, - warnings: Map>, - maxSlots: number, - scheduleId: string, - studentId: string, + courses: Array> + usedSlots: number + warnings: Map> + maxSlots: number + scheduleId: string + studentId: string } export function CourseList(props: Props) { diff --git a/modules/gob-web/modules/course-table/course-table.js b/modules/gob-web/modules/course-table/course-table.tsx similarity index 96% rename from modules/gob-web/modules/course-table/course-table.js rename to modules/gob-web/modules/course-table/course-table.tsx index debd0e4932..8faee28f28 100644 --- a/modules/gob-web/modules/course-table/course-table.js +++ b/modules/gob-web/modules/course-table/course-table.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { connect } from "react-redux" import styled from "styled-components" @@ -40,9 +38,9 @@ const AddYearButton = styled(FlatButton)` ` type Props = { - className?: string, - student: Student, - changeStudent: ChangeStudentFunc, + className?: string + student: Student + changeStudent: ChangeStudentFunc } class CourseTable extends React.Component { @@ -103,5 +101,4 @@ class CourseTable extends React.Component { } const connected = connect(undefined, { changeStudent })(CourseTable) - export { connected as CourseTable } diff --git a/modules/gob-web/modules/course-table/empty-course-slot.js b/modules/gob-web/modules/course-table/empty-course-slot.tsx similarity index 97% rename from modules/gob-web/modules/course-table/empty-course-slot.js rename to modules/gob-web/modules/course-table/empty-course-slot.tsx index d1884e13c1..e2327219ac 100644 --- a/modules/gob-web/modules/course-table/empty-course-slot.js +++ b/modules/gob-web/modules/course-table/empty-course-slot.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import FakeCourse from "./fake-course" import styled from "styled-components" diff --git a/modules/gob-web/modules/course-table/fake-course.js b/modules/gob-web/modules/course-table/fake-course.tsx similarity index 84% rename from modules/gob-web/modules/course-table/fake-course.js rename to modules/gob-web/modules/course-table/fake-course.tsx index 3aa966dfac..ec786b8514 100644 --- a/modules/gob-web/modules/course-table/fake-course.js +++ b/modules/gob-web/modules/course-table/fake-course.tsx @@ -1,11 +1,10 @@ -// @flow import React from "react" import { Container, Title, SummaryRow } from "../course/compact" type PropTypes = { - className: string, - details?: string, - title: string, + className: string + details?: string + title: string } export default function FakeCourse(props: PropTypes) { diff --git a/modules/gob-web/modules/course-table/index.js b/modules/gob-web/modules/course-table/index.ts similarity index 84% rename from modules/gob-web/modules/course-table/index.js rename to modules/gob-web/modules/course-table/index.ts index 0fb202da8d..c3cdb7c401 100644 --- a/modules/gob-web/modules/course-table/index.js +++ b/modules/gob-web/modules/course-table/index.ts @@ -1,3 +1 @@ -// @flow - export { CourseTable as default } from "./course-table" diff --git a/modules/gob-web/modules/course-table/missing-course.js b/modules/gob-web/modules/course-table/missing-course.tsx similarity index 80% rename from modules/gob-web/modules/course-table/missing-course.js rename to modules/gob-web/modules/course-table/missing-course.tsx index 9eb451b1df..7429d5c545 100644 --- a/modules/gob-web/modules/course-table/missing-course.js +++ b/modules/gob-web/modules/course-table/missing-course.tsx @@ -1,12 +1,10 @@ -// @flow - import React from "react" import FakeCourse from "./fake-course" type Props = { - +className?: string, - +clbid: string, - +error: Error, + readonly className?: string + readonly clbid: string + readonly error: Error } export default function MissingCourse(props: Props) { diff --git a/modules/gob-web/modules/course-table/semester.js b/modules/gob-web/modules/course-table/semester.tsx similarity index 92% rename from modules/gob-web/modules/course-table/semester.js rename to modules/gob-web/modules/course-table/semester.tsx index 38b7a29752..8f263d2f95 100644 --- a/modules/gob-web/modules/course-table/semester.js +++ b/modules/gob-web/modules/course-table/semester.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import cx from "classnames" import { connect } from "react-redux" @@ -141,9 +139,9 @@ const TitleText = styled.h1` ` function discoverSemesterStatus(args: { - year: number, - semester: number, - now: Date, + year: number + semester: number + now: Date }): "past" | "in-progress" | "future" | "unknown" { let { year, now } = args if (year < now.getFullYear()) { @@ -159,31 +157,31 @@ function discoverSemesterStatus(args: { } type DnDProps = { - canDrop?: boolean, - connectDropTarget: Function, - isOver: boolean, + canDrop?: boolean + connectDropTarget: (...args: Array) => any + isOver: boolean } type ReduxProps = { - changeStudent: ChangeStudentFunc, + changeStudent: ChangeStudentFunc } type ReactProps = { - schedule: Schedule, - semester: number, - student: Student, - year: number, + schedule: Schedule + semester: number + student: Student + year: number } type Props = ReduxProps & DnDProps & ReactProps type State = { - loading: boolean, - checking: boolean, - courses: List>, - warnings: Map>, - hasConflict: boolean, - credits: number, + loading: boolean + checking: boolean + courses: List> + warnings: Map> + hasConflict: boolean + credits: number } class Semester extends React.Component { @@ -255,11 +253,10 @@ class Semester extends React.Component { const infoBar = [] if (courses.size) { - // prettier-ignore - infoBar.push(`${courses.size} ${courses.size === 1 ? 'course' : 'courses'}`) - - // prettier-ignore - infoBar.push(`${credits} ${credits === 1 ? 'credit' : 'credits'}`) + infoBar.push( + `${courses.size} ${courses.size === 1 ? "course" : "courses"}`, + ) + infoBar.push(`${credits} ${credits === 1 ? "credit" : "credits"}`) } if (loading) { diff --git a/modules/gob-web/modules/course-table/year.js b/modules/gob-web/modules/course-table/year.tsx similarity index 97% rename from modules/gob-web/modules/course-table/year.js rename to modules/gob-web/modules/course-table/year.tsx index c5477d81cb..a0cf23c695 100644 --- a/modules/gob-web/modules/course-table/year.js +++ b/modules/gob-web/modules/course-table/year.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { connect } from "react-redux" import { FlatButton } from "../../components/button" @@ -78,9 +76,9 @@ const canAddSemester = (nextAvailableSemester?: number) => { } type Props = { - student: Student, - year: number, - changeStudent: ChangeStudentFunc, + student: Student + year: number + changeStudent: ChangeStudentFunc } class Year extends React.Component { diff --git a/modules/gob-web/modules/course/compact.js b/modules/gob-web/modules/course/compact.tsx similarity index 93% rename from modules/gob-web/modules/course/compact.js rename to modules/gob-web/modules/course/compact.tsx index 011d25227d..5e53a2b382 100644 --- a/modules/gob-web/modules/course/compact.js +++ b/modules/gob-web/modules/course/compact.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import noop from "lodash/noop" import styled from "styled-components" @@ -59,12 +58,12 @@ const Type = styled.span`` const Prereqs = styled.span`` export type Props = { - className?: string, - conflicts?: ?List, - course: Course, - index?: number, - onClick?: (Event) => any, - style?: Object, + className?: string + conflicts?: List | null | undefined + course: Course + index?: number + onClick?: (event: Event) => any + style?: Record } export default class CompactCourse extends React.Component { diff --git a/modules/gob-web/modules/course/course-title.js b/modules/gob-web/modules/course/course-title.tsx similarity index 93% rename from modules/gob-web/modules/course/course-title.js rename to modules/gob-web/modules/course/course-title.tsx index 8da34b4f89..9bb0b9d4cf 100644 --- a/modules/gob-web/modules/course/course-title.js +++ b/modules/gob-web/modules/course/course-title.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import styled, { css } from "styled-components" @@ -27,10 +26,10 @@ const Subtitle = styled.h2` const independentRegex = /^I[RS]/ type CourseTitleProps = { - className?: string, - name: string, - title?: string, - type?: string, + className?: string + name: string + title?: string + type?: string } export default function CourseTitle({ diff --git a/modules/gob-web/modules/course/draggable.js b/modules/gob-web/modules/course/draggable.tsx similarity index 92% rename from modules/gob-web/modules/course/draggable.js rename to modules/gob-web/modules/course/draggable.tsx index 4bd3ea0e3a..a8d832e4ac 100644 --- a/modules/gob-web/modules/course/draggable.js +++ b/modules/gob-web/modules/course/draggable.tsx @@ -7,10 +7,10 @@ import { IDENT_COURSE } from "@gob/object-student" import CourseWithModal from "./with-modal" type Props = { - className?: string, - style?: any, - connectDragSource: () => any, // react-dnd - isDragging: boolean, // react-dnd + className?: string + style?: any + connectDragSource: () => any // react-dnd + isDragging: boolean // react-dnd } const Draggable = styled(CourseWithModal)` diff --git a/modules/gob-web/modules/course/expanded.js b/modules/gob-web/modules/course/expanded.tsx similarity index 97% rename from modules/gob-web/modules/course/expanded.js rename to modules/gob-web/modules/course/expanded.tsx index 3072e3b615..b0de9b78ae 100644 --- a/modules/gob-web/modules/course/expanded.js +++ b/modules/gob-web/modules/course/expanded.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import styled from "styled-components" import map from "lodash/map" @@ -58,9 +57,9 @@ const SummaryThing = styled.div` ` type Props = { - className?: string, - conflicts: ?List, - course: Course, + className?: string + conflicts: List | null | undefined + course: Course } export default class ExpandedCourse extends React.PureComponent { diff --git a/modules/gob-web/modules/course/index.js b/modules/gob-web/modules/course/index.ts similarity index 94% rename from modules/gob-web/modules/course/index.js rename to modules/gob-web/modules/course/index.ts index 43ec6d42a7..51d3cf0c09 100644 --- a/modules/gob-web/modules/course/index.js +++ b/modules/gob-web/modules/course/index.ts @@ -1,4 +1,3 @@ -// @flow export { default as DraggableCourse } from "./draggable" export { ModalCourse } from "./modal" export { default as CompactCourse } from "./compact" diff --git a/modules/gob-web/modules/course/modal.js b/modules/gob-web/modules/course/modal.tsx similarity index 92% rename from modules/gob-web/modules/course/modal.js rename to modules/gob-web/modules/course/modal.tsx index 6e689cad6d..332ea1f3dd 100644 --- a/modules/gob-web/modules/course/modal.js +++ b/modules/gob-web/modules/course/modal.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import styled from "styled-components" import Modal from "../../components/modal" @@ -59,13 +57,13 @@ const Course = styled(ExpandedCourse)` ` type Props = { - course: CourseType, - conflicts: ?List, - onClose: () => any, - scheduleId?: string, - studentId?: string, - student: ?Student, // redux - changeStudent: ChangeStudentFunc, // redux + course: CourseType + conflicts: List | null | undefined + onClose: () => any + scheduleId?: string + studentId?: string + student: Student | null | undefined // redux + changeStudent: ChangeStudentFunc // redux } class ModalCourse extends React.Component { diff --git a/modules/gob-web/modules/course/offerings.js b/modules/gob-web/modules/course/offerings.ts similarity index 99% rename from modules/gob-web/modules/course/offerings.js rename to modules/gob-web/modules/course/offerings.ts index 2072c30d96..8ec86398f2 100644 --- a/modules/gob-web/modules/course/offerings.js +++ b/modules/gob-web/modules/course/offerings.ts @@ -1,5 +1,3 @@ -// @flow - import { to12HourTime } from "@gob/lib" import { List, Map } from "immutable" import type { Offering } from "@gob/types" diff --git a/modules/gob-web/modules/course/revisions.js b/modules/gob-web/modules/course/revisions.tsx similarity index 96% rename from modules/gob-web/modules/course/revisions.js rename to modules/gob-web/modules/course/revisions.tsx index 4e68b0aab9..231ff274dc 100644 --- a/modules/gob-web/modules/course/revisions.js +++ b/modules/gob-web/modules/course/revisions.tsx @@ -1,5 +1,3 @@ -//@flow - import * as React from "react" import toPairs from "lodash/toPairs" import upperFirst from "lodash/upperFirst" @@ -12,7 +10,7 @@ import { chevronUp, chevronDown } from "../../icons/ionicons" import type { Course as CourseType, Offering } from "@gob/types" type Props = { - course: CourseType, + course: CourseType } const RevisionsTable = styled.table` @@ -126,7 +124,7 @@ export class Revisions extends React.Component { isOpen: false, } - handleToggle = (_e: SyntheticEvent) => { + handleToggle = (_e: React.SyntheticEvent) => { this.setState((prevState) => ({ isOpen: !prevState.isOpen, })) @@ -145,20 +143,21 @@ export class Revisions extends React.Component { return upperFirst(str) } - const formatValue = (value: mixed, key: string = "") => { + const formatValue = (value: unknown, key: string = "") => { if (value === undefined || value === null) { return "—" } + if (key === "offerings" && Array.isArray(value)) { - const arr: Array = (value: any) - const offerings: Array = ((arr.filter( + const arr: Array = value + const offerings: Array = arr.filter( (v) => v && typeof v === "object" && typeof v.day === "string" && typeof v.start === "string" && typeof v.end === "string", - ): any): Array) + ) as unknown as Array if (offerings.length > 0) { const consolidated = consolidateExpandedOfferings(offerings) return consolidated.join(", ") diff --git a/modules/gob-web/modules/course/semester-selector.js b/modules/gob-web/modules/course/semester-selector.tsx similarity index 95% rename from modules/gob-web/modules/course/semester-selector.js rename to modules/gob-web/modules/course/semester-selector.tsx index 4a11cc082e..55348a4ad1 100644 --- a/modules/gob-web/modules/course/semester-selector.js +++ b/modules/gob-web/modules/course/semester-selector.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { connect } from "react-redux" import { Map } from "immutable" @@ -26,10 +24,10 @@ function semesterList(student: Student): Map> { } type Props = { - clbid: string, - scheduleId?: string, - student: Student, - changeStudent: ChangeStudentFunc, + clbid: string + scheduleId?: string + student: Student + changeStudent: ChangeStudentFunc } const NO_SCHEDULE: "$none" = "$none" diff --git a/modules/gob-web/modules/course/warnings.js b/modules/gob-web/modules/course/warnings.tsx similarity index 98% rename from modules/gob-web/modules/course/warnings.js rename to modules/gob-web/modules/course/warnings.tsx index 6a76a8ccdc..5ef43fffaf 100644 --- a/modules/gob-web/modules/course/warnings.js +++ b/modules/gob-web/modules/course/warnings.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import styled from "styled-components" import { PlainList, ListItem } from "../../components/list" @@ -57,7 +55,7 @@ const icons = { } type Props = { - warnings: List, + warnings: List } export default class CourseWarnings extends React.Component { diff --git a/modules/gob-web/modules/course/with-modal.js b/modules/gob-web/modules/course/with-modal.tsx similarity index 94% rename from modules/gob-web/modules/course/with-modal.js rename to modules/gob-web/modules/course/with-modal.tsx index bb9a1dd6e3..98510550ef 100644 --- a/modules/gob-web/modules/course/with-modal.js +++ b/modules/gob-web/modules/course/with-modal.tsx @@ -1,16 +1,13 @@ -// @flow - import * as React from "react" import { ModalCourse } from "./modal" import CompactCourse, { type Props as MiniProps } from "./compact" type State = { - isOpen: boolean, + isOpen: boolean } - export default class CourseWithModal extends React.PureComponent< MiniProps & { studentId?: string }, - State, + State > { state = { isOpen: false, diff --git a/modules/gob-web/modules/notifications/index.js b/modules/gob-web/modules/notifications/index.ts similarity index 80% rename from modules/gob-web/modules/notifications/index.js rename to modules/gob-web/modules/notifications/index.ts index 980018f0c0..bf18ea6a9c 100644 --- a/modules/gob-web/modules/notifications/index.js +++ b/modules/gob-web/modules/notifications/index.ts @@ -1,3 +1 @@ -// @flow - export { default } from "./notifications" diff --git a/modules/gob-web/modules/notifications/notification.js b/modules/gob-web/modules/notifications/notification.tsx similarity index 97% rename from modules/gob-web/modules/notifications/notification.js rename to modules/gob-web/modules/notifications/notification.tsx index 3309cada8a..c37ec8b812 100644 --- a/modules/gob-web/modules/notifications/notification.js +++ b/modules/gob-web/modules/notifications/notification.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import round from "lodash/round" import { FlatButton } from "../../components/button" @@ -7,8 +6,8 @@ import styled from "styled-components" import { type Notification as NotificationType } from "./types" type Props = { - onClose: () => any, - notification: NotificationType, + onClose: () => any + notification: NotificationType } let ProgressContainer = styled.div` diff --git a/modules/gob-web/modules/notifications/notifications.js b/modules/gob-web/modules/notifications/notifications.tsx similarity index 90% rename from modules/gob-web/modules/notifications/notifications.js rename to modules/gob-web/modules/notifications/notifications.tsx index 99733a0307..a153dc9baf 100644 --- a/modules/gob-web/modules/notifications/notifications.js +++ b/modules/gob-web/modules/notifications/notifications.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import styled from "styled-components" import map from "lodash/map" @@ -19,8 +18,8 @@ const NotificationList = styled.ul` ` type Props = { - notifications: { [key: string]: Notif }, - removeNotification: (id: string) => any, + notifications: Record + removeNotification: (id: string) => any } export const Notifications = ({ notifications, removeNotification }: Props) => ( diff --git a/modules/gob-web/modules/notifications/redux/__tests__/actions.test.js b/modules/gob-web/modules/notifications/redux/__tests__/actions.test.ts similarity index 100% rename from modules/gob-web/modules/notifications/redux/__tests__/actions.test.js rename to modules/gob-web/modules/notifications/redux/__tests__/actions.test.ts diff --git a/modules/gob-web/modules/notifications/redux/__tests__/reducer.test.js b/modules/gob-web/modules/notifications/redux/__tests__/reducer.test.ts similarity index 100% rename from modules/gob-web/modules/notifications/redux/__tests__/reducer.test.js rename to modules/gob-web/modules/notifications/redux/__tests__/reducer.test.ts diff --git a/modules/gob-web/modules/notifications/redux/actions.js b/modules/gob-web/modules/notifications/redux/actions.ts similarity index 90% rename from modules/gob-web/modules/notifications/redux/actions.js rename to modules/gob-web/modules/notifications/redux/actions.ts index 364880774a..2a681ccf4d 100644 --- a/modules/gob-web/modules/notifications/redux/actions.js +++ b/modules/gob-web/modules/notifications/redux/actions.ts @@ -1,5 +1,3 @@ -// @flow - import delay from "delay" import { @@ -25,7 +23,7 @@ export function logMessage(id: string, message: string) { } export function logError( - { id, error }: { id: string, error: string }, + { id, error }: { id: string; error: string }, ...args: any[] ) { if (!global.TESTING) console.error(error, ...args) @@ -41,7 +39,7 @@ export function startProgress( value = 0, max = 1, showButton = false, - }: { value: number, max: number, showButton?: boolean } = {}, + }: { value: number; max: number; showButton?: boolean } = {}, ) { return { type: START_PROGRESS, diff --git a/modules/gob-web/modules/notifications/redux/constants.js b/modules/gob-web/modules/notifications/redux/constants.ts similarity index 97% rename from modules/gob-web/modules/notifications/redux/constants.js rename to modules/gob-web/modules/notifications/redux/constants.ts index 7cd7e7a306..0fee93b206 100644 --- a/modules/gob-web/modules/notifications/redux/constants.js +++ b/modules/gob-web/modules/notifications/redux/constants.ts @@ -1,5 +1,3 @@ -// @flow - export const REMOVE_NOTIFICATION = "gobbldygook/notifications/REMOVE_NOTIFICATION" export const LOG_MESSAGE = "gobbldygook/notifications/LOG_MESSAGE" diff --git a/modules/gob-web/modules/notifications/redux/reducers.js b/modules/gob-web/modules/notifications/redux/reducers.ts similarity index 100% rename from modules/gob-web/modules/notifications/redux/reducers.js rename to modules/gob-web/modules/notifications/redux/reducers.ts diff --git a/modules/gob-web/modules/notifications/types.js b/modules/gob-web/modules/notifications/types.js deleted file mode 100644 index 3f2714c9fb..0000000000 --- a/modules/gob-web/modules/notifications/types.js +++ /dev/null @@ -1,9 +0,0 @@ -// @flow - -export type Notification = { - hideButton?: boolean, - max: number, - message: string, - type: "progress", - value: number, -} diff --git a/modules/gob-web/modules/notifications/types.ts b/modules/gob-web/modules/notifications/types.ts new file mode 100644 index 0000000000..fb270e2d64 --- /dev/null +++ b/modules/gob-web/modules/notifications/types.ts @@ -0,0 +1,7 @@ +export type Notification = { + hideButton?: boolean + max: number + message: string + type: "progress" + value: number +} diff --git a/modules/gob-web/modules/semester-detail/index.js b/modules/gob-web/modules/semester-detail/index.ts similarity index 86% rename from modules/gob-web/modules/semester-detail/index.js rename to modules/gob-web/modules/semester-detail/index.ts index 1e9ed9343c..11b8f43a7a 100644 --- a/modules/gob-web/modules/semester-detail/index.js +++ b/modules/gob-web/modules/semester-detail/index.ts @@ -1,3 +1 @@ -// @flow - export { SemesterDetail as default } from "./semester-detail" diff --git a/modules/gob-web/modules/semester-detail/semester-detail.js b/modules/gob-web/modules/semester-detail/semester-detail.tsx similarity index 83% rename from modules/gob-web/modules/semester-detail/semester-detail.js rename to modules/gob-web/modules/semester-detail/semester-detail.tsx index 65d49012f9..6c1cd6c837 100644 --- a/modules/gob-web/modules/semester-detail/semester-detail.js +++ b/modules/gob-web/modules/semester-detail/semester-detail.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import { Helmet } from "react-helmet-async" import { semesterName } from "@gob/school-st-olaf-college" @@ -11,13 +10,13 @@ const DetailText = styled.pre` ` type RouterProps = { - term?: string, - uri?: string, // TODO: not actually optional + term?: string + uri?: string // TODO: not actually optional } type ReactProps = { - className?: string, - student: Student, + className?: string + student: Student } type Props = RouterProps & ReactProps @@ -34,8 +33,8 @@ export class SemesterDetail extends React.Component { return

Unknown term

} - let year = parseInt(term.substr(0, 4), 10) - let semester = parseInt(term.substr(4, 1), 10) + let year = parseInt(term.substring(0, 4), 10) + let semester = parseInt(term.substring(4, 5), 10) let schedules = student.findSchedulesForTerm({ year, semester }) diff --git a/modules/gob-web/modules/student-picker/index.js b/modules/gob-web/modules/student-picker/index.ts similarity index 84% rename from modules/gob-web/modules/student-picker/index.js rename to modules/gob-web/modules/student-picker/index.ts index f208875731..9fe37b00cb 100644 --- a/modules/gob-web/modules/student-picker/index.js +++ b/modules/gob-web/modules/student-picker/index.ts @@ -1,3 +1 @@ -// @flow - export { default } from "./student-picker-container" diff --git a/modules/gob-web/modules/student-picker/student-list-item.js b/modules/gob-web/modules/student-picker/student-list-item.tsx similarity index 96% rename from modules/gob-web/modules/student-picker/student-list-item.js rename to modules/gob-web/modules/student-picker/student-list-item.tsx index 052cd1c959..eb5b0c2e2e 100644 --- a/modules/gob-web/modules/student-picker/student-list-item.js +++ b/modules/gob-web/modules/student-picker/student-list-item.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { Link } from "@reach/router" import groupBy from "lodash/groupBy" @@ -104,10 +102,10 @@ const ListItemLink = styled(Link)` ` type Props = { - destroyStudent: (string) => any, - isEditing: boolean, - student: IndividualStudentState, - as?: string, + destroyStudent: (id: string) => any + isEditing: boolean + student: IndividualStudentState + as?: string } export default function StudentListItem(props: Props) { diff --git a/modules/gob-web/modules/student-picker/student-list.js b/modules/gob-web/modules/student-picker/student-list.tsx similarity index 89% rename from modules/gob-web/modules/student-picker/student-list.js rename to modules/gob-web/modules/student-picker/student-list.tsx index c502876c00..07abeaf321 100644 --- a/modules/gob-web/modules/student-picker/student-list.js +++ b/modules/gob-web/modules/student-picker/student-list.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import fuzzysearch from "fuzzysearch" import styled from "styled-components" @@ -18,12 +16,12 @@ const OuterCard = styled(Card)` ` type Props = { - destroyStudent: (string) => mixed, - filter?: string, - groupBy: string, - isEditing: boolean, - sortBy: SORT_BY_ENUM, - students: StudentState, + destroyStudent: (id: string) => unknown + filter?: string + groupBy: string + isEditing: boolean + sortBy: SORT_BY_ENUM + students: StudentState } export default function StudentList(props: Props) { @@ -49,7 +47,7 @@ export default function StudentList(props: Props) { case "dateLastModified": return s.present.dateLastModified default: - ;(sortByKey: empty) + sortByKey as never } }) .map((student, i) => ( diff --git a/modules/gob-web/modules/student-picker/student-picker-container.js b/modules/gob-web/modules/student-picker/student-picker-container.tsx similarity index 87% rename from modules/gob-web/modules/student-picker/student-picker-container.js rename to modules/gob-web/modules/student-picker/student-picker-container.tsx index 226bdb028c..b438321797 100644 --- a/modules/gob-web/modules/student-picker/student-picker-container.js +++ b/modules/gob-web/modules/student-picker/student-picker-container.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import StudentPicker from "./student-picker" import { connect } from "react-redux" @@ -9,16 +7,16 @@ import type { State as StudentState } from "../../redux/students/reducers" import { type SORT_BY_ENUM } from "./types" type Props = { - destroyStudent: (string) => mixed, - loadStudents: () => mixed, - students: StudentState, + destroyStudent: (id: string) => unknown + loadStudents: () => unknown + students: StudentState } type State = { - filterText: string, - isEditing: boolean, - sortBy: SORT_BY_ENUM, - groupBy: "nothing", + filterText: string + isEditing: boolean + sortBy: SORT_BY_ENUM + groupBy: "nothing" } class StudentPickerContainer extends React.Component { @@ -33,7 +31,7 @@ class StudentPickerContainer extends React.Component { this.props.loadStudents() } - onFilterChange = (ev: SyntheticInputEvent) => { + onFilterChange = (ev: React.SyntheticEvent) => { let searchText = ev.currentTarget.value || "" this.setState(() => ({ filterText: searchText.toLowerCase() })) } diff --git a/modules/gob-web/modules/student-picker/student-picker.js b/modules/gob-web/modules/student-picker/student-picker.tsx similarity index 91% rename from modules/gob-web/modules/student-picker/student-picker.js rename to modules/gob-web/modules/student-picker/student-picker.tsx index fe9145ee82..fe30c07a30 100644 --- a/modules/gob-web/modules/student-picker/student-picker.js +++ b/modules/gob-web/modules/student-picker/student-picker.tsx @@ -1,4 +1,3 @@ -// @flow import React from "react" import { Link } from "@reach/router" import * as theme from "../../theme" @@ -94,22 +93,22 @@ const FilterBox = styled.input` } ` -let sortByExpanded: { [key: SORT_BY_ENUM]: string } = { +let sortByExpanded: Record = { dateLastModified: "date last modified", name: "name", } type PropTypes = { - destroyStudent: (string) => mixed, - filterText: string, - groupBy: string, - isEditing: boolean, - onFilterChange: (SyntheticInputEvent) => mixed, - onGroupChange: () => mixed, - onSortChange: () => mixed, - onToggleEditing: () => mixed, - sortBy: SORT_BY_ENUM, - students: StudentState, + destroyStudent: (arg0: string) => unknown + filterText: string + groupBy: string + isEditing: boolean + onFilterChange: (arg0: React.SyntheticEvent) => unknown + onGroupChange: () => unknown + onSortChange: () => unknown + onToggleEditing: () => unknown + sortBy: SORT_BY_ENUM + students: StudentState } export default function StudentPicker(props: PropTypes) { diff --git a/modules/gob-web/modules/student-picker/types.js b/modules/gob-web/modules/student-picker/types.ts similarity index 84% rename from modules/gob-web/modules/student-picker/types.js rename to modules/gob-web/modules/student-picker/types.ts index 5609797efc..701d6d0a7e 100644 --- a/modules/gob-web/modules/student-picker/types.js +++ b/modules/gob-web/modules/student-picker/types.ts @@ -1,3 +1 @@ -// @flow - export type SORT_BY_ENUM = "dateLastModified" | "name" diff --git a/modules/gob-web/modules/student/__tests__/student-summary.test.js b/modules/gob-web/modules/student/__tests__/student-summary.test.tsx similarity index 99% rename from modules/gob-web/modules/student/__tests__/student-summary.test.js rename to modules/gob-web/modules/student/__tests__/student-summary.test.tsx index 319d0f8dec..c7ee931ed7 100644 --- a/modules/gob-web/modules/student/__tests__/student-summary.test.js +++ b/modules/gob-web/modules/student/__tests__/student-summary.test.tsx @@ -1,4 +1,3 @@ -// @flow import "jest-styled-components" import React from "react" import { render, screen } from "@testing-library/react" diff --git a/modules/gob-web/modules/student/area-of-study-group.js b/modules/gob-web/modules/student/area-of-study-group.tsx similarity index 92% rename from modules/gob-web/modules/student/area-of-study-group.js rename to modules/gob-web/modules/student/area-of-study-group.tsx index d2ab2543e4..d9ee3c07b3 100644 --- a/modules/gob-web/modules/student/area-of-study-group.js +++ b/modules/gob-web/modules/student/area-of-study-group.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { pluralizeArea } from "@gob/examine-student" import capitalize from "lodash/capitalize" @@ -20,13 +18,13 @@ import { import "./area-of-study-group.scss" type Props = { - areas?: List, - onEndAddArea: (string, Event) => any, - onInitiateAddArea: (string, Event) => any, - showAreaPicker: boolean, - student: Student, - type: string, - changeStudent: ChangeStudentFunc, + areas?: List + onEndAddArea: (arg0: string, arg1: Event) => any + onInitiateAddArea: (arg0: string, arg1: Event) => any + showAreaPicker: boolean + student: Student + type: string + changeStudent: ChangeStudentFunc } class AreaOfStudyGroup extends React.PureComponent { diff --git a/modules/gob-web/modules/student/area-of-study-sidebar.js b/modules/gob-web/modules/student/area-of-study-sidebar.tsx similarity index 97% rename from modules/gob-web/modules/student/area-of-study-sidebar.js rename to modules/gob-web/modules/student/area-of-study-sidebar.tsx index e8db2d3aa7..0e4091a1bd 100644 --- a/modules/gob-web/modules/student/area-of-study-sidebar.js +++ b/modules/gob-web/modules/student/area-of-study-sidebar.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { List, Map } from "immutable" import { AreaOfStudyGroup } from "./area-of-study-group" @@ -13,11 +11,11 @@ import { import "./area-of-study-sidebar.scss" type Props = { - student: Student, + student: Student } type State = { - showAreaPickerFor: Map, + showAreaPickerFor: Map } export class AreaOfStudySidebar extends React.PureComponent { diff --git a/modules/gob-web/modules/student/index.js b/modules/gob-web/modules/student/index.ts similarity index 78% rename from modules/gob-web/modules/student/index.js rename to modules/gob-web/modules/student/index.ts index 5343dc503e..4818865702 100644 --- a/modules/gob-web/modules/student/index.js +++ b/modules/gob-web/modules/student/index.ts @@ -1,3 +1 @@ -// @flow - export { default } from "./student" diff --git a/modules/gob-web/modules/student/student-summary.js b/modules/gob-web/modules/student/student-summary.tsx similarity index 90% rename from modules/gob-web/modules/student/student-summary.js rename to modules/gob-web/modules/student/student-summary.tsx index 230f688737..1f8b4869a2 100644 --- a/modules/gob-web/modules/student/student-summary.js +++ b/modules/gob-web/modules/student/student-summary.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import range from "lodash/range" import cx from "classnames" @@ -61,19 +59,19 @@ const welcomeMessages = [ const welcomeMessage = welcomeMessages[2] type Props = { - randomizeHello?: boolean, - showAvatar?: boolean, - showMessage?: boolean, - showEditor?: boolean, - student: Student, + randomizeHello?: boolean + showAvatar?: boolean + showMessage?: boolean + showEditor?: boolean + student: Student } type State = { - message: string, - canGraduate: boolean, - creditsNeeded: ?number, - creditsTaken: ?number, - checking: boolean, + message: string + canGraduate: boolean + creditsNeeded: number | null | undefined + creditsTaken: number | null | undefined + checking: boolean } class StudentSummary extends React.Component { @@ -211,14 +209,14 @@ class StudentSummary extends React.Component { export { StudentSummary } type EditorProps = { - student: Student, - changeStudent: ChangeStudentFunc, + student: Student + changeStudent: ChangeStudentFunc } type EditorState = { - name: string, - matriculation: string, - graduation: string, + name: string + matriculation: string + graduation: string } class Editor extends React.Component { @@ -232,22 +230,22 @@ class Editor extends React.Component { matriculationLabelId = `student-editor--${uniqueId()}` graduationLabelId = `student-editor--${uniqueId()}` - changeName = (event: SyntheticInputEvent) => { + changeName = (event: React.SyntheticEvent) => { let val = event.currentTarget.value this.setState(() => ({ name: val })) } - changeGraduation = (event: SyntheticInputEvent) => { + changeGraduation = (event: React.SyntheticEvent) => { let val = event.currentTarget.value this.setState(() => ({ graduation: val })) } - changeMatriculation = (event: SyntheticInputEvent) => { + changeMatriculation = (event: React.SyntheticEvent) => { let val = event.currentTarget.value this.setState(() => ({ matriculation: val })) } - onSubmit = (event: SyntheticInputEvent) => { + onSubmit = (event: React.SyntheticEvent) => { event.preventDefault() let { name, matriculation, graduation } = this.state @@ -318,11 +316,11 @@ class Editor extends React.Component { const ConnectedEditor = connect(undefined, { changeStudent })(Editor) type HeaderProps = { - canGraduate: boolean, - helloMessage: string, - name: string, - onChangeName?: (string) => any, - showAvatar: boolean, + canGraduate: boolean + helloMessage: string + name: string + onChangeName?: (val: string) => any + showAvatar: boolean } export class Header extends React.Component { @@ -344,7 +342,7 @@ export class Header extends React.Component { } type FooterProps = { - canGraduate: boolean, + canGraduate: boolean } const goodGraduationMessage = @@ -362,8 +360,8 @@ export class Footer extends React.Component { } type DateSummaryProps = { - matriculation: number, - graduation: number, + matriculation: number + graduation: number } export class DateSummary extends React.Component { @@ -380,14 +378,19 @@ export class DateSummary extends React.Component { } type DegreeSummaryProps = { - studies: List, + studies: List } export class DegreeSummary extends React.Component { render() { - const grouped: { - [key: string]: List<{ type: string, name: string, revision: string }>, - } = this.props.studies.groupBy((s) => s.type).toJSON() + const grouped: Record< + string, + List<{ + type: string + name: string + revision: string + }> + > = this.props.studies.groupBy((s) => s.type).toJSON() const { degree: dS = List(), @@ -437,8 +440,8 @@ export class DegreeSummary extends React.Component { } type CreditSummaryProps = { - currentCredits: ?number, - neededCredits: ?number, + currentCredits: number | null | undefined + neededCredits: number | null | undefined } export class CreditSummary extends React.Component { diff --git a/modules/gob-web/modules/student/student.js b/modules/gob-web/modules/student/student.tsx similarity index 88% rename from modules/gob-web/modules/student/student.js rename to modules/gob-web/modules/student/student.tsx index 389652046d..74c7ba6d13 100644 --- a/modules/gob-web/modules/student/student.js +++ b/modules/gob-web/modules/student/student.tsx @@ -1,4 +1,3 @@ -// @flow import * as React from "react" import { Helmet } from "react-helmet-async" import { connect } from "react-redux" @@ -34,10 +33,10 @@ const CouldNotLoadCard = styled(Card)` ` type Props = { - children: ({ student: Undoable }) => React.Node, // from react-router - loadStudent: (string) => mixed, // redux - studentId?: string, // react-router - student: ?IndividualStudentState, // redux + children: (args: { student: Undoable }) => React.ReactNode // from react-router + loadStudent: (data: string) => unknown // redux + studentId?: string // react-router + student: IndividualStudentState | null | undefined // redux } type State = {} diff --git a/modules/gob-web/redux/index-development.js b/modules/gob-web/redux/index-development.ts similarity index 86% rename from modules/gob-web/redux/index-development.js rename to modules/gob-web/redux/index-development.ts index 2333cb935a..0113dcd5e3 100644 --- a/modules/gob-web/redux/index-development.js +++ b/modules/gob-web/redux/index-development.ts @@ -1,5 +1,3 @@ -// @flow - import { applyMiddleware, createStore, compose } from "redux" import promiseMiddleware from "redux-promise" import thunkMiddleware from "redux-thunk" @@ -7,12 +5,7 @@ import saveStudentsMiddleware from "./middleware/save-student" import { createLogger as loggingMiddleware } from "redux-logger" import rootReducer from "./reducer" -// prettier-ignore -let middleware = [ - promiseMiddleware, - thunkMiddleware, - saveStudentsMiddleware, -] +let middleware = [promiseMiddleware, thunkMiddleware, saveStudentsMiddleware] if (!global.TESTING) { middleware.push(loggingMiddleware({ duration: true, collapsed: true })) diff --git a/modules/gob-web/redux/index-production.js b/modules/gob-web/redux/index-production.ts similarity index 82% rename from modules/gob-web/redux/index-production.js rename to modules/gob-web/redux/index-production.ts index a99eeb133d..6373b4eb5c 100644 --- a/modules/gob-web/redux/index-production.js +++ b/modules/gob-web/redux/index-production.ts @@ -1,17 +1,10 @@ -// @flow - import { applyMiddleware, createStore, compose } from "redux" import promiseMiddleware from "redux-promise" import thunkMiddleware from "redux-thunk" import saveStudentsMiddleware from "./middleware/save-student" import rootReducer from "./reducer" -// prettier-ignore -let middleware = [ - promiseMiddleware, - thunkMiddleware, - saveStudentsMiddleware, -] +let middleware = [promiseMiddleware, thunkMiddleware, saveStudentsMiddleware] const finalCreateStore = compose( applyMiddleware(...middleware), diff --git a/modules/gob-web/redux/index.js b/modules/gob-web/redux/index.ts similarity index 94% rename from modules/gob-web/redux/index.js rename to modules/gob-web/redux/index.ts index 285d8d32be..3b235bb29d 100644 --- a/modules/gob-web/redux/index.js +++ b/modules/gob-web/redux/index.ts @@ -1,5 +1,3 @@ -// @flow - if (process.env.NODE_ENV === "production") { module.exports = require("./index-production").default } else { diff --git a/modules/gob-web/redux/middleware/save-student.js b/modules/gob-web/redux/middleware/save-student.ts similarity index 100% rename from modules/gob-web/redux/middleware/save-student.js rename to modules/gob-web/redux/middleware/save-student.ts diff --git a/modules/gob-web/redux/reducer.js b/modules/gob-web/redux/reducer.ts similarity index 95% rename from modules/gob-web/redux/reducer.js rename to modules/gob-web/redux/reducer.ts index c8571848cf..a8f196ddb2 100644 --- a/modules/gob-web/redux/reducer.js +++ b/modules/gob-web/redux/reducer.ts @@ -1,5 +1,3 @@ -// @flow - import { combineReducers } from "redux" import notifications from "../modules/notifications/redux/reducers" diff --git a/modules/gob-web/redux/students/actions/__tests__/destroy.test.js b/modules/gob-web/redux/students/actions/__tests__/destroy.test.ts similarity index 100% rename from modules/gob-web/redux/students/actions/__tests__/destroy.test.js rename to modules/gob-web/redux/students/actions/__tests__/destroy.test.ts diff --git a/modules/gob-web/redux/students/actions/__tests__/import-student.test.js b/modules/gob-web/redux/students/actions/__tests__/import-student.test.ts similarity index 100% rename from modules/gob-web/redux/students/actions/__tests__/import-student.test.js rename to modules/gob-web/redux/students/actions/__tests__/import-student.test.ts diff --git a/modules/gob-web/redux/students/actions/__tests__/init-student.test.js b/modules/gob-web/redux/students/actions/__tests__/init-student.test.ts similarity index 100% rename from modules/gob-web/redux/students/actions/__tests__/init-student.test.js rename to modules/gob-web/redux/students/actions/__tests__/init-student.test.ts diff --git a/modules/gob-web/redux/students/actions/__tests__/undo.test.js b/modules/gob-web/redux/students/actions/__tests__/undo.test.ts similarity index 100% rename from modules/gob-web/redux/students/actions/__tests__/undo.test.js rename to modules/gob-web/redux/students/actions/__tests__/undo.test.ts diff --git a/modules/gob-web/redux/students/actions/change.js b/modules/gob-web/redux/students/actions/change.ts similarity index 74% rename from modules/gob-web/redux/students/actions/change.js rename to modules/gob-web/redux/students/actions/change.ts index 64407af478..79166b4f2d 100644 --- a/modules/gob-web/redux/students/actions/change.js +++ b/modules/gob-web/redux/students/actions/change.ts @@ -1,13 +1,11 @@ -// @flow - import { Student } from "@gob/object-student" export const CHANGE_STUDENT: "gobbldygook/students/CHANGE_STUDENT" = "gobbldygook/students/CHANGE_STUDENT" -type Action = { type: typeof CHANGE_STUDENT, payload: Student } +type Action = { type: typeof CHANGE_STUDENT; payload: Student } -export type ActionCreator = (Student) => Action +export type ActionCreator = (student: Student) => Action export const action: ActionCreator = (s: Student) => { return { type: CHANGE_STUDENT, payload: s } diff --git a/modules/gob-web/redux/students/actions/destroy-student.js b/modules/gob-web/redux/students/actions/destroy-student.ts similarity index 100% rename from modules/gob-web/redux/students/actions/destroy-student.js rename to modules/gob-web/redux/students/actions/destroy-student.ts diff --git a/modules/gob-web/redux/students/actions/import-student.js b/modules/gob-web/redux/students/actions/import-student.ts similarity index 100% rename from modules/gob-web/redux/students/actions/import-student.js rename to modules/gob-web/redux/students/actions/import-student.ts diff --git a/modules/gob-web/redux/students/actions/init-student.js b/modules/gob-web/redux/students/actions/init-student.ts similarity index 84% rename from modules/gob-web/redux/students/actions/init-student.js rename to modules/gob-web/redux/students/actions/init-student.ts index 9b5ba02b27..a90e06f6a2 100644 --- a/modules/gob-web/redux/students/actions/init-student.js +++ b/modules/gob-web/redux/students/actions/init-student.ts @@ -1,13 +1,11 @@ -// @flow - import { Range } from "immutable" import { Student, Schedule } from "@gob/object-student" import { INIT_STUDENT } from "../constants" import { saveStudent } from "../../../helpers/save-student" -type Action = { type: typeof INIT_STUDENT, payload: Student } +type Action = { type: typeof INIT_STUDENT; payload: Student } -export type ActionCreator = (any) => Action +export type ActionCreator = (data: any) => Action export const action: ActionCreator = (student: Student) => { if (student.schedules.size === 0) { diff --git a/modules/gob-web/redux/students/actions/load-student.js b/modules/gob-web/redux/students/actions/load-student.ts similarity index 79% rename from modules/gob-web/redux/students/actions/load-student.js rename to modules/gob-web/redux/students/actions/load-student.ts index ce04d1c8f5..030f9f1a4a 100644 --- a/modules/gob-web/redux/students/actions/load-student.js +++ b/modules/gob-web/redux/students/actions/load-student.ts @@ -2,6 +2,6 @@ import { loadStudent as load } from "../../../helpers/load-student" import { LOAD_STUDENT } from "../constants" -export function loadStudent(id) { +export function loadStudent(id: string) { return { type: LOAD_STUDENT, payload: load(id) } } diff --git a/modules/gob-web/redux/students/actions/load-students.js b/modules/gob-web/redux/students/actions/load-students.ts similarity index 76% rename from modules/gob-web/redux/students/actions/load-students.js rename to modules/gob-web/redux/students/actions/load-students.ts index 8361179b62..e0b5892f9d 100644 --- a/modules/gob-web/redux/students/actions/load-students.js +++ b/modules/gob-web/redux/students/actions/load-students.ts @@ -6,7 +6,9 @@ export function loadStudents() { return (dispatch) => { // Get the list of students we know about, or the string 'null', // if localStorage doesn't have the key 'studentIds'. - let studentIds = uniq(JSON.parse(localStorage.getItem("studentIds")) || []) + let studentIds = uniq( + JSON.parse(localStorage.getItem("studentIds") ?? "null") || [], + ) for (let id of studentIds) { dispatch(loadStudent(id)) diff --git a/modules/gob-web/redux/students/actions/undo.js b/modules/gob-web/redux/students/actions/undo.ts similarity index 96% rename from modules/gob-web/redux/students/actions/undo.js rename to modules/gob-web/redux/students/actions/undo.ts index 991ac5c3d2..613280f20c 100644 --- a/modules/gob-web/redux/students/actions/undo.js +++ b/modules/gob-web/redux/students/actions/undo.ts @@ -1,5 +1,3 @@ -// @flow - import { ActionTypes as UndoableActionTypes } from "redux-undo" export function undo(id: string) { diff --git a/modules/gob-web/redux/students/constants.js b/modules/gob-web/redux/students/constants.ts similarity index 98% rename from modules/gob-web/redux/students/constants.js rename to modules/gob-web/redux/students/constants.ts index 9d9fbf674c..dc7804fbd8 100644 --- a/modules/gob-web/redux/students/constants.js +++ b/modules/gob-web/redux/students/constants.ts @@ -1,5 +1,3 @@ -// @flow - export const LOAD_STUDENT: "gobbldygook/students/LOAD_STUDENT" = "gobbldygook/students/LOAD_STUDENT" diff --git a/modules/gob-web/redux/students/reducers/__tests__/students.test.js b/modules/gob-web/redux/students/reducers/__tests__/students.test.ts similarity index 100% rename from modules/gob-web/redux/students/reducers/__tests__/students.test.js rename to modules/gob-web/redux/students/reducers/__tests__/students.test.ts diff --git a/modules/gob-web/redux/students/reducers/index.js b/modules/gob-web/redux/students/reducers/index.ts similarity index 93% rename from modules/gob-web/redux/students/reducers/index.js rename to modules/gob-web/redux/students/reducers/index.ts index 27616e1b6f..f39ad4cded 100644 --- a/modules/gob-web/redux/students/reducers/index.js +++ b/modules/gob-web/redux/students/reducers/index.ts @@ -1,5 +1,3 @@ -// @flow - import omit from "lodash/omit" import { ActionTypes as UndoableActionTypes } from "redux-undo" import { CHANGE_STUDENT } from "../actions/change" @@ -17,11 +15,9 @@ export type { UndoableState as IndividualStudentState } from "./student" const initialState = {} -export type State = { - [key: string]: Undoable, -} +export type State = Record> -export function reducer(state: State = initialState, action: Action<*>) { +export function reducer(state: State = initialState, action: Action) { const { type, payload, error } = action switch (type) { diff --git a/modules/gob-web/redux/students/reducers/student.js b/modules/gob-web/redux/students/reducers/student.ts similarity index 90% rename from modules/gob-web/redux/students/reducers/student.js rename to modules/gob-web/redux/students/reducers/student.ts index 68f8f1ace3..bb87ebfd3d 100644 --- a/modules/gob-web/redux/students/reducers/student.js +++ b/modules/gob-web/redux/students/reducers/student.ts @@ -1,5 +1,3 @@ -// @flow - import undoable from "redux-undo" import { Student } from "@gob/object-student" import type { Undoable, Action } from "../../types" @@ -9,7 +7,10 @@ import { LOAD_STUDENT, INIT_STUDENT, IMPORT_STUDENT } from "../constants" export type UndoableState = Undoable const initialState: Student = new Student() -function reducer(state: ?Student = initialState, action: Action) { +function reducer( + state: Student | null | undefined = initialState, + action: Action, +) { switch (action.type) { case INIT_STUDENT: case IMPORT_STUDENT: diff --git a/modules/gob-web/redux/types.js b/modules/gob-web/redux/types.js deleted file mode 100644 index 543582ed10..0000000000 --- a/modules/gob-web/redux/types.js +++ /dev/null @@ -1,13 +0,0 @@ -// @flow - -export type Undoable = { - past: Array, - future: Array, - present: T, -} - -export type Action = { - type: string, - payload: T, - error?: boolean, -} diff --git a/modules/gob-web/redux/types.ts b/modules/gob-web/redux/types.ts new file mode 100644 index 0000000000..ee75361772 --- /dev/null +++ b/modules/gob-web/redux/types.ts @@ -0,0 +1,11 @@ +export type Undoable = { + past: Array + future: Array + present: T +} + +export type Action = { + type: string + payload: T + error?: boolean +} diff --git a/modules/gob-web/screens/area-editor/index.js b/modules/gob-web/screens/area-editor/index.tsx similarity index 99% rename from modules/gob-web/screens/area-editor/index.js rename to modules/gob-web/screens/area-editor/index.tsx index 99bb46ec38..14866e3d9d 100644 --- a/modules/gob-web/screens/area-editor/index.js +++ b/modules/gob-web/screens/area-editor/index.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import styled from "styled-components" import { Router, Link } from "@reach/router" diff --git a/modules/gob-web/screens/create/components.js b/modules/gob-web/screens/create/components.ts similarity index 97% rename from modules/gob-web/screens/create/components.js rename to modules/gob-web/screens/create/components.ts index 9ba3a9b3c8..60438edcf1 100644 --- a/modules/gob-web/screens/create/components.js +++ b/modules/gob-web/screens/create/components.ts @@ -1,5 +1,3 @@ -// @flow - import styled from "styled-components" export const Header = styled.header` diff --git a/modules/gob-web/screens/create/index.js b/modules/gob-web/screens/create/index.tsx similarity index 99% rename from modules/gob-web/screens/create/index.js rename to modules/gob-web/screens/create/index.tsx index f11700b850..184a0a4673 100644 --- a/modules/gob-web/screens/create/index.js +++ b/modules/gob-web/screens/create/index.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import Loadable from "react-loadable" import { LoadingComponent } from "../../components/loading-comp" diff --git a/modules/gob-web/screens/create/method-drive.js b/modules/gob-web/screens/create/method-drive.tsx similarity index 97% rename from modules/gob-web/screens/create/method-drive.js rename to modules/gob-web/screens/create/method-drive.tsx index 1e154469c6..d8734a7b31 100644 --- a/modules/gob-web/screens/create/method-drive.js +++ b/modules/gob-web/screens/create/method-drive.tsx @@ -1,5 +1,3 @@ -// @flow - import React, { Component } from "react" export default class DriveLinkScreen extends Component<{}> { diff --git a/modules/gob-web/screens/create/method-import.js b/modules/gob-web/screens/create/method-import.tsx similarity index 90% rename from modules/gob-web/screens/create/method-import.js rename to modules/gob-web/screens/create/method-import.tsx index 694762bfa9..3cb2394ffb 100644 --- a/modules/gob-web/screens/create/method-import.js +++ b/modules/gob-web/screens/create/method-import.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { serializeError } from "serialize-error" import { RaisedButton } from "../../components/button" @@ -22,18 +20,19 @@ import { Header } from "./components" import "./method-import.scss" type Props = { - +initStudent: InitStudentFunc, // redux - +navigate?: (string) => mixed, + readonly initStudent: InitStudentFunc + // redux + readonly navigate?: (arg0: string) => unknown } type State = { - status: "pending" | "processing" | "ready", - error: ?Error, - ids: Array, - selectedId: ?number, - student: ?Student, - rawStudentText: string, - parsedStudentText: ?PartialStudent, + status: "pending" | "processing" | "ready" + error: Error | null | undefined + ids: Array + selectedId: number | null | undefined + student: Student | null | undefined + rawStudentText: string + parsedStudentText: PartialStudent | null | undefined } class SISImportScreen extends React.Component { @@ -78,7 +77,7 @@ class SISImportScreen extends React.Component { this.props.navigate(`/student/${id}`) } - handleRawStudent = (ev: SyntheticInputEvent) => { + handleRawStudent = (ev: React.SyntheticEvent) => { ev.preventDefault() let data = ev.currentTarget.value @@ -195,8 +194,8 @@ const StudentInfo = ({ student }: { student: Student }) => ( ) const ScheduleListing = (props: { - schedules: Map, - fabrications: List, + schedules: Map + fabrications: List }) => { let { schedules = Map(), fabrications = List() } = props @@ -220,8 +219,8 @@ const ScheduleListing = (props: { } class AbbreviatedCourseListing extends React.Component< - { schedule: Schedule, fabrications: List }, - { courses: List> }, + { schedule: Schedule; fabrications: List }, + { courses: List> } > { state = { courses: List() } componentDidMount() { diff --git a/modules/gob-web/screens/create/method-manual.js b/modules/gob-web/screens/create/method-manual.tsx similarity index 92% rename from modules/gob-web/screens/create/method-manual.js rename to modules/gob-web/screens/create/method-manual.tsx index 5aca3d427e..a9b7a3e1ca 100644 --- a/modules/gob-web/screens/create/method-manual.js +++ b/modules/gob-web/screens/create/method-manual.tsx @@ -1,6 +1,4 @@ -// @flow - -import React from "react" +import React, { type SyntheticEvent } from "react" import { RaisedButton } from "../../components/button" import cx from "classnames" import { Set } from "immutable" @@ -22,22 +20,22 @@ import "./method-manual.scss" let now = new Date() type Props = { - +initStudent: InitStudentFunc, // redux - +navigate?: (string) => mixed, // react-router + readonly initStudent: InitStudentFunc // redux + readonly navigate?: (arg0: string) => unknown // react-router } type State = { - error: string, - name: string, - matriculation: number, - matriculationIsValid: boolean, - graduation: number, - graduationIsValid: boolean, - degrees: Array, - majors: Array, - concentrations: Array, - emphases: Array, - submitted: boolean, + error: string + name: string + matriculation: number + matriculationIsValid: boolean + graduation: number + graduationIsValid: boolean + degrees: Array + majors: Array + concentrations: Array + emphases: Array + submitted: boolean } class ManualCreationScreen extends React.Component { @@ -118,7 +116,7 @@ class ManualCreationScreen extends React.Component { studies, } - let student = new Student((rawStudent: any)) + let student = new Student(rawStudent as any) this.props.initStudent(student) if (!this.props.navigate) { diff --git a/modules/gob-web/screens/create/method-upload.js b/modules/gob-web/screens/create/method-upload.tsx similarity index 100% rename from modules/gob-web/screens/create/method-upload.js rename to modules/gob-web/screens/create/method-upload.tsx diff --git a/modules/gob-web/screens/create/methods.js b/modules/gob-web/screens/create/methods.ts similarity index 93% rename from modules/gob-web/screens/create/methods.js rename to modules/gob-web/screens/create/methods.ts index 1ddab6d32a..a22e503765 100644 --- a/modules/gob-web/screens/create/methods.js +++ b/modules/gob-web/screens/create/methods.ts @@ -1,5 +1,3 @@ -// @flow - export const SIS_METHOD = "sis" export const DRIVE_METHOD = "drive" export const FILE_METHOD = "file" diff --git a/modules/gob-web/screens/create/welcome.js b/modules/gob-web/screens/create/welcome.tsx similarity index 99% rename from modules/gob-web/screens/create/welcome.js rename to modules/gob-web/screens/create/welcome.tsx index 68ca501e14..c7f185f7a0 100644 --- a/modules/gob-web/screens/create/welcome.js +++ b/modules/gob-web/screens/create/welcome.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import { Link } from "@reach/router" import { RaisedButton } from "../../components/button" diff --git a/modules/gob-web/screens/degub.js b/modules/gob-web/screens/degub.tsx similarity index 100% rename from modules/gob-web/screens/degub.js rename to modules/gob-web/screens/degub.tsx diff --git a/modules/gob-web/screens/picker/index.js b/modules/gob-web/screens/picker/index.tsx similarity index 97% rename from modules/gob-web/screens/picker/index.js rename to modules/gob-web/screens/picker/index.tsx index 441a85b0a3..db8cf7d601 100644 --- a/modules/gob-web/screens/picker/index.js +++ b/modules/gob-web/screens/picker/index.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import Loadable from "react-loadable" import { LoadingComponent } from "../../components/loading-comp" diff --git a/modules/gob-web/screens/search/index.js b/modules/gob-web/screens/search/index.tsx similarity index 98% rename from modules/gob-web/screens/search/index.js rename to modules/gob-web/screens/search/index.tsx index 5350039d6d..eb06b49d04 100644 --- a/modules/gob-web/screens/search/index.js +++ b/modules/gob-web/screens/search/index.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import { Link } from "@reach/router" import { RaisedButton } from "../../components/button" diff --git a/modules/gob-web/screens/student/index.js b/modules/gob-web/screens/student/index.tsx similarity index 96% rename from modules/gob-web/screens/student/index.js rename to modules/gob-web/screens/student/index.tsx index bc26d448e2..377327b494 100644 --- a/modules/gob-web/screens/student/index.js +++ b/modules/gob-web/screens/student/index.tsx @@ -1,5 +1,3 @@ -// @flow - import * as React from "react" import { Router } from "@reach/router" import Loadable from "react-loadable" @@ -64,9 +62,9 @@ const TermSidebar = ({ student }: { student: Undoable }) => ( ) export default function StudentIndex(props: { - studentId?: string, - location?: { search: string }, - navigate?: (string) => mixed, + studentId?: string + location?: { search: string } + navigate?: (path: string) => void }) { let { location, studentId, navigate } = props diff --git a/modules/gob-web/screens/student/share-student.js b/modules/gob-web/screens/student/share-student.tsx similarity index 94% rename from modules/gob-web/screens/student/share-student.js rename to modules/gob-web/screens/student/share-student.tsx index 8a5032bada..73c74d4225 100644 --- a/modules/gob-web/screens/student/share-student.js +++ b/modules/gob-web/screens/student/share-student.tsx @@ -1,5 +1,3 @@ -// @flow - import React from "react" import styled from "styled-components" import { Card } from "../../components/card" @@ -11,14 +9,14 @@ import { close } from "../../icons/ionicons" import { Student } from "@gob/object-student" type Props = { - navigate: (string) => mixed, - student: Student, - queryString?: string, + navigate: (dest: string) => unknown + student: Student + queryString?: string } type State = { - encoded: ?string, - loading: boolean, + encoded: string | null | undefined + loading: boolean } const SizedCard = styled(Card)` diff --git a/modules/gob-web/theme/index.js b/modules/gob-web/theme/index.ts similarity index 85% rename from modules/gob-web/theme/index.js rename to modules/gob-web/theme/index.ts index 076f92ed73..c207b87e0c 100644 --- a/modules/gob-web/theme/index.js +++ b/modules/gob-web/theme/index.ts @@ -1,3 +1,2 @@ -// @flow export * from "@gob/colors" export * from "./mixins" diff --git a/modules/gob-web/theme/mixins.js b/modules/gob-web/theme/mixins.ts similarity index 99% rename from modules/gob-web/theme/mixins.js rename to modules/gob-web/theme/mixins.ts index cdfc82c6fa..1d7fdc522b 100644 --- a/modules/gob-web/theme/mixins.js +++ b/modules/gob-web/theme/mixins.ts @@ -1,5 +1,3 @@ -// @flow - import { css } from "styled-components" export const materialShadow = ` diff --git a/modules/gob-web/types.js b/modules/gob-web/types.ts similarity index 87% rename from modules/gob-web/types.js rename to modules/gob-web/types.ts index 862493ab73..f61197ec6b 100644 --- a/modules/gob-web/types.js +++ b/modules/gob-web/types.ts @@ -1,5 +1,3 @@ -// @flow - import type { Undoable } from "./redux/types" export type { Undoable } diff --git a/modules/gob-web/webpack.config.js b/modules/gob-web/webpack.config.js index 7302fdef04..f101399c7d 100644 --- a/modules/gob-web/webpack.config.js +++ b/modules/gob-web/webpack.config.js @@ -50,7 +50,7 @@ function config() { } const entry = { - [entryPointName]: ["./index.js"], + [entryPointName]: ["./index.tsx"], } if (isDevelopment) { @@ -153,7 +153,7 @@ function config() { const module = { rules: [ { - test: /\.js$/, + test: /\.(js|jsx|ts|tsx)$/, exclude: /node_modules/, use: [babelLoader], }, @@ -163,7 +163,7 @@ function config() { // use: ['worker-loader', babelLoader], // }, { - test: /check-student\.worker\.js$/, + test: /check-student\.worker\.(js|ts)$/, use: [ { loader: "worker-loader", @@ -173,7 +173,7 @@ function config() { ], }, { - test: /load-data\.worker\.js$/, + test: /load-data\.worker\.(js|ts)$/, use: [ { loader: "worker-loader", @@ -218,6 +218,9 @@ function config() { devServer, plugins, module, + resolve: { + extensions: [".js", ".jsx", ".ts", ".tsx", ".json"], + }, } } diff --git a/modules/gob-web/workers/check-student.js b/modules/gob-web/workers/check-student.ts similarity index 99% rename from modules/gob-web/workers/check-student.js rename to modules/gob-web/workers/check-student.ts index 8c37a725e8..cf56dff353 100644 --- a/modules/gob-web/workers/check-student.js +++ b/modules/gob-web/workers/check-student.ts @@ -1,5 +1,3 @@ -// @flow - import uniqueId from "lodash/uniqueId" import CheckStudentWorker from "./check-student.worker" import { type ParsedHansonFile } from "@gob/hanson-format" diff --git a/modules/gob-web/workers/check-student.worker.js b/modules/gob-web/workers/check-student.worker.ts similarity index 81% rename from modules/gob-web/workers/check-student.worker.js rename to modules/gob-web/workers/check-student.worker.ts index f973742b86..2ac16eb1e1 100644 --- a/modules/gob-web/workers/check-student.worker.js +++ b/modules/gob-web/workers/check-student.worker.ts @@ -1,14 +1,10 @@ -// @flow - import prettyMs from "pretty-ms" import present from "present" import { stringifyError } from "@gob/lib" import { checkAgainstArea } from "@gob/worker-check-student" import { IS_WORKER } from "./lib" -declare var self: DedicatedWorkerGlobalScope - -function main({ data }) { +function main({ data }: { data: string }) { const start = present() // why stringify? https://code.google.com/p/chromium/issues/detail?id=536620#c11 @@ -31,13 +27,12 @@ function main({ data }) { } if (IS_WORKER) { - // $FlowFixMe {data} is not in event… except that it is - self.addEventListener("message", main) + globalThis.addEventListener("message", main) } class PointlessExportForTestingAndFlow { - addEventListener(_1: string, _2: Function) {} - removeEventListener(_1: string, _2: Function) {} + addEventListener(_1: string, _2: (...args: Array) => any) {} + removeEventListener(_1: string, _2: (...args: Array) => any) {} postMessage(_: string) {} } diff --git a/modules/gob-web/workers/lib.js b/modules/gob-web/workers/lib.ts similarity index 93% rename from modules/gob-web/workers/lib.js rename to modules/gob-web/workers/lib.ts index 23c32ea745..097d616585 100644 --- a/modules/gob-web/workers/lib.js +++ b/modules/gob-web/workers/lib.ts @@ -1,5 +1,3 @@ -// @flow /* global WorkerGlobalScope */ - export const IS_WORKER = typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope diff --git a/modules/gob-web/workers/load-data.js b/modules/gob-web/workers/load-data.ts similarity index 85% rename from modules/gob-web/workers/load-data.js rename to modules/gob-web/workers/load-data.ts index 19de3169ff..13b9de0bf9 100644 --- a/modules/gob-web/workers/load-data.js +++ b/modules/gob-web/workers/load-data.ts @@ -1,5 +1,3 @@ -// @flow - import uniqueId from "lodash/uniqueId" import { status, text } from "@gob/lib" import * as notificationActions from "../modules/notifications/redux/actions" @@ -30,23 +28,23 @@ worker.addEventListener("message", ({ data }: { data: string }) => { let { type, message }: DispatchMessage = JSON.parse(data) if (type === "dispatch") { const action = actions[message.type][message.action](...message.args) - global._dispatch && global._dispatch(action) + globalThis._dispatch && globalThis._dispatch(action) } }) export type DispatchMessage = { - type: "dispatch", - message: { type: string, action: string, args: mixed }, + type: "dispatch" + message: { type: string; action: string; args: unknown } } export type LoadDataMessageEnum = - | { type: "load-from-info", path: string, url: string } + | { type: "load-from-info"; path: string; url: string } | { type: "check-idb-in-worker-support" } | { - type: "load-term-data", - term: number, - courseInfoUrl: string, - path: string, + type: "load-term-data" + term: number + courseInfoUrl: string + path: string } | DispatchMessage @@ -54,7 +52,7 @@ export type LoadDataMessage = { id: string } & LoadDataMessageEnum function messageWorker( params: LoadDataMessageEnum, -): Promise<{ type: string, [key: string]: mixed }> { +): Promise<{ type: string; [key: string]: unknown }> { let sourceId = uniqueId() return new Promise((resolve) => { @@ -94,7 +92,7 @@ export async function checkSupport(): Promise { return Boolean(supportState) } -export async function loadDataForTerm(term: number): Promise { +export async function loadDataForTerm(term: number): Promise { let nonce = Date.now() if (!navigator.onLine) { @@ -117,7 +115,7 @@ export default async function loadData() { if (navigator.onLine) { await Promise.all(infoFiles.map(loadDataFile)) } else { - if (!global._dispatch) { + if (!globalThis._dispatch) { return } @@ -125,6 +123,6 @@ export default async function loadData() { id: "offline", error: "You appear to be offline. No information was downloaded.", }) - global._dispatch(action) + globalThis._dispatch(action) } } diff --git a/modules/gob-web/workers/load-data.worker.js b/modules/gob-web/workers/load-data.worker.ts similarity index 73% rename from modules/gob-web/workers/load-data.worker.js rename to modules/gob-web/workers/load-data.worker.ts index 1bf9eabe62..15bc47af12 100644 --- a/modules/gob-web/workers/load-data.worker.js +++ b/modules/gob-web/workers/load-data.worker.ts @@ -1,18 +1,17 @@ -// @flow - import { loadFiles, loadTerm } from "@gob/worker-load-data" import { IS_WORKER } from "./lib" -declare var self: DedicatedWorkerGlobalScope - function checkIdbInWorkerSupport() { - if ((self: any).IDBCursor) { + if (globalThis.IDBCursor) { return true } return false } -function sendMessage(params: { id: string, [key: string]: mixed }) { +function sendMessage(params: { + id: string + [key: string]: unknown +}): Promise { let { id, type, ...args } = params let strMessage = JSON.stringify({ id, type, ...args }) self.postMessage(strMessage) @@ -41,7 +40,7 @@ async function main({ data }) { break } default: { - ;(message.type: empty) + message.type as never } } @@ -49,13 +48,12 @@ async function main({ data }) { } if (IS_WORKER) { - // $FlowFixMe {data} is not in event… except that it is - self.addEventListener("message", main) + globalThis.addEventListener("message", main) } class PointlessExportForTestingAndFlow { - addEventListener(_1: string, _2: Function) {} - removeEventListener(_1: string, _2: Function) {} + addEventListener(_1: string, _2: (...args: Array) => unknown) {} + removeEventListener(_1: string, _2: (...args: Array) => unknown) {} postMessage(_: string) {} } diff --git a/modules/gob-worker-check-student/index.js b/modules/gob-worker-check-student/index.ts similarity index 81% rename from modules/gob-worker-check-student/index.js rename to modules/gob-worker-check-student/index.ts index 12bf9c23fd..3afb495135 100644 --- a/modules/gob-worker-check-student/index.js +++ b/modules/gob-worker-check-student/index.ts @@ -1,3 +1 @@ -// @flow - export { checkAgainstArea } from "./source" diff --git a/modules/gob-worker-check-student/source.js b/modules/gob-worker-check-student/source.ts similarity index 88% rename from modules/gob-worker-check-student/source.js rename to modules/gob-worker-check-student/source.ts index 953918dc39..9a6176ff30 100644 --- a/modules/gob-worker-check-student/source.js +++ b/modules/gob-worker-check-student/source.ts @@ -1,5 +1,3 @@ -// @flow - import { evaluate, type EvaluationResult } from "@gob/examine-student" import { type ParsedHansonFile } from "@gob/hanson-format" import { alterForEvaluation as alterCourse } from "@gob/courses" @@ -27,11 +25,11 @@ function tryEvaluate({ export function checkAgainstArea( area: ParsedHansonFile, args: { - courses: Array, + courses: Array // TODO: make this not be `any` - fulfillments: { [key: string]: any }, + fulfillments: Record // TODO: make this not be `any` - overrides: { [key: string]: any }, + overrides: Record }, ): EvaluationResult { let { courses, fulfillments, overrides } = args diff --git a/modules/gob-worker-load-data/index.js b/modules/gob-worker-load-data/index.ts similarity index 87% rename from modules/gob-worker-load-data/index.js rename to modules/gob-worker-load-data/index.ts index 10de3d0a64..cf032139c0 100644 --- a/modules/gob-worker-load-data/index.js +++ b/modules/gob-worker-load-data/index.ts @@ -1,3 +1 @@ -// @flow - export { default as loadFiles, loadTerm } from "./source/load-files" diff --git a/modules/gob-worker-load-data/source/__tests__/__snapshots__/cache-item-hash.test.js.snap b/modules/gob-worker-load-data/source/__tests__/__snapshots__/cache-item-hash.test.ts.snap similarity index 100% rename from modules/gob-worker-load-data/source/__tests__/__snapshots__/cache-item-hash.test.js.snap rename to modules/gob-worker-load-data/source/__tests__/__snapshots__/cache-item-hash.test.ts.snap diff --git a/modules/gob-worker-load-data/source/__tests__/__snapshots__/parse-data.test.js.snap b/modules/gob-worker-load-data/source/__tests__/__snapshots__/parse-data.test.ts.snap similarity index 100% rename from modules/gob-worker-load-data/source/__tests__/__snapshots__/parse-data.test.js.snap rename to modules/gob-worker-load-data/source/__tests__/__snapshots__/parse-data.test.ts.snap diff --git a/modules/gob-worker-load-data/source/__tests__/area.support.js b/modules/gob-worker-load-data/source/__tests__/area.support.ts similarity index 100% rename from modules/gob-worker-load-data/source/__tests__/area.support.js rename to modules/gob-worker-load-data/source/__tests__/area.support.ts diff --git a/modules/gob-worker-load-data/source/__tests__/cache-item-hash.test.js b/modules/gob-worker-load-data/source/__tests__/cache-item-hash.test.ts similarity index 98% rename from modules/gob-worker-load-data/source/__tests__/cache-item-hash.test.js rename to modules/gob-worker-load-data/source/__tests__/cache-item-hash.test.ts index 76f5f1a789..0b57c94cd2 100644 --- a/modules/gob-worker-load-data/source/__tests__/cache-item-hash.test.js +++ b/modules/gob-worker-load-data/source/__tests__/cache-item-hash.test.ts @@ -1,6 +1,4 @@ /* eslint-env jest */ -// @flow - jest.spyOn(global.console, "log").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "error").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "warn").mockImplementation(() => jest.fn()) diff --git a/modules/gob-worker-load-data/source/__tests__/clean-prior-data.test.js b/modules/gob-worker-load-data/source/__tests__/clean-prior-data.test.ts similarity index 99% rename from modules/gob-worker-load-data/source/__tests__/clean-prior-data.test.js rename to modules/gob-worker-load-data/source/__tests__/clean-prior-data.test.ts index f7bb787bf1..f924028ffd 100644 --- a/modules/gob-worker-load-data/source/__tests__/clean-prior-data.test.js +++ b/modules/gob-worker-load-data/source/__tests__/clean-prior-data.test.ts @@ -1,6 +1,4 @@ /* eslint-env jest */ -// @flow - jest.spyOn(global.console, "log").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "error").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "warn").mockImplementation(() => jest.fn()) diff --git a/modules/gob-worker-load-data/source/__tests__/course.support.js b/modules/gob-worker-load-data/source/__tests__/course.support.ts similarity index 100% rename from modules/gob-worker-load-data/source/__tests__/course.support.js rename to modules/gob-worker-load-data/source/__tests__/course.support.ts diff --git a/modules/gob-worker-load-data/source/__tests__/get-cache-store-name.test.js b/modules/gob-worker-load-data/source/__tests__/get-cache-store-name.test.ts similarity index 94% rename from modules/gob-worker-load-data/source/__tests__/get-cache-store-name.test.js rename to modules/gob-worker-load-data/source/__tests__/get-cache-store-name.test.ts index db27a5f057..08605d45a1 100644 --- a/modules/gob-worker-load-data/source/__tests__/get-cache-store-name.test.js +++ b/modules/gob-worker-load-data/source/__tests__/get-cache-store-name.test.ts @@ -1,6 +1,4 @@ /* eslint-env jest */ -// @flow - jest.spyOn(global.console, "log").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "error").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "warn").mockImplementation(() => jest.fn()) @@ -21,7 +19,7 @@ test("getCacheStoreName runs", () => { test("getCacheStoreName throws an error on unexpected values", () => { expect(() => - // $FlowExpectedError + // @ts-expect-error Testing invalid input getCacheStoreName("invalid"), ).toThrowErrorMatchingInlineSnapshot(`""invalid" is not a valid store type"`) }) diff --git a/modules/gob-worker-load-data/source/__tests__/load-files.test.js b/modules/gob-worker-load-data/source/__tests__/load-files.test.ts similarity index 100% rename from modules/gob-worker-load-data/source/__tests__/load-files.test.js rename to modules/gob-worker-load-data/source/__tests__/load-files.test.ts diff --git a/modules/gob-worker-load-data/source/__tests__/needs-update.test.js b/modules/gob-worker-load-data/source/__tests__/needs-update.test.ts similarity index 99% rename from modules/gob-worker-load-data/source/__tests__/needs-update.test.js rename to modules/gob-worker-load-data/source/__tests__/needs-update.test.ts index 6eedd8eba7..c506720ce2 100644 --- a/modules/gob-worker-load-data/source/__tests__/needs-update.test.js +++ b/modules/gob-worker-load-data/source/__tests__/needs-update.test.ts @@ -1,5 +1,4 @@ /* eslint-env jest */ -// @flow jest.spyOn(global.console, "log").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "error").mockImplementation(() => jest.fn()) diff --git a/modules/gob-worker-load-data/source/__tests__/parse-data.test.js b/modules/gob-worker-load-data/source/__tests__/parse-data.test.ts similarity index 98% rename from modules/gob-worker-load-data/source/__tests__/parse-data.test.js rename to modules/gob-worker-load-data/source/__tests__/parse-data.test.ts index cad2a84f54..5fd4e9ff0c 100644 --- a/modules/gob-worker-load-data/source/__tests__/parse-data.test.js +++ b/modules/gob-worker-load-data/source/__tests__/parse-data.test.ts @@ -1,6 +1,4 @@ /* eslint-env jest */ -// @flow - jest.spyOn(global.console, "log").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "error").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "warn").mockImplementation(() => jest.fn()) diff --git a/modules/gob-worker-load-data/source/__tests__/remove-duplicate-areas.test.js b/modules/gob-worker-load-data/source/__tests__/remove-duplicate-areas.test.ts similarity index 99% rename from modules/gob-worker-load-data/source/__tests__/remove-duplicate-areas.test.js rename to modules/gob-worker-load-data/source/__tests__/remove-duplicate-areas.test.ts index 199a394f09..0906d394ee 100644 --- a/modules/gob-worker-load-data/source/__tests__/remove-duplicate-areas.test.js +++ b/modules/gob-worker-load-data/source/__tests__/remove-duplicate-areas.test.ts @@ -1,6 +1,4 @@ /* eslint-env jest */ -// @flow - jest.spyOn(global.console, "log").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "error").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "warn").mockImplementation(() => jest.fn()) diff --git a/modules/gob-worker-load-data/source/__tests__/store-data.test.js b/modules/gob-worker-load-data/source/__tests__/store-data.test.ts similarity index 99% rename from modules/gob-worker-load-data/source/__tests__/store-data.test.js rename to modules/gob-worker-load-data/source/__tests__/store-data.test.ts index 625a302e1e..57210359af 100644 --- a/modules/gob-worker-load-data/source/__tests__/store-data.test.js +++ b/modules/gob-worker-load-data/source/__tests__/store-data.test.ts @@ -1,6 +1,4 @@ /* eslint-env jest */ -// @flow - jest.spyOn(global.console, "log").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "error").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "warn").mockImplementation(() => jest.fn()) diff --git a/modules/gob-worker-load-data/source/__tests__/update-database.test.js b/modules/gob-worker-load-data/source/__tests__/update-database.test.ts similarity index 99% rename from modules/gob-worker-load-data/source/__tests__/update-database.test.js rename to modules/gob-worker-load-data/source/__tests__/update-database.test.ts index e5afa7735f..0c163045b2 100644 --- a/modules/gob-worker-load-data/source/__tests__/update-database.test.js +++ b/modules/gob-worker-load-data/source/__tests__/update-database.test.ts @@ -1,5 +1,4 @@ /* eslint-env jest */ - jest.spyOn(global.console, "log").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "error").mockImplementation(() => jest.fn()) jest.spyOn(global.console, "warn").mockImplementation(() => jest.fn()) diff --git a/modules/gob-worker-load-data/source/cache-item-hash.js b/modules/gob-worker-load-data/source/cache-item-hash.ts similarity index 97% rename from modules/gob-worker-load-data/source/cache-item-hash.js rename to modules/gob-worker-load-data/source/cache-item-hash.ts index b1e2f09a95..b9aacd1851 100644 --- a/modules/gob-worker-load-data/source/cache-item-hash.js +++ b/modules/gob-worker-load-data/source/cache-item-hash.ts @@ -1,5 +1,3 @@ -// @flow - import { db } from "./db" import getCacheStoreName from "./get-cache-store-name" import type { InfoFileTypeEnum } from "./types" diff --git a/modules/gob-worker-load-data/source/clean-prior-data.js b/modules/gob-worker-load-data/source/clean-prior-data.ts similarity index 99% rename from modules/gob-worker-load-data/source/clean-prior-data.js rename to modules/gob-worker-load-data/source/clean-prior-data.ts index 729c61195f..3c7e4ae019 100644 --- a/modules/gob-worker-load-data/source/clean-prior-data.js +++ b/modules/gob-worker-load-data/source/clean-prior-data.ts @@ -1,5 +1,3 @@ -// @flow - import { db } from "./db" import range from "idb-range" import fromPairs from "lodash/fromPairs" diff --git a/modules/gob-web/helpers/db.js b/modules/gob-worker-load-data/source/db.ts similarity index 89% rename from modules/gob-web/helpers/db.js rename to modules/gob-worker-load-data/source/db.ts index 3fd0604c29..c91fe5df85 100644 --- a/modules/gob-web/helpers/db.js +++ b/modules/gob-worker-load-data/source/db.ts @@ -1,5 +1,3 @@ -// @flow - import { createDatabase } from "@gob/web-database" export const db = createDatabase() diff --git a/modules/gob-worker-load-data/source/get-cache-store-name.js b/modules/gob-worker-load-data/source/get-cache-store-name.ts similarity index 97% rename from modules/gob-worker-load-data/source/get-cache-store-name.js rename to modules/gob-worker-load-data/source/get-cache-store-name.ts index 33f2888d28..997a27dd30 100644 --- a/modules/gob-worker-load-data/source/get-cache-store-name.js +++ b/modules/gob-worker-load-data/source/get-cache-store-name.ts @@ -1,5 +1,3 @@ -// @flow - import type { InfoFileTypeEnum } from "./types" export default function getCacheStoreName(type: InfoFileTypeEnum) { diff --git a/modules/gob-worker-load-data/source/lib-dispatch.js b/modules/gob-worker-load-data/source/lib-dispatch.ts similarity index 99% rename from modules/gob-worker-load-data/source/lib-dispatch.js rename to modules/gob-worker-load-data/source/lib-dispatch.ts index bfc67db6b9..9b52f588af 100644 --- a/modules/gob-worker-load-data/source/lib-dispatch.js +++ b/modules/gob-worker-load-data/source/lib-dispatch.ts @@ -1,5 +1,3 @@ -// @flow - function dispatch(type: string, action: string, ...args: any[]) { const toDispatch = { type: "dispatch", message: { type, action, args } } self.postMessage(JSON.stringify(toDispatch)) diff --git a/modules/gob-worker-load-data/source/lib-prepare-course.js b/modules/gob-worker-load-data/source/lib-prepare-course.ts similarity index 98% rename from modules/gob-worker-load-data/source/lib-prepare-course.js rename to modules/gob-worker-load-data/source/lib-prepare-course.ts index bc978be40e..d4d6a66ea7 100644 --- a/modules/gob-worker-load-data/source/lib-prepare-course.js +++ b/modules/gob-worker-load-data/source/lib-prepare-course.ts @@ -1,5 +1,3 @@ -// @flow - import flatMap from "lodash/flatMap" import { buildDeptNum } from "@gob/school-st-olaf-college" import { splitParagraph } from "@gob/lib" diff --git a/modules/gob-worker-load-data/source/load-files.js b/modules/gob-worker-load-data/source/load-files.ts similarity index 94% rename from modules/gob-worker-load-data/source/load-files.js rename to modules/gob-worker-load-data/source/load-files.ts index 3e1ead1c53..a04fb6958e 100644 --- a/modules/gob-worker-load-data/source/load-files.js +++ b/modules/gob-worker-load-data/source/load-files.ts @@ -1,5 +1,3 @@ -// @flow - import uniqueId from "lodash/uniqueId" import { status, json } from "@gob/lib" import { Notification } from "./lib-dispatch" @@ -8,11 +6,11 @@ import updateDatabase from "./update-database" import removeDuplicateAreas from "./remove-duplicate-areas" import type { InfoFileTypeEnum, InfoFileRef, InfoIndexFile } from "./types" -type Args = {| - baseUrl: string, - notification: Notification, - type: InfoFileTypeEnum, -|} +type Args = { + baseUrl: string + notification: Notification + type: InfoFileTypeEnum +} export default function loadFiles(url: string, baseUrl: string) { console.log(`fetching ${url}`) @@ -20,7 +18,9 @@ export default function loadFiles(url: string, baseUrl: string) { return fetch(url) .then(status) .then(json) - .then((data) => proceedWithUpdate(baseUrl, ((data: any): InfoIndexFile))) + .then((data) => + proceedWithUpdate(baseUrl, data as unknown as InfoIndexFile), + ) .catch((err) => handleErrors(err, url)) } @@ -45,7 +45,7 @@ export async function loadTerm( ) { let data: InfoIndexFile = (await fetch(courseInfoUrl) .then(status) - .then(json): any) + .then(json)) as InfoIndexFile const type: InfoFileTypeEnum = data.type const notification = new Notification(type, String(uniqueId())) diff --git a/modules/gob-worker-load-data/source/needs-update.js b/modules/gob-worker-load-data/source/needs-update.ts similarity index 97% rename from modules/gob-worker-load-data/source/needs-update.js rename to modules/gob-worker-load-data/source/needs-update.ts index 65b34ea575..46e115b55e 100644 --- a/modules/gob-worker-load-data/source/needs-update.js +++ b/modules/gob-worker-load-data/source/needs-update.ts @@ -1,5 +1,3 @@ -// @flow - import { db } from "./db" import getCacheStoreName from "./get-cache-store-name" import type { InfoFileTypeEnum } from "./types" diff --git a/modules/gob-worker-load-data/source/parse-data.js b/modules/gob-worker-load-data/source/parse-data.ts similarity index 97% rename from modules/gob-worker-load-data/source/parse-data.js rename to modules/gob-worker-load-data/source/parse-data.ts index d3f90af313..830aff0daf 100644 --- a/modules/gob-worker-load-data/source/parse-data.js +++ b/modules/gob-worker-load-data/source/parse-data.ts @@ -1,5 +1,3 @@ -// @flow - import yaml from "js-yaml" import type { InfoFileTypeEnum } from "./types" diff --git a/modules/gob-worker-load-data/source/remove-duplicate-areas.js b/modules/gob-worker-load-data/source/remove-duplicate-areas.ts similarity index 95% rename from modules/gob-worker-load-data/source/remove-duplicate-areas.js rename to modules/gob-worker-load-data/source/remove-duplicate-areas.ts index 9cf2c19552..41fb30834e 100644 --- a/modules/gob-worker-load-data/source/remove-duplicate-areas.js +++ b/modules/gob-worker-load-data/source/remove-duplicate-areas.ts @@ -1,5 +1,3 @@ -// @flow - import { db } from "./db" import groupBy from "lodash/groupBy" import filter from "lodash/filter" @@ -7,10 +5,10 @@ import fromPairs from "lodash/fromPairs" import sortBy from "lodash/sortBy" type AreaOfStudy = { - name: string, - type: string, - revision: string, - sourcePath: string, + name: string + type: string + revision: string + sourcePath: string } export function buildRemoveAreaOps(areas: AreaOfStudy[]) { diff --git a/modules/gob-worker-load-data/source/store-data.js b/modules/gob-worker-load-data/source/store-data.ts similarity index 98% rename from modules/gob-worker-load-data/source/store-data.js rename to modules/gob-worker-load-data/source/store-data.ts index 36ee6ffad2..e0ead15e09 100644 --- a/modules/gob-worker-load-data/source/store-data.js +++ b/modules/gob-worker-load-data/source/store-data.ts @@ -1,5 +1,3 @@ -// @flow - import present from "present" import prepareCourse from "./lib-prepare-course" import { quotaExceededError } from "./lib-dispatch" @@ -7,7 +5,7 @@ import { db } from "./db" import type { InfoFileTypeEnum } from "./types" import prettyMs from "pretty-ms" -type BasicCourse = Object +type BasicCourse = Record type BasicArea = { type: string } export function storeCourses(path: string, data: Array) { diff --git a/modules/gob-worker-load-data/source/types.js b/modules/gob-worker-load-data/source/types.js deleted file mode 100644 index 6e420f73d3..0000000000 --- a/modules/gob-worker-load-data/source/types.js +++ /dev/null @@ -1,16 +0,0 @@ -// @flow - -export type InfoFileTypeEnum = "courses" | "areas" - -export type InfoIndexFile = { - type: InfoFileTypeEnum, - files: InfoFileRef[], -} - -export type InfoFileRef = { - type: "json" | "xml" | "csv" | "yaml", - year?: number, - term?: number, - path: string, - hash: string, -} diff --git a/modules/gob-worker-load-data/source/types.ts b/modules/gob-worker-load-data/source/types.ts new file mode 100644 index 0000000000..72a2c23f80 --- /dev/null +++ b/modules/gob-worker-load-data/source/types.ts @@ -0,0 +1,14 @@ +export type InfoFileTypeEnum = "courses" | "areas" + +export type InfoIndexFile = { + type: InfoFileTypeEnum + files: InfoFileRef[] +} + +export type InfoFileRef = { + type: "json" | "xml" | "csv" | "yaml" + year?: number + term?: number + path: string + hash: string +} diff --git a/modules/gob-worker-load-data/source/update-database.js b/modules/gob-worker-load-data/source/update-database.ts similarity index 99% rename from modules/gob-worker-load-data/source/update-database.js rename to modules/gob-worker-load-data/source/update-database.ts index 9b1c26d817..40661a3cae 100644 --- a/modules/gob-worker-load-data/source/update-database.js +++ b/modules/gob-worker-load-data/source/update-database.ts @@ -1,5 +1,3 @@ -// @flow - import { status, text } from "@gob/lib" import parseData from "./parse-data" diff --git a/package-lock.json b/package-lock.json index 8abde35552..47278a712b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,30 +15,36 @@ "@babel/eslint-parser": "7.28.5", "@babel/plugin-transform-runtime": "7.28.5", "@babel/preset-env": "7.28.5", - "@babel/preset-flow": "7.27.1", "@babel/preset-react": "7.28.5", + "@babel/preset-typescript": "^7.28.5", "@eslint/js": "9.39.1", "@microsoft/eslint-formatter-sarif": "3.1.0", + "@playwright/test": "^1.56.1", "@testing-library/jest-dom": "6.9.1", + "@types/jest": "^30.0.0", + "@types/lodash": "^4.17.20", + "@types/node": "^24.10.1", + "@types/react": "^19.2.5", + "@types/react-dom": "^19.2.3", + "@typescript-eslint/eslint-plugin": "^8.46.4", + "@typescript-eslint/parser": "^8.46.4", "babel-jest": "29.7.0", "babel-plugin-styled-components": "2.1.4", "core-js": "3.45.0", "cross-env": "10.0.0", "eslint": "9.39.1", "eslint-config-prettier": "10.1.8", - "eslint-plugin-babel": "5.3.1", - "eslint-plugin-ft-flow": "3.0.11", "eslint-plugin-import": "2.32.0", "eslint-plugin-react": "7.37.5", - "flow-bin": "0.82.0", - "flow-remove-types": "2.122.0", "globals": "16.5.0", "hermes-eslint": "0.32.1", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "prettier": "3.6.2", "pretty-quick": "4.2.2", - "set-blocking": "2.0.0" + "set-blocking": "2.0.0", + "ts-jest": "^29.4.5", + "typescript": "^5.9.3" }, "engines": { "node": ">=22" @@ -987,22 +993,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-flow": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.27.1.tgz", - "integrity": "sha512-p9OkPbZ5G7UT1MofwYFigGebnrzGJacoBSQM0/6bi/PUMVE+qlWDD/OalvQKbwgQzU6dl0xAv6r4X7Jme0RYxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-import-assertions": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.27.1.tgz", @@ -1186,6 +1176,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", @@ -1491,23 +1497,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-flow-strip-types": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.27.1.tgz", - "integrity": "sha512-G5eDKsu50udECw7DL2AcsysXiQyB7Nfg521t2OAJ4tbfTJ27doHLeF/vlI1NZGlLdbb/v+ibvtL1YBQqYOwJGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/plugin-syntax-flow": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-transform-for-of": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.27.1.tgz", @@ -2099,6 +2088,26 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.5.tgz", + "integrity": "sha512-x2Qa+v/CuEoX7Dr31iAfr0IhInrVOWZU/2vJMJ00FOR/2nM0BcBEclpaf9sWCDc+v5e9dMrhSH8/atq/kX7+bA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-create-class-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", + "@babel/plugin-syntax-typescript": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-unicode-escapes": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.27.1.tgz", @@ -2251,24 +2260,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/preset-flow": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.27.1.tgz", - "integrity": "sha512-ez3a2it5Fn6P54W8QkbfIyyIbxlXvcxyWHHvno1Wg0Ej5eiJY5hBb8ExttoIOJJk7V2dZE6prP7iby5q2aQ0Lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/helper-validator-option": "^7.27.1", - "@babel/plugin-transform-flow-strip-types": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/preset-modules": { "version": "0.1.6-no-external-plugins", "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", @@ -2305,6 +2296,26 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/preset-typescript": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz", + "integrity": "sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-validator-option": "^7.27.1", + "@babel/plugin-syntax-jsx": "^7.27.1", + "@babel/plugin-transform-modules-commonjs": "^7.27.1", + "@babel/plugin-transform-typescript": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/runtime": { "version": "7.28.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.2.tgz", @@ -3063,6 +3074,16 @@ } } }, + "node_modules/@jest/diff-sequences": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz", + "integrity": "sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, "node_modules/@jest/environment": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", @@ -3124,6 +3145,16 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/get-type": { + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", + "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, "node_modules/@jest/globals": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", @@ -3140,6 +3171,30 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/pattern": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz", + "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-regex-util": "30.0.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/pattern/node_modules/jest-regex-util": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz", + "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, "node_modules/@jest/reporters": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", @@ -3864,6 +3919,22 @@ "url": "https://opencollective.com/pkgr" } }, + "node_modules/@playwright/test": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.1.tgz", + "integrity": "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.56.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@reach/router": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/@reach/router/-/router-1.3.3.tgz", @@ -4329,9 +4400,9 @@ } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true, "license": "MIT" }, @@ -4355,6 +4426,237 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/jest": { + "version": "30.0.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-30.0.0.tgz", + "integrity": "sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^30.0.0", + "pretty-format": "^30.0.0" + } + }, + "node_modules/@types/jest/node_modules/@jest/expect-utils": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.2.0.tgz", + "integrity": "sha512-1JnRfhqpD8HGpOmQp180Fo9Zt69zNtC+9lR+kT7NVL05tNXIi+QC8Csz7lfidMoVLPD3FnOtcmp0CEFnxExGEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/get-type": "30.1.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/@jest/schemas": { + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", + "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.34.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/@jest/types": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz", + "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/pattern": "30.0.1", + "@jest/schemas": "30.0.5", + "@types/istanbul-lib-coverage": "^2.0.6", + "@types/istanbul-reports": "^3.0.4", + "@types/node": "*", + "@types/yargs": "^17.0.33", + "chalk": "^4.1.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/@sinclair/typebox": { + "version": "0.34.41", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz", + "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/jest/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@types/jest/node_modules/ci-info": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@types/jest/node_modules/expect": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.2.0.tgz", + "integrity": "sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "30.2.0", + "@jest/get-type": "30.1.0", + "jest-matcher-utils": "30.2.0", + "jest-message-util": "30.2.0", + "jest-mock": "30.2.0", + "jest-util": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-diff": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.2.0.tgz", + "integrity": "sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/diff-sequences": "30.0.1", + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "pretty-format": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-matcher-utils": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.2.0.tgz", + "integrity": "sha512-dQ94Nq4dbzmUWkQ0ANAWS9tBRfqCrn0bV9AMYdOi/MHW726xn7eQmMeRTpX2ViC00bpNaWXq+7o4lIQ3AX13Hg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "jest-diff": "30.2.0", + "pretty-format": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-message-util": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.2.0.tgz", + "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@jest/types": "30.2.0", + "@types/stack-utils": "^2.0.3", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "micromatch": "^4.0.8", + "pretty-format": "30.2.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.6" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-mock": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.2.0.tgz", + "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.2.0", + "@types/node": "*", + "jest-util": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/jest-util": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz", + "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.2.0", + "@types/node": "*", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "graceful-fs": "^4.2.11", + "picomatch": "^4.0.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@types/jest/node_modules/pretty-format": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", + "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "30.0.5", + "ansi-styles": "^5.2.0", + "react-is": "^18.3.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@types/jest/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/jsdom": { "version": "20.0.1", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", @@ -4390,6 +4692,13 @@ "@types/node": "*" } }, + "node_modules/@types/lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", @@ -4404,10 +4713,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "13.1.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.6.tgz", - "integrity": "sha512-Jg1F+bmxcpENHP23sVKkNuU3uaxPnsBMW0cLjleiikFKomJQbsn0Cqk2yDvQArqzZN6ABfBkZ0To7pQ8sLdWDg==", - "license": "MIT" + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } }, "node_modules/@types/node-forge": { "version": "1.3.13", @@ -4431,12 +4743,6 @@ "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", "license": "MIT" }, - "node_modules/@types/prop-types": { - "version": "15.7.15", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", - "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", - "license": "MIT" - }, "node_modules/@types/qs": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", @@ -4452,16 +4758,26 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "18.3.23", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.23.tgz", - "integrity": "sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==", + "version": "19.2.5", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.5.tgz", + "integrity": "sha512-keKxkZMqnDicuvFoJbzrhbtdLSPhj/rZThDlKWCDbgXmUg0rEUFtRssDXKYmtXluZlIqiC5VqkCgRwzuyLHKHw==", "license": "MIT", "peer": true, "dependencies": { - "@types/prop-types": "*", "csstype": "^3.0.2" } }, + "node_modules/@types/react-dom": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, "node_modules/@types/react-redux": { "version": "7.1.34", "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.34.tgz", @@ -4575,22 +4891,307 @@ "@types/node": "*" } }, - "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-13.1.0.tgz", + "integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.4.tgz", + "integrity": "sha512-R48VhmTJqplNyDxCyqqVkFSZIx1qX6PzwqgcXn1olLrzxcSBDlOsbtcnQuQhNtnNiJ4Xe5gREI1foajYaYU2Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.46.4", + "@typescript-eslint/type-utils": "8.46.4", + "@typescript-eslint/utils": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.46.4", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.4.tgz", + "integrity": "sha512-tK3GPFWbirvNgsNKto+UmB/cRtn6TZfyw0D6IKrW55n6Vbs7KJoZtI//kpTKzE/DUmmnAFD8/Ca46s7Obs92/w==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.4.tgz", + "integrity": "sha512-nPiRSKuvtTN+no/2N1kt2tUh/HoFzeEgOm9fQ6XQk4/ApGqjx0zFIIaLJ6wooR1HIoozvj2j6vTi/1fgAz7UYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.46.4", + "@typescript-eslint/types": "^8.46.4", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.4.tgz", + "integrity": "sha512-tMDbLGXb1wC+McN1M6QeDx7P7c0UWO5z9CXqp7J8E+xGcJuUuevWKxuG8j41FoweS3+L41SkyKKkia16jpX7CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.4.tgz", + "integrity": "sha512-+/XqaZPIAk6Cjg7NWgSGe27X4zMGqrFqZ8atJsX3CWxH/jACqWnrWI68h7nHQld0y+k9eTTjb9r+KU4twLoo9A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.4.tgz", + "integrity": "sha512-V4QC8h3fdT5Wro6vANk6eojqfbv5bpwHuMsBcJUJkqs2z5XnYhJzyz9Y02eUmF9u3PgXEUiOt4w4KHR3P+z0PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4", + "@typescript-eslint/utils": "8.46.4", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.4.tgz", + "integrity": "sha512-USjyxm3gQEePdUwJBFjjGNG18xY9A2grDVGuk7/9AkjIF1L+ZrVnwR5VAU5JXtUnBL/Nwt3H31KlRDaksnM7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.4.tgz", + "integrity": "sha512-7oV2qEOr1d4NWNmpXLR35LvCfOkTNymY9oyW+lUHkmCno7aOmIf/hMaydnJBUTBMRCOGZh8YjkFOc8dadEoNGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.46.4", + "@typescript-eslint/tsconfig-utils": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.4.tgz", + "integrity": "sha512-AbSv11fklGXV6T28dp2Me04Uw90R2iJ30g2bgLz529Koehrmkbs1r7paFqr1vPCZi7hHwYxYtxfyQMRC8QaVSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.4.tgz", + "integrity": "sha512-/++5CYLQqsO9HFGLI7APrxBJYo+5OCMpViuhV8q5/Qa3o5mMrF//eQHks+PXcsAVaLdn817fMuS7zqoXNNZGaw==", "dev": true, "license": "MIT", "dependencies": { - "@types/yargs-parser": "*" + "@typescript-eslint/types": "8.46.4", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@types/yargs-parser": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-13.1.0.tgz", - "integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg==", + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, - "license": "MIT" + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } }, "node_modules/@uiw/codemirror-extensions-basic-setup": { "version": "4.24.2", @@ -5893,6 +6494,19 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/bser": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", @@ -7976,37 +8590,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-babel": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-babel/-/eslint-plugin-babel-5.3.1.tgz", - "integrity": "sha512-VsQEr6NH3dj664+EyxJwO4FCYm/00JhYb3Sk3ft8o+fpKuIfQ9TaW6uVUfvwMXHcf/lsnRIoyFPsLMyiWCSL/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-rule-composer": "^0.3.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": ">=4.0.0" - } - }, - "node_modules/eslint-plugin-ft-flow": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/eslint-plugin-ft-flow/-/eslint-plugin-ft-flow-3.0.11.tgz", - "integrity": "sha512-6ZJ4KYGYjIosCcU883zBBT1nFsKP58xrTOwguiw3/HRq0EpYAyhrF1nCGbK7V23cmKtPXMpDfl8qPupt5s5W8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.21", - "string-natural-compare": "^3.0.1" - }, - "peerDependencies": { - "eslint": "^8.56.0 || ^9.0.0", - "hermes-eslint": ">=0.15.0" - } - }, "node_modules/eslint-plugin-import": { "version": "2.32.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", @@ -8100,16 +8683,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eslint-rule-composer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", - "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -8528,6 +9101,23 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -8714,19 +9304,6 @@ "dev": true, "license": "ISC" }, - "node_modules/flow-bin": { - "version": "0.82.0", - "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.82.0.tgz", - "integrity": "sha512-D7ViTCVJSVv19CB6dFWS9k2iKQlavtkRXn9el0ofVTTpGuybe+EPE8DZwdyohzEt6wRhHV8gwkteWvxdcVuOzg==", - "dev": true, - "license": "MIT", - "bin": { - "flow": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/flow-parser": { "version": "0.122.0", "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.122.0.tgz", @@ -9152,6 +9729,28 @@ "dev": true, "license": "MIT" }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, "node_modules/hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", @@ -9259,7 +9858,6 @@ "integrity": "sha512-3ljktN2ek+bRRsPAcMeqMEJou6s2MRe6VuLkLsXDXuVrJfRZ7V2VUw41T9uAt9lcA2xaJP4yykYAnMg15nsRPw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esrecurse": "^4.3.0", "hermes-estree": "0.32.1", @@ -10405,6 +11003,7 @@ "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -10986,22 +11585,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/@babel/plugin-syntax-typescript": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", - "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/jest-snapshot/node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", @@ -11495,6 +12078,13 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -11541,6 +12131,13 @@ "lz-string": "bin/bin.js" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -11892,6 +12489,16 @@ "dev": true, "license": "MIT" }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -12835,6 +13442,53 @@ "node": ">= 4" } }, + "node_modules/playwright": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", + "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.56.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", + "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/playwright/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/plur": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/plur/-/plur-3.1.1.tgz", @@ -15050,13 +15704,6 @@ "node": ">=10" } }, - "node_modules/string-natural-compare": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz", - "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==", - "dev": true, - "license": "MIT" - }, "node_modules/string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -15720,6 +16367,121 @@ "node": ">=8" } }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/ts-jest": { + "version": "29.4.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.5.tgz", + "integrity": "sha512-HO3GyiWn2qvTQA4kTgjDcXiMwYQt68a1Y8+JuLRVpdIzm+UOLSHgl/XqR4c6nzJkq5rOkjc02O2I7P7l/Yof0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.8", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.3", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jest-util": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ts-jest/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -15870,10 +16632,11 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -15945,6 +16708,20 @@ "node": ">=10" } }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/unbox-primitive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", @@ -15964,6 +16741,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "license": "MIT" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", @@ -16655,6 +17438,13 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, "node_modules/worker-loader": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-3.0.8.tgz", diff --git a/package.json b/package.json index 68db4577c2..79e7908ddd 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,26 @@ ], "jest": { "testEnvironment": "jsdom", + "transform": { + "^.+\\.tsx?$": [ + "ts-jest", + { + "tsconfig": { + "jsx": "react", + "esModuleInterop": true, + "allowSyntheticDefaultImports": true + } + } + ], + "^.+\\.jsx?$": "babel-jest" + }, "collectCoverageFrom": [ - "modules/**/*.js" + "modules/**/*.ts", + "modules/**/*.tsx" ], "coveragePathIgnorePatterns": [ "/node_modules/", - "/modules/gob-hanson-format/parse-hanson-string.js" + "/modules/gob-hanson-format/parse-hanson-string.ts" ], "coverageReporters": [ "json", @@ -27,31 +41,26 @@ "moduleNameMapper": { "^.+\\.s?css$": "/config/flow/css.js.flow" }, + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "jsx", + "json" + ], + "testMatch": [ + "**/__tests__/**/*.test.ts?(x)", + "**/?(*.)+(spec|test).ts?(x)" + ], "setupFiles": [], "setupFilesAfterEnv": [ "/config/test-harness.js", "@testing-library/jest-dom" ], "testPathIgnorePatterns": [ - "\\.support.js$", - "__support__" - ] - }, - "flow-coverage-report": { - "globIncludePatterns": [ - "modules/**/*.js" - ], - "globExcludePatterns": [ - "**/__tests__/**", - "**/__mocks__/**", - "**/*-cli/**", - "modules/gob-hanson-format/parse-hanson-string.js", - "modules/gob-web/icons/ionicons-all.js", - "modules/gob-web/icons/ionicons.js", - "**/node_modules/**" - ], - "reportTypes": [ - "html" + "/node_modules/", + "/e2e/", + "\\.support\\.ts$" ] }, "greenkeeper": { @@ -67,29 +76,35 @@ "@babel/eslint-parser": "7.28.5", "@babel/plugin-transform-runtime": "7.28.5", "@babel/preset-env": "7.28.5", - "@babel/preset-flow": "7.27.1", "@babel/preset-react": "7.28.5", + "@babel/preset-typescript": "^7.28.5", "@eslint/js": "9.39.1", "@microsoft/eslint-formatter-sarif": "3.1.0", + "@playwright/test": "^1.56.1", "@testing-library/jest-dom": "6.9.1", + "@types/jest": "^30.0.0", + "@types/lodash": "^4.17.20", + "@types/node": "^24.10.1", + "@types/react": "^19.2.5", + "@types/react-dom": "^19.2.3", + "@typescript-eslint/eslint-plugin": "^8.46.4", + "@typescript-eslint/parser": "^8.46.4", "babel-jest": "29.7.0", "babel-plugin-styled-components": "2.1.4", "core-js": "3.45.0", "cross-env": "10.0.0", "eslint": "9.39.1", "eslint-config-prettier": "10.1.8", - "eslint-plugin-babel": "5.3.1", - "eslint-plugin-ft-flow": "3.0.11", "eslint-plugin-import": "2.32.0", "eslint-plugin-react": "7.37.5", - "flow-bin": "0.82.0", - "flow-remove-types": "2.122.0", "globals": "16.5.0", "hermes-eslint": "0.32.1", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "prettier": "3.6.2", "pretty-quick": "4.2.2", - "set-blocking": "2.0.0" + "set-blocking": "2.0.0", + "ts-jest": "^29.4.5", + "typescript": "^5.9.3" } } diff --git a/playwright.config.ts b/playwright.config.ts new file mode 100644 index 0000000000..9792784d5d --- /dev/null +++ b/playwright.config.ts @@ -0,0 +1,26 @@ +import { defineConfig, devices } from "@playwright/test" + +export default defineConfig({ + testDir: "./e2e", + fullyParallel: true, + forbidOnly: !!process.env.CI, + retries: process.env.CI ? 2 : 0, + workers: process.env.CI ? 1 : undefined, + reporter: "html", + use: { + baseURL: "http://localhost:3000", + trace: "on-first-retry", + }, + projects: [ + { + name: "chromium", + use: { ...devices["Desktop Chrome"] }, + }, + ], + webServer: { + command: "cd modules/gob-web && npm run start", + url: "http://localhost:3000", + reuseExistingServer: !process.env.CI, + timeout: 120 * 1000, + }, +}) diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000000..87a6eb6610 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,51 @@ +{ + "compilerOptions": { + // Strict Type Checking Options (starting with weaker settings as suggested in issue) + "strict": false, + "noImplicitAny": false, + "strictNullChecks": false, + "strictFunctionTypes": false, + "strictBindCallApply": false, + "strictPropertyInitialization": false, + "noImplicitThis": false, + "alwaysStrict": false, + + // Suppress additional errors during migration + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": false, + "noFallthroughCasesInSwitch": false, + + // Additional Strict Checks (to be enabled gradually) + // "exactOptionalPropertyTypes": true, + // "noPropertyAccessFromIndexSignature": true, + // "noFallthroughCasesInSwitch": true, + // "noUncheckedIndexedAccess": true, + + // Module Resolution + "module": "esnext", + "moduleResolution": "node", + "target": "esnext", + "lib": ["dom", "dom.iterable", "esnext", "webworker"], + "jsx": "react", + + // Emit Options + "noEmit": true, + "isolatedModules": true, + "skipLibCheck": true, + + // Interop Constraints + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + + // Path Mapping (for module resolution) + "baseUrl": ".", + "paths": { + "@gob/*": ["modules/*"] + } + }, + "include": ["modules/gob-colors/**/*.ts"], + "exclude": ["node_modules", "**/node_modules", "**/dist/**", "**/build/**"] +}