immosquare-cleaner 0.1.32 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/node_modules/@eslint/eslintrc/README.md +15 -4
- data/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +57 -18
- data/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +1 -1
- data/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +60 -34
- data/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +1 -1
- data/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +3 -16
- data/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +63 -18
- data/node_modules/@eslint/eslintrc/package.json +4 -4
- data/node_modules/@eslint/js/package.json +2 -2
- data/node_modules/@eslint/js/src/configs/eslint-all.js +9 -1
- data/node_modules/@eslint/js/src/configs/eslint-recommended.js +12 -5
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/LICENSE +201 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/README.md +105 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +384 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +27 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/index.d.ts +16 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +12 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js +65 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.js +315 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/package.json +74 -0
- data/node_modules/@humanwhocodes/config-array/api.js +114 -16
- data/node_modules/@humanwhocodes/config-array/package.json +5 -3
- data/node_modules/@humanwhocodes/object-schema/CHANGELOG.md +7 -0
- data/node_modules/@humanwhocodes/object-schema/package.json +6 -1
- data/node_modules/@humanwhocodes/retry/LICENSE +201 -0
- data/node_modules/@humanwhocodes/retry/README.md +122 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.cjs +267 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.d.ts +24 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.js +265 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.min.js +1 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.mjs +265 -0
- data/node_modules/@humanwhocodes/retry/package.json +74 -0
- data/node_modules/@types/semver-utils/LICENSE +21 -0
- data/node_modules/@types/semver-utils/README.md +34 -0
- data/node_modules/@types/semver-utils/index.d.ts +15 -0
- data/node_modules/@types/semver-utils/package.json +25 -0
- data/node_modules/acorn/CHANGELOG.md +36 -0
- data/node_modules/acorn/README.md +8 -3
- data/node_modules/acorn/dist/acorn.d.mts +857 -26
- data/node_modules/acorn/dist/acorn.d.ts +833 -268
- data/node_modules/acorn/dist/acorn.js +33 -21
- data/node_modules/acorn/dist/acorn.mjs +33 -21
- data/node_modules/acorn/package.json +1 -1
- data/node_modules/cacheable-request/node_modules/keyv/README.md +429 -0
- data/node_modules/cacheable-request/node_modules/keyv/package.json +57 -0
- data/node_modules/cacheable-request/node_modules/keyv/src/index.d.ts +112 -0
- data/node_modules/cacheable-request/node_modules/keyv/src/index.js +264 -0
- data/node_modules/doctrine/CHANGELOG.md +0 -7
- data/node_modules/doctrine/lib/doctrine.js +1 -0
- data/node_modules/doctrine/package.json +8 -9
- data/node_modules/eslint/README.md +31 -28
- data/node_modules/eslint/bin/eslint.js +4 -3
- data/node_modules/eslint/conf/ecma-version.js +16 -0
- data/node_modules/eslint/conf/globals.js +1 -0
- data/node_modules/eslint/conf/rule-type-list.json +3 -1
- data/node_modules/eslint/lib/api.js +7 -11
- data/node_modules/eslint/lib/cli-engine/cli-engine.js +14 -3
- data/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json +1 -29
- data/node_modules/eslint/lib/cli-engine/lint-result-cache.js +2 -2
- data/node_modules/eslint/lib/cli.js +115 -36
- data/node_modules/eslint/lib/config/default-config.js +3 -0
- data/node_modules/eslint/lib/config/flat-config-array.js +110 -24
- data/node_modules/eslint/lib/config/flat-config-helpers.js +41 -20
- data/node_modules/eslint/lib/config/flat-config-schema.js +1 -7
- data/node_modules/eslint/lib/config/rule-validator.js +42 -6
- data/node_modules/eslint/lib/eslint/eslint-helpers.js +116 -58
- data/node_modules/eslint/lib/eslint/eslint.js +892 -377
- data/node_modules/eslint/lib/eslint/index.js +2 -2
- data/node_modules/eslint/lib/eslint/legacy-eslint.js +728 -0
- data/node_modules/eslint/lib/linter/apply-disable-directives.js +59 -31
- data/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js +0 -1
- data/node_modules/eslint/lib/linter/code-path-analysis/code-path.js +32 -30
- data/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js +1 -1
- data/node_modules/eslint/lib/linter/config-comment-parser.js +8 -11
- data/node_modules/eslint/lib/linter/index.js +1 -3
- data/node_modules/eslint/lib/linter/interpolate.js +24 -2
- data/node_modules/eslint/lib/linter/linter.js +428 -207
- data/node_modules/eslint/lib/linter/report-translator.js +3 -3
- data/node_modules/eslint/lib/linter/rules.js +6 -15
- data/node_modules/eslint/lib/linter/source-code-fixer.js +1 -1
- data/node_modules/eslint/lib/linter/timing.js +16 -8
- data/node_modules/eslint/lib/options.js +35 -3
- data/node_modules/eslint/lib/rule-tester/index.js +3 -1
- data/node_modules/eslint/lib/rule-tester/rule-tester.js +424 -347
- data/node_modules/eslint/lib/rules/array-bracket-newline.js +1 -1
- data/node_modules/eslint/lib/rules/array-bracket-spacing.js +1 -1
- data/node_modules/eslint/lib/rules/block-scoped-var.js +1 -1
- data/node_modules/eslint/lib/rules/callback-return.js +2 -2
- data/node_modules/eslint/lib/rules/camelcase.js +3 -5
- data/node_modules/eslint/lib/rules/capitalized-comments.js +10 -7
- data/node_modules/eslint/lib/rules/comma-dangle.js +1 -1
- data/node_modules/eslint/lib/rules/comma-style.js +2 -2
- data/node_modules/eslint/lib/rules/complexity.js +14 -1
- data/node_modules/eslint/lib/rules/constructor-super.js +99 -100
- data/node_modules/eslint/lib/rules/default-case.js +1 -1
- data/node_modules/eslint/lib/rules/eol-last.js +2 -2
- data/node_modules/eslint/lib/rules/function-paren-newline.js +2 -2
- data/node_modules/eslint/lib/rules/indent-legacy.js +5 -5
- data/node_modules/eslint/lib/rules/indent.js +5 -5
- data/node_modules/eslint/lib/rules/index.js +1 -2
- data/node_modules/eslint/lib/rules/key-spacing.js +2 -2
- data/node_modules/eslint/lib/rules/line-comment-position.js +1 -1
- data/node_modules/eslint/lib/rules/lines-around-directive.js +2 -2
- data/node_modules/eslint/lib/rules/max-depth.js +1 -1
- data/node_modules/eslint/lib/rules/max-len.js +3 -3
- data/node_modules/eslint/lib/rules/max-lines.js +3 -3
- data/node_modules/eslint/lib/rules/max-nested-callbacks.js +1 -1
- data/node_modules/eslint/lib/rules/max-params.js +1 -1
- data/node_modules/eslint/lib/rules/max-statements.js +1 -1
- data/node_modules/eslint/lib/rules/multiline-comment-style.js +7 -7
- data/node_modules/eslint/lib/rules/new-cap.js +1 -1
- data/node_modules/eslint/lib/rules/newline-after-var.js +1 -1
- data/node_modules/eslint/lib/rules/newline-before-return.js +1 -1
- data/node_modules/eslint/lib/rules/no-case-declarations.js +13 -1
- data/node_modules/eslint/lib/rules/no-constant-binary-expression.js +7 -8
- data/node_modules/eslint/lib/rules/no-constant-condition.js +18 -7
- data/node_modules/eslint/lib/rules/no-constructor-return.js +2 -2
- data/node_modules/eslint/lib/rules/no-dupe-class-members.js +2 -2
- data/node_modules/eslint/lib/rules/no-else-return.js +1 -1
- data/node_modules/eslint/lib/rules/no-empty-function.js +2 -2
- data/node_modules/eslint/lib/rules/no-empty-static-block.js +1 -1
- data/node_modules/eslint/lib/rules/no-extend-native.js +1 -2
- data/node_modules/eslint/lib/rules/no-extra-semi.js +1 -1
- data/node_modules/eslint/lib/rules/no-fallthrough.js +41 -16
- data/node_modules/eslint/lib/rules/no-implicit-coercion.js +66 -24
- data/node_modules/eslint/lib/rules/no-inner-declarations.js +23 -2
- data/node_modules/eslint/lib/rules/no-invalid-regexp.js +1 -1
- data/node_modules/eslint/lib/rules/no-invalid-this.js +1 -1
- data/node_modules/eslint/lib/rules/no-lone-blocks.js +3 -3
- data/node_modules/eslint/lib/rules/no-loss-of-precision.js +1 -1
- data/node_modules/eslint/lib/rules/no-misleading-character-class.js +225 -69
- data/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +1 -1
- data/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +1 -1
- data/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js +1 -1
- data/node_modules/eslint/lib/rules/no-new-symbol.js +8 -1
- data/node_modules/eslint/lib/rules/no-restricted-globals.js +1 -1
- data/node_modules/eslint/lib/rules/no-restricted-imports.js +186 -40
- data/node_modules/eslint/lib/rules/no-restricted-modules.js +2 -2
- data/node_modules/eslint/lib/rules/no-return-await.js +1 -1
- data/node_modules/eslint/lib/rules/no-sequences.js +1 -0
- data/node_modules/eslint/lib/rules/no-this-before-super.js +45 -13
- data/node_modules/eslint/lib/rules/no-trailing-spaces.js +2 -3
- data/node_modules/eslint/lib/rules/no-unneeded-ternary.js +1 -1
- data/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js +1 -1
- data/node_modules/eslint/lib/rules/no-unused-private-class-members.js +1 -1
- data/node_modules/eslint/lib/rules/no-unused-vars.js +197 -36
- data/node_modules/eslint/lib/rules/no-useless-assignment.js +566 -0
- data/node_modules/eslint/lib/rules/no-useless-backreference.js +1 -1
- data/node_modules/eslint/lib/rules/no-useless-computed-key.js +2 -2
- data/node_modules/eslint/lib/rules/no-useless-return.js +7 -2
- data/node_modules/eslint/lib/rules/object-curly-spacing.js +3 -3
- data/node_modules/eslint/lib/rules/object-property-newline.js +1 -1
- data/node_modules/eslint/lib/rules/one-var.js +5 -5
- data/node_modules/eslint/lib/rules/padded-blocks.js +7 -7
- data/node_modules/eslint/lib/rules/prefer-arrow-callback.js +3 -3
- data/node_modules/eslint/lib/rules/prefer-reflect.js +1 -1
- data/node_modules/eslint/lib/rules/prefer-regex-literals.js +1 -1
- data/node_modules/eslint/lib/rules/prefer-template.js +1 -1
- data/node_modules/eslint/lib/rules/radix.js +2 -2
- data/node_modules/eslint/lib/rules/semi-style.js +1 -1
- data/node_modules/eslint/lib/rules/sort-imports.js +1 -1
- data/node_modules/eslint/lib/rules/sort-keys.js +1 -1
- data/node_modules/eslint/lib/rules/sort-vars.js +1 -1
- data/node_modules/eslint/lib/rules/space-unary-ops.js +1 -1
- data/node_modules/eslint/lib/rules/strict.js +1 -1
- data/node_modules/eslint/lib/rules/use-isnan.js +101 -7
- data/node_modules/eslint/lib/rules/utils/ast-utils.js +16 -7
- data/node_modules/eslint/lib/rules/utils/char-source.js +240 -0
- data/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js +1 -1
- data/node_modules/eslint/lib/rules/utils/unicode/index.js +9 -4
- data/node_modules/eslint/lib/rules/yield-star-spacing.js +1 -1
- data/node_modules/eslint/lib/shared/runtime-info.js +1 -0
- data/node_modules/eslint/lib/shared/serialization.js +55 -0
- data/node_modules/eslint/lib/shared/stats.js +30 -0
- data/node_modules/eslint/lib/shared/string-utils.js +9 -11
- data/node_modules/eslint/lib/shared/types.js +35 -1
- data/node_modules/eslint/lib/source-code/index.js +3 -1
- data/node_modules/eslint/lib/source-code/source-code.js +299 -85
- data/node_modules/eslint/lib/source-code/token-store/backward-token-cursor.js +3 -3
- data/node_modules/eslint/lib/source-code/token-store/cursors.js +4 -2
- data/node_modules/eslint/lib/source-code/token-store/forward-token-comment-cursor.js +3 -3
- data/node_modules/eslint/lib/source-code/token-store/forward-token-cursor.js +3 -3
- data/node_modules/eslint/lib/source-code/token-store/index.js +2 -2
- data/node_modules/eslint/lib/unsupported-api.js +3 -5
- data/node_modules/eslint/messages/no-config-found.js +1 -1
- data/node_modules/eslint/messages/plugin-conflict.js +1 -1
- data/node_modules/eslint/messages/plugin-invalid.js +1 -1
- data/node_modules/eslint/messages/plugin-missing.js +1 -1
- data/node_modules/eslint/package.json +32 -29
- data/node_modules/eslint-scope/README.md +23 -2
- data/node_modules/eslint-scope/dist/eslint-scope.cjs +84 -58
- data/node_modules/eslint-scope/lib/index.js +0 -3
- data/node_modules/eslint-scope/lib/pattern-visitor.js +4 -3
- data/node_modules/eslint-scope/lib/referencer.js +13 -11
- data/node_modules/eslint-scope/lib/scope-manager.js +2 -8
- data/node_modules/eslint-scope/lib/scope.js +64 -43
- data/node_modules/eslint-scope/lib/version.js +1 -1
- data/node_modules/eslint-scope/package.json +21 -19
- data/node_modules/eslint-visitor-keys/README.md +1 -1
- data/node_modules/eslint-visitor-keys/package.json +2 -2
- data/node_modules/espree/README.md +1 -1
- data/node_modules/espree/dist/espree.cjs +1 -1
- data/node_modules/espree/lib/version.js +1 -1
- data/node_modules/espree/package.json +18 -20
- data/node_modules/file-entry-cache/LICENSE +1 -1
- data/node_modules/file-entry-cache/README.md +6 -3
- data/node_modules/file-entry-cache/package.json +19 -43
- data/node_modules/flat-cache/README.md +8 -6
- data/node_modules/flat-cache/changelog.md +155 -205
- data/node_modules/flat-cache/package.json +16 -39
- data/node_modules/flat-cache/src/cache.js +22 -26
- data/node_modules/flat-cache/src/del.js +28 -11
- data/node_modules/flat-cache/src/utils.js +39 -41
- data/node_modules/globals/globals.json +25 -0
- data/node_modules/globals/index.d.ts +2074 -3
- data/node_modules/globals/package.json +10 -7
- data/node_modules/globals/readme.md +2 -14
- data/node_modules/keyv/package.json +4 -4
- data/node_modules/keyv/src/index.js +6 -11
- data/node_modules/npm-check-updates/build/cli.js +22 -21
- data/node_modules/npm-check-updates/build/cli.js.map +1 -1
- data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js +66 -0
- data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js.map +1 -0
- data/node_modules/npm-check-updates/build/index-BmUFwMVL.js +6 -0
- data/node_modules/npm-check-updates/build/index-BmUFwMVL.js.map +1 -0
- data/node_modules/npm-check-updates/build/index.d.ts +5 -2
- data/node_modules/npm-check-updates/build/index.js +560 -1
- data/node_modules/npm-check-updates/build/index.js.map +1 -1
- data/node_modules/npm-check-updates/build/package.json +4 -3
- data/node_modules/npm-check-updates/build/src/index.js +1 -1
- data/node_modules/npm-check-updates/build/src/index.js.map +1 -1
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js +2 -2
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js.map +1 -1
- data/node_modules/npm-check-updates/build/src/package-managers/bun.js +0 -6
- data/node_modules/npm-check-updates/build/src/package-managers/bun.js.map +1 -1
- data/node_modules/npm-check-updates/package.json +4 -3
- data/node_modules/type-fest/index.d.ts +95 -2
- data/node_modules/type-fest/package.json +12 -18
- data/node_modules/type-fest/readme.md +299 -52
- data/node_modules/type-fest/source/async-return-type.d.ts +4 -2
- data/node_modules/type-fest/source/asyncify.d.ts +5 -3
- data/node_modules/type-fest/source/basic.d.ts +21 -43
- data/node_modules/type-fest/{ts41 → source}/camel-case.d.ts +18 -17
- data/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +54 -0
- data/node_modules/type-fest/source/camel-cased-properties.d.ts +36 -0
- data/node_modules/type-fest/source/conditional-except.d.ts +6 -4
- data/node_modules/type-fest/source/conditional-keys.d.ts +5 -1
- data/node_modules/type-fest/source/conditional-pick.d.ts +5 -3
- data/node_modules/type-fest/{ts41 → source}/delimiter-case.d.ts +16 -8
- data/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +60 -0
- data/node_modules/type-fest/source/delimiter-cased-properties.d.ts +37 -0
- data/node_modules/type-fest/source/entries.d.ts +8 -3
- data/node_modules/type-fest/source/entry.d.ts +8 -3
- data/node_modules/type-fest/source/exact.d.ts +73 -0
- data/node_modules/type-fest/source/except.d.ts +38 -3
- data/node_modules/type-fest/source/fixed-length-array.d.ts +6 -1
- data/node_modules/type-fest/source/get.d.ts +184 -0
- data/node_modules/type-fest/source/has-optional-keys.d.ts +21 -0
- data/node_modules/type-fest/source/has-required-keys.d.ts +59 -0
- data/node_modules/type-fest/source/includes.d.ts +22 -0
- data/node_modules/type-fest/source/internal.d.ts +59 -0
- data/node_modules/type-fest/source/invariant-of.d.ts +76 -0
- data/node_modules/type-fest/source/iterable-element.d.ts +8 -0
- data/node_modules/type-fest/source/join.d.ts +30 -0
- data/node_modules/type-fest/source/jsonify.d.ts +90 -0
- data/node_modules/type-fest/{ts41 → source}/kebab-case.d.ts +7 -5
- data/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +47 -0
- data/node_modules/type-fest/source/kebab-cased-properties.d.ts +30 -0
- data/node_modules/type-fest/source/last-array-element.d.ts +28 -0
- data/node_modules/type-fest/source/literal-to-primitive.d.ts +36 -0
- data/node_modules/type-fest/source/literal-union.d.ts +7 -5
- data/node_modules/type-fest/source/merge-exclusive.d.ts +3 -1
- data/node_modules/type-fest/source/merge.d.ts +8 -3
- data/node_modules/type-fest/source/multidimensional-array.d.ts +43 -0
- data/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +47 -0
- data/node_modules/type-fest/source/mutable.d.ts +4 -21
- data/node_modules/type-fest/source/numeric.d.ts +170 -0
- data/node_modules/type-fest/source/observable-like.d.ts +62 -0
- data/node_modules/type-fest/source/opaque.d.ts +45 -3
- data/node_modules/type-fest/source/optional-keys-of.d.ts +38 -0
- data/node_modules/type-fest/source/package-json.d.ts +64 -12
- data/node_modules/type-fest/source/partial-deep.d.ts +57 -16
- data/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +70 -0
- data/node_modules/type-fest/{ts41 → source}/pascal-case.d.ts +6 -4
- data/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +54 -0
- data/node_modules/type-fest/source/pascal-cased-properties.d.ts +34 -0
- data/node_modules/type-fest/source/primitive.d.ts +13 -0
- data/node_modules/type-fest/source/promisable.d.ts +5 -3
- data/node_modules/type-fest/source/promise-value.d.ts +9 -7
- data/node_modules/type-fest/source/readonly-deep.d.ts +33 -7
- data/node_modules/type-fest/source/readonly-tuple.d.ts +41 -0
- data/node_modules/type-fest/source/remove-index-signature.d.ts +104 -0
- data/node_modules/type-fest/source/replace.d.ts +67 -0
- data/node_modules/type-fest/source/require-all-or-none.d.ts +36 -0
- data/node_modules/type-fest/source/require-at-least-one.d.ts +5 -3
- data/node_modules/type-fest/source/require-exactly-one.d.ts +4 -5
- data/node_modules/type-fest/source/required-keys-of.d.ts +29 -0
- data/node_modules/type-fest/source/schema.d.ts +72 -0
- data/node_modules/type-fest/source/screaming-snake-case.d.ts +33 -0
- data/node_modules/type-fest/source/set-non-nullable.d.ts +35 -0
- data/node_modules/type-fest/source/set-optional.d.ts +12 -11
- data/node_modules/type-fest/source/set-required.d.ts +12 -11
- data/node_modules/type-fest/source/set-return-type.d.ts +3 -1
- data/node_modules/type-fest/source/simplify.d.ts +83 -0
- data/node_modules/type-fest/{ts41 → source}/snake-case.d.ts +7 -4
- data/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +47 -0
- data/node_modules/type-fest/source/snake-cased-properties.d.ts +30 -0
- data/node_modules/type-fest/source/split.d.ts +29 -0
- data/node_modules/type-fest/source/spread.d.ts +85 -0
- data/node_modules/type-fest/source/string-key-of.d.ts +25 -0
- data/node_modules/type-fest/source/stringified.d.ts +3 -1
- data/node_modules/type-fest/source/trim.d.ts +25 -0
- data/node_modules/type-fest/source/tsconfig-json.d.ts +316 -14
- data/node_modules/type-fest/source/typed-array.d.ts +17 -0
- data/node_modules/type-fest/source/union-to-intersection.d.ts +4 -2
- data/node_modules/type-fest/source/value-of.d.ts +3 -1
- data/node_modules/type-fest/source/writable.d.ts +40 -0
- data/package.json +2 -2
- metadata +86 -63
- data/linters/rubocop-2.7.6.yml +0 -86
- data/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js +0 -66
- data/node_modules/@humanwhocodes/object-schema/tests/object-schema.js +0 -659
- data/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js +0 -186
- data/node_modules/eslint/conf/config-schema.js +0 -93
- data/node_modules/eslint/lib/cli-engine/formatters/checkstyle.js +0 -60
- data/node_modules/eslint/lib/cli-engine/formatters/compact.js +0 -60
- data/node_modules/eslint/lib/cli-engine/formatters/jslint-xml.js +0 -41
- data/node_modules/eslint/lib/cli-engine/formatters/junit.js +0 -82
- data/node_modules/eslint/lib/cli-engine/formatters/tap.js +0 -95
- data/node_modules/eslint/lib/cli-engine/formatters/unix.js +0 -58
- data/node_modules/eslint/lib/cli-engine/formatters/visualstudio.js +0 -63
- data/node_modules/eslint/lib/cli-engine/xml-escape.js +0 -34
- data/node_modules/eslint/lib/eslint/flat-eslint.js +0 -1155
- data/node_modules/eslint/lib/rule-tester/flat-rule-tester.js +0 -1131
- data/node_modules/eslint/lib/rules/require-jsdoc.js +0 -122
- data/node_modules/eslint/lib/rules/utils/patterns/letters.js +0 -36
- data/node_modules/eslint/lib/rules/valid-jsdoc.js +0 -516
- data/node_modules/eslint/lib/shared/config-validator.js +0 -347
- data/node_modules/eslint/lib/shared/deprecation-warnings.js +0 -58
- data/node_modules/eslint/lib/shared/relative-module-resolver.js +0 -50
- data/node_modules/file-entry-cache/changelog.md +0 -163
- data/node_modules/flat-cache/node_modules/rimraf/CHANGELOG.md +0 -65
- data/node_modules/flat-cache/node_modules/rimraf/LICENSE +0 -15
- data/node_modules/flat-cache/node_modules/rimraf/README.md +0 -101
- data/node_modules/flat-cache/node_modules/rimraf/bin.js +0 -68
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/LICENSE +0 -21
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/README.md +0 -378
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/common.js +0 -238
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/glob.js +0 -790
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +0 -230
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +0 -947
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +0 -33
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/package.json +0 -55
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/sync.js +0 -486
- data/node_modules/flat-cache/node_modules/rimraf/package.json +0 -32
- data/node_modules/flat-cache/node_modules/rimraf/rimraf.js +0 -360
- data/node_modules/npm-check-updates/build/index-CI_x-D21.js +0 -593
- data/node_modules/npm-check-updates/build/index-CI_x-D21.js.map +0 -1
- data/node_modules/npm-check-updates/build/index-Ci8A2QXv.js +0 -6
- data/node_modules/npm-check-updates/build/index-Ci8A2QXv.js.map +0 -1
- data/node_modules/npm-check-updates/build/index-DgVn3Gax.js +0 -36
- data/node_modules/npm-check-updates/build/index-DgVn3Gax.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.js.map +0 -1
- data/node_modules/type-fest/base.d.ts +0 -38
- data/node_modules/type-fest/license +0 -9
- data/node_modules/type-fest/source/utilities.d.ts +0 -3
- data/node_modules/type-fest/ts41/index.d.ts +0 -9
@@ -6,34 +6,101 @@
|
|
6
6
|
<br>
|
7
7
|
<b>A collection of essential TypeScript types</b>
|
8
8
|
<br>
|
9
|
+
<br>
|
10
|
+
<br>
|
11
|
+
<br>
|
12
|
+
<hr>
|
13
|
+
<div align="center">
|
14
|
+
<p>
|
15
|
+
<p>
|
16
|
+
<sup>
|
17
|
+
<a href="https://github.com/sponsors/sindresorhus">Sindre Sorhus' open source work is supported by the community</a>
|
18
|
+
</sup>
|
19
|
+
</p>
|
20
|
+
<sup>Special thanks to:</sup>
|
21
|
+
<br>
|
22
|
+
<br>
|
23
|
+
<a href="https://standardresume.co/tech">
|
24
|
+
<img src="https://sindresorhus.com/assets/thanks/standard-resume-logo.svg" width="180"/>
|
25
|
+
</a>
|
26
|
+
<br>
|
27
|
+
<br>
|
28
|
+
<br>
|
29
|
+
<a href="https://workos.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=type-fest&utm_source=github">
|
30
|
+
<div>
|
31
|
+
<img src="https://sindresorhus.com/assets/thanks/workos-logo-white-bg.svg" width="220" alt="WorkOS">
|
32
|
+
</div>
|
33
|
+
<b>Your app, enterprise-ready.</b>
|
34
|
+
<div>
|
35
|
+
<sub>Start selling to enterprise customers with just a few lines of code.</sub>
|
36
|
+
<br>
|
37
|
+
<sup>Add Single Sign-On (and more) in minutes instead of months.</sup>
|
38
|
+
</div>
|
39
|
+
</a>
|
40
|
+
<br>
|
41
|
+
<br>
|
42
|
+
<br>
|
43
|
+
<a href="https://www.useanvil.com/?utm_source=sindresorhus#gh-light-mode-only">
|
44
|
+
<div>
|
45
|
+
<img src="https://sindresorhus.com/assets/thanks/anvil-logo-light.svg" width="200" alt="Anvil">
|
46
|
+
</div>
|
47
|
+
<br>
|
48
|
+
<b>Paperwork that makes the data work.</b>
|
49
|
+
<div>
|
50
|
+
<sub>
|
51
|
+
Easy APIs for paperwork. PDF generation, e-signature and embeddable no-code webforms.
|
52
|
+
<br>
|
53
|
+
The easiest way to build paperwork automation into your product.
|
54
|
+
</sub>
|
55
|
+
</div>
|
56
|
+
</a>
|
57
|
+
<a href="https://www.useanvil.com/?utm_source=sindresorhus#gh-dark-mode-only">
|
58
|
+
<div>
|
59
|
+
<img src="https://sindresorhus.com/assets/thanks/anvil-logo-dark.svg" width="200" alt="Anvil">
|
60
|
+
</div>
|
61
|
+
<br>
|
62
|
+
<b>Paperwork that makes the data work.</b>
|
63
|
+
<div>
|
64
|
+
<sub>
|
65
|
+
Easy APIs for paperwork. PDF generation, e-signature and embeddable no-code webforms.
|
66
|
+
<br>
|
67
|
+
The easiest way to build paperwork automation into your product.
|
68
|
+
</sub>
|
69
|
+
</div>
|
70
|
+
</a>
|
71
|
+
</p>
|
72
|
+
</div>
|
73
|
+
<br>
|
9
74
|
<hr>
|
10
75
|
</div>
|
11
76
|
<br>
|
12
77
|
<br>
|
13
78
|
|
14
79
|
[![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://giphy.com/gifs/illustration-rainbow-unicorn-26AHG5KGFxSkUWw1i)
|
15
|
-
|
16
|
-
[![npm
|
17
|
-
|
80
|
+
[![npm dependents](https://badgen.net/npm/dependents/type-fest)](https://www.npmjs.com/package/type-fest?activeTab=dependents)
|
81
|
+
[![npm downloads](https://badgen.net/npm/dt/type-fest)](https://www.npmjs.com/package/type-fest)
|
82
|
+
[![Docs](https://paka.dev/badges/v0/cute.svg)](https://paka.dev/npm/type-fest)
|
18
83
|
|
19
|
-
Many of the types here should have been built-in. You can help by suggesting some of them to the [TypeScript project](https://github.com/Microsoft/TypeScript/blob/
|
84
|
+
Many of the types here should have been built-in. You can help by suggesting some of them to the [TypeScript project](https://github.com/Microsoft/TypeScript/blob/main/CONTRIBUTING.md).
|
20
85
|
|
21
86
|
Either add this package as a dependency or copy-paste the needed types. No credit required. 👌
|
22
87
|
|
23
88
|
PR welcome for additional commonly needed types and docs improvements. Read the [contributing guidelines](.github/contributing.md) first.
|
24
89
|
|
90
|
+
**Help wanted with reviewing [proposals](https://github.com/sindresorhus/type-fest/issues) and [pull requests](https://github.com/sindresorhus/type-fest/pulls).**
|
91
|
+
|
25
92
|
## Install
|
26
93
|
|
27
|
-
```
|
28
|
-
|
94
|
+
```sh
|
95
|
+
npm install type-fest
|
29
96
|
```
|
30
97
|
|
31
|
-
*Requires TypeScript >=
|
98
|
+
*Requires TypeScript >=4.2*
|
32
99
|
|
33
100
|
## Usage
|
34
101
|
|
35
102
|
```ts
|
36
|
-
import {Except} from 'type-fest';
|
103
|
+
import type {Except} from 'type-fest';
|
37
104
|
|
38
105
|
type Foo = {
|
39
106
|
unicorn: string;
|
@@ -50,75 +117,171 @@ Click the type names for complete docs.
|
|
50
117
|
|
51
118
|
### Basic
|
52
119
|
|
53
|
-
- [`Primitive`](source/
|
54
|
-
- [`Class`](source/basic.d.ts) - Matches a [`class`
|
55
|
-
- [`
|
56
|
-
- [`
|
57
|
-
- [`
|
58
|
-
- [`JsonValue`](source/basic.d.ts) - Matches any valid JSON value.
|
59
|
-
- [`ObservableLike`](source/basic.d.ts) - Matches a value that is like an [Observable](https://github.com/tc39/proposal-observable).
|
120
|
+
- [`Primitive`](source/primitive.d.ts) - Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
121
|
+
- [`Class`](source/basic.d.ts) - Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
|
122
|
+
- [`Constructor`](source/basic.d.ts) - Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
|
123
|
+
- [`TypedArray`](source/typed-array.d.ts) - Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
|
124
|
+
- [`ObservableLike`](source/observable-like.d.ts) - Matches a value that is like an [Observable](https://github.com/tc39/proposal-observable).
|
60
125
|
|
61
126
|
### Utilities
|
62
127
|
|
63
|
-
- [`Except`](source/except.d.ts) - Create a type from an object type without certain keys. This is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/
|
64
|
-
- [`
|
128
|
+
- [`Except`](source/except.d.ts) - Create a type from an object type without certain keys. This is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys).
|
129
|
+
- [`Writable`](source/writable.d.ts) - Create a type that strips `readonly` from all or some of an object's keys. The inverse of `Readonly<T>`. Formerly named `Mutable`.
|
65
130
|
- [`Merge`](source/merge.d.ts) - Merge two types into a new type. Keys of the second type overrides keys of the first type.
|
66
131
|
- [`MergeExclusive`](source/merge-exclusive.d.ts) - Create a type that has mutually exclusive keys.
|
67
132
|
- [`RequireAtLeastOne`](source/require-at-least-one.d.ts) - Create a type that requires at least one of the given keys.
|
68
133
|
- [`RequireExactlyOne`](source/require-exactly-one.d.ts) - Create a type that requires exactly a single key of the given keys and disallows more.
|
69
|
-
- [`
|
70
|
-
- [`
|
134
|
+
- [`RequireAllOrNone`](source/require-all-or-none.d.ts) - Create a type that requires all of the given keys or none of the given keys.
|
135
|
+
- [`RemoveIndexSignature`](source/remove-index-signature.d.ts) - Create a type that only has explicitly defined properties, absent of any index signatures.
|
136
|
+
- [`PartialDeep`](source/partial-deep.d.ts) - Create a deeply optional version of another type. Use [`Partial<T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype) if you only need one level deep.
|
137
|
+
- [`PartialOnUndefinedDeep`](source/partial-on-undefined-deep.d.ts) - Create a deep version of another type where all keys accepting `undefined` type are set to optional.
|
138
|
+
- [`ReadonlyDeep`](source/readonly-deep.d.ts) - Create a deeply immutable version of an `object`/`Map`/`Set`/`Array` type. Use [`Readonly<T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#readonlytype) if you only need one level deep.
|
71
139
|
- [`LiteralUnion`](source/literal-union.d.ts) - Create a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union. Workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729).
|
72
|
-
- [`Promisable`](source/promisable.d.ts) - Create a type that represents either the value or the value wrapped in `PromiseLike`.
|
73
140
|
- [`Opaque`](source/opaque.d.ts) - Create an [opaque type](https://codemix.com/opaque-types-in-javascript/).
|
141
|
+
- [`UnwrapOpaque`](source/opaque.d.ts) - Revert an [opaque type](https://codemix.com/opaque-types-in-javascript/) back to its original type.
|
142
|
+
- [`InvariantOf`](source/invariant-of.d.ts) - Create an [invariant type](https://basarat.gitbook.io/typescript/type-system/type-compatibility#footnote-invariance), which is a type that does not accept supertypes and subtypes.
|
74
143
|
- [`SetOptional`](source/set-optional.d.ts) - Create a type that makes the given keys optional.
|
75
144
|
- [`SetRequired`](source/set-required.d.ts) - Create a type that makes the given keys required.
|
145
|
+
- [`SetNonNullable`](source/set-non-nullable.d.ts) - Create a type that makes the given keys non-nullable.
|
76
146
|
- [`ValueOf`](source/value-of.d.ts) - Create a union of the given object's values, and optionally specify which keys to get the values from.
|
77
|
-
- [`PromiseValue`](source/promise-value.d.ts) - Returns the type that is wrapped inside a `Promise`.
|
78
|
-
- [`AsyncReturnType`](source/async-return-type.d.ts) - Unwrap the return type of a function that returns a `Promise`.
|
79
147
|
- [`ConditionalKeys`](source/conditional-keys.d.ts) - Extract keys from a shape where values extend the given `Condition` type.
|
80
148
|
- [`ConditionalPick`](source/conditional-pick.d.ts) - Like `Pick` except it selects properties from a shape where the values extend the given `Condition` type.
|
81
149
|
- [`ConditionalExcept`](source/conditional-except.d.ts) - Like `Omit` except it removes properties from a shape where the values extend the given `Condition` type.
|
82
150
|
- [`UnionToIntersection`](source/union-to-intersection.d.ts) - Convert a union type to an intersection type.
|
151
|
+
- [`LiteralToPrimitive`](source/literal-to-primitive.d.ts) - Convert a [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types) to the [primitive type](source/primitive.d.ts) it belongs to.
|
83
152
|
- [`Stringified`](source/stringified.d.ts) - Create a type with the keys of the given type changed to `string` type.
|
84
|
-
- [`FixedLengthArray`](source/fixed-length-array.d.ts) - Create a type that represents an array of the given type and length.
|
85
153
|
- [`IterableElement`](source/iterable-element.d.ts) - Get the element type of an `Iterable`/`AsyncIterable`. For example, an array or a generator.
|
86
154
|
- [`Entry`](source/entry.d.ts) - Create a type that represents the type of an entry of a collection.
|
87
155
|
- [`Entries`](source/entries.d.ts) - Create a type that represents the type of the entries of a collection.
|
88
156
|
- [`SetReturnType`](source/set-return-type.d.ts) - Create a function type with a return type of your choice and the same parameters as the given function type.
|
157
|
+
- [`Simplify`](source/simplify.d.ts) - Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
|
158
|
+
- [`Get`](source/get.d.ts) - Get a deeply-nested property from an object using a key path, like [Lodash's `.get()`](https://lodash.com/docs/latest#get) function.
|
159
|
+
- [`StringKeyOf`](source/string-key-of.d.ts) - Get keys of the given type as strings.
|
160
|
+
- [`Schema`](source/schema.d.ts) - Create a deep version of another object type where property values are recursively replaced into a given value type.
|
161
|
+
- [`Exact`](source/exact.d.ts) - Create a type that does not allow extra properties.
|
162
|
+
- [`OptionalKeysOf`](source/optional-keys-of.d.ts) - Extract all optional keys from the given type.
|
163
|
+
- [`HasOptionalKeys`](source/has-optional-keys.d.ts) - Create a `true`/`false` type depending on whether the given type has any optional fields.
|
164
|
+
- [`RequiredKeysOf`](source/required-keys-of.d.ts) - Extract all required keys from the given type.
|
165
|
+
- [`HasRequiredKeys`](source/has-required-keys.d.ts) - Create a `true`/`false` type depending on whether the given type has any required fields.
|
166
|
+
- [`Spread`](source/spread.d.ts) - Mimic the type inferred by TypeScript when merging two objects or two arrays/tuples using the spread syntax.
|
167
|
+
|
168
|
+
### JSON
|
169
|
+
|
170
|
+
- [`Jsonify`](source/jsonify.d.ts) - Transform a type to one that is assignable to the `JsonValue` type.
|
171
|
+
- [`JsonPrimitive`](source/basic.d.ts) - Matches a JSON primitive.
|
172
|
+
- [`JsonObject`](source/basic.d.ts) - Matches a JSON object.
|
173
|
+
- [`JsonArray`](source/basic.d.ts) - Matches a JSON array.
|
174
|
+
- [`JsonValue`](source/basic.d.ts) - Matches any valid JSON value.
|
175
|
+
|
176
|
+
### Async
|
177
|
+
|
178
|
+
- [`Promisable`](source/promisable.d.ts) - Create a type that represents either the value or the value wrapped in `PromiseLike`.
|
179
|
+
- [`AsyncReturnType`](source/async-return-type.d.ts) - Unwrap the return type of a function that returns a `Promise`.
|
89
180
|
- [`Asyncify`](source/asyncify.d.ts) - Create an async version of the given function type.
|
90
181
|
|
91
|
-
###
|
182
|
+
### String
|
183
|
+
|
184
|
+
- [`Trim`](source/trim.d.ts) - Remove leading and trailing spaces from a string.
|
185
|
+
- [`Split`](source/split.d.ts) - Represents an array of strings split using a given character or character set.
|
186
|
+
- [`Replace`](source/replace.d.ts) - Represents a string with some or all matches replaced by a replacement.
|
92
187
|
|
93
|
-
|
188
|
+
### Array
|
94
189
|
|
95
|
-
- [`
|
96
|
-
- [`
|
97
|
-
- [`
|
98
|
-
- [`
|
99
|
-
- [`
|
190
|
+
- [`Includes`](source/includes.d.ts) - Returns a boolean for whether the given array includes the given item.
|
191
|
+
- [`Join`](source/join.d.ts) - Join an array of strings and/or numbers using the given string as a delimiter.
|
192
|
+
- [`LastArrayElement`](source/last-array-element.d.ts) - Extracts the type of the last element of an array.
|
193
|
+
- [`FixedLengthArray`](source/fixed-length-array.d.ts) - Create a type that represents an array of the given type and length.
|
194
|
+
- [`MultidimensionalArray`](source/multidimensional-array.d.ts) - Create a type that represents a multidimensional array of the given type and dimensions.
|
195
|
+
- [`MultidimensionalReadonlyArray`](source/multidimensional-readonly-array.d.ts) - Create a type that represents a multidimensional readonly array of the given type and dimensions.
|
196
|
+
- [`ReadonlyTuple`](source/readonly-tuple.d.ts) - Create a type that represents a read-only tuple of the given type and length.
|
197
|
+
|
198
|
+
### Numeric
|
199
|
+
|
200
|
+
- [`PositiveInfinity`](source/numeric.d.ts) - Matches the hidden `Infinity` type.
|
201
|
+
- [`NegativeInfinity`](source/numeric.d.ts) - Matches the hidden `-Infinity` type.
|
202
|
+
- [`Finite`](source/numeric.d.ts) - A finite `number`.
|
203
|
+
- [`Integer`](source/numeric.d.ts) - A `number` that is an integer.
|
204
|
+
- [`Float`](source/numeric.d.ts) - A `number` that is not an integer.
|
205
|
+
- [`NegativeFloat`](source/numeric.d.ts) - A negative (`-∞ < x < 0`) `number` that is not an integer.
|
206
|
+
- [`Negative`](source/numeric.d.ts) - A negative `number`/`bigint` (`-∞ < x < 0`)
|
207
|
+
- [`NonNegative`](source/numeric.d.ts) - A non-negative `number`/`bigint` (`0 <= x < ∞`).
|
208
|
+
- [`NegativeInteger`](source/numeric.d.ts) - A negative (`-∞ < x < 0`) `number` that is an integer.
|
209
|
+
- [`NonNegativeInteger`](source/numeric.d.ts) - A non-negative (`0 <= x < ∞`) `number` that is an integer.
|
210
|
+
|
211
|
+
### Change case
|
212
|
+
|
213
|
+
- [`CamelCase`](source/camel-case.d.ts) - Convert a string literal to camel-case (`fooBar`).
|
214
|
+
- [`CamelCasedProperties`](source/camel-cased-properties.d.ts) - Convert object properties to camel-case (`fooBar`).
|
215
|
+
- [`CamelCasedPropertiesDeep`](source/camel-cased-properties-deep.d.ts) - Convert object properties to camel-case recursively (`fooBar`).
|
216
|
+
- [`KebabCase`](source/kebab-case.d.ts) - Convert a string literal to kebab-case (`foo-bar`).
|
217
|
+
- [`KebabCasedProperties`](source/kebab-cased-properties.d.ts) - Convert a object properties to kebab-case recursively (`foo-bar`).
|
218
|
+
- [`KebabCasedPropertiesDeep`](source/kebab-cased-properties-deep.d.ts) - Convert object properties to kebab-case (`foo-bar`).
|
219
|
+
- [`PascalCase`](source/pascal-case.d.ts) - Converts a string literal to pascal-case (`FooBar`)
|
220
|
+
- [`PascalCasedProperties`](source/pascal-cased-properties.d.ts) - Converts object properties to pascal-case (`FooBar`)
|
221
|
+
- [`PascalCasedPropertiesDeep`](source/pascal-cased-properties-deep.d.ts) - Converts object properties to pascal-case (`FooBar`)
|
222
|
+
- [`SnakeCase`](source/snake-case.d.ts) - Convert a string literal to snake-case (`foo_bar`).
|
223
|
+
- [`SnakeCasedProperties`](source/snake-cased-properties-deep.d.ts) - Convert object properties to snake-case (`foo_bar`).
|
224
|
+
- [`SnakeCasedPropertiesDeep`](source/snake-cased-properties-deep.d.ts) - Convert object properties to snake-case recursively (`foo_bar`).
|
225
|
+
- [`ScreamingSnakeCase`](source/screaming-snake-case.d.ts) - Convert a string literal to screaming-snake-case (`FOO_BAR`).
|
226
|
+
- [`DelimiterCase`](source/delimiter-case.d.ts) - Convert a string literal to a custom string delimiter casing.
|
227
|
+
- [`DelimiterCasedProperties`](source/delimiter-cased-properties.d.ts) - Convert object properties to a custom string delimiter casing.
|
228
|
+
- [`DelimiterCasedPropertiesDeep`](source/delimiter-cased-properties-deep.d.ts) - Convert object properties to a custom string delimiter casing recursively.
|
100
229
|
|
101
230
|
### Miscellaneous
|
102
231
|
|
103
|
-
- [`PackageJson`](source/package-json.d.ts) - Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file).
|
104
|
-
- [`TsConfigJson`](source/tsconfig-json.d.ts) - Type for [TypeScript's `tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) (TypeScript
|
232
|
+
- [`PackageJson`](source/package-json.d.ts) - Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). It also includes support for [TypeScript Declaration Files](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) and [Yarn Workspaces](https://classic.yarnpkg.com/lang/en/docs/workspaces/).
|
233
|
+
- [`TsConfigJson`](source/tsconfig-json.d.ts) - Type for [TypeScript's `tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) (TypeScript 4.4).
|
105
234
|
|
106
235
|
## Declined types
|
107
236
|
|
108
237
|
*If we decline a type addition, we will make sure to document the better solution here.*
|
109
238
|
|
110
|
-
- [`Diff` and `Spread`](https://github.com/sindresorhus/type-fest/pull/7) - The
|
111
|
-
- [`Dictionary`](https://github.com/sindresorhus/type-fest/issues/33) - You only save a few characters (`Dictionary<number>` vs `Record<string, number>`) from [`Record`](https://
|
112
|
-
- [`SubType`](https://github.com/sindresorhus/type-fest/issues/22) - The type is powerful, but lacks good use-cases and is prone to misuse.
|
239
|
+
- [`Diff` and `Spread`](https://github.com/sindresorhus/type-fest/pull/7) - The pull request author didn't provide any real-world use-cases and the PR went stale. If you think this type is useful, provide some real-world use-cases and we might reconsider.
|
240
|
+
- [`Dictionary`](https://github.com/sindresorhus/type-fest/issues/33) - You only save a few characters (`Dictionary<number>` vs `Record<string, number>`) from [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type), which is more flexible and well-known. Also, you shouldn't use an object as a dictionary. We have `Map` in JavaScript now.
|
113
241
|
- [`ExtractProperties` and `ExtractMethods`](https://github.com/sindresorhus/type-fest/pull/4) - The types violate the single responsibility principle. Instead, refine your types into more granular type hierarchies.
|
242
|
+
- [`Url2Json`](https://github.com/sindresorhus/type-fest/pull/262) - Inferring search parameters from a URL string is a cute idea, but not very useful in practice, since search parameters are usually dynamic and defined separately.
|
243
|
+
- [`Nullish`](https://github.com/sindresorhus/type-fest/pull/318) - The type only saves a couple of characters, not everyone knows what "nullish" means, and I'm also trying to [get away from `null`](https://github.com/sindresorhus/meta/discussions/7).
|
244
|
+
- [`TitleCase`](https://github.com/sindresorhus/type-fest/pull/303) - It's not solving a common need and is a better fit for a separate package.
|
245
|
+
- [`ExtendOr` and `ExtendAnd`](https://github.com/sindresorhus/type-fest/pull/247) - The benefits don't outweigh having to learn what they mean.
|
246
|
+
- [`PackageJsonExtras`](https://github.com/sindresorhus/type-fest/issues/371) - There are too many possible configurations that can be put into `package.json`. If you would like to extend `PackageJson` to support an additional configuration in your project, please see the *Extending existing types* section below.
|
247
|
+
|
248
|
+
## Alternative type names
|
249
|
+
|
250
|
+
*If you know one of our types by a different name, add it here for discovery.*
|
251
|
+
|
252
|
+
- `PartialBy` - See [`SetOptional`](https://github.com/sindresorhus/type-fest/blob/main/source/set-optional.d.ts)
|
253
|
+
- `RecordDeep`- See [`Schema`](https://github.com/sindresorhus/type-fest/blob/main/source/schema.d.ts)
|
114
254
|
|
115
255
|
## Tips
|
116
256
|
|
257
|
+
### Extending existing types
|
258
|
+
|
259
|
+
- [`PackageJson`](source/package-json.d.ts) - There are a lot of tools that place extra configurations inside the `package.json` file. You can extend `PackageJson` to support these additional configurations.
|
260
|
+
<details>
|
261
|
+
<summary>
|
262
|
+
Example
|
263
|
+
</summary>
|
264
|
+
|
265
|
+
[Playground](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBDAnmApnA3gBQIYGMDW2A5igFIDOEAdnNuXAEJ0o4HFmVUC+cAZlBBBwA5ElQBaXinIxhAbgCwAKFCRYCZGnQAZYFRgooPfoJHSANntmKlysWlaESFanAC8jZo-YuaAMgwLKwBhal5gIgB+AC44XX1DADpQqnCiLhsgA)
|
266
|
+
|
267
|
+
```ts
|
268
|
+
import type {PackageJson as BasePackageJson} from 'type-fest';
|
269
|
+
import type {Linter} from 'eslint';
|
270
|
+
|
271
|
+
type PackageJson = BasePackageJson & {eslintConfig?: Linter.Config};
|
272
|
+
```
|
273
|
+
</details>
|
274
|
+
|
275
|
+
### Related
|
276
|
+
|
277
|
+
- [typed-query-selector](https://github.com/g-plane/typed-query-selector) - Enhances `document.querySelector` and `document.querySelectorAll` with a template literal type that matches element types returned from an HTML element query selector.
|
278
|
+
- [`Linter.Config`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/eslint/index.d.ts) - Definitions for the [ESLint configuration schema](https://eslint.org/docs/user-guide/configuring/language-options).
|
279
|
+
|
117
280
|
### Built-in types
|
118
281
|
|
119
282
|
There are many advanced types most users don't know about.
|
120
283
|
|
121
|
-
- [`Partial<T>`](https://
|
284
|
+
- [`Partial<T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype) - Make all properties in `T` optional.
|
122
285
|
<details>
|
123
286
|
<summary>
|
124
287
|
Example
|
@@ -165,7 +328,7 @@ There are many advanced types most users don't know about.
|
|
165
328
|
```
|
166
329
|
</details>
|
167
330
|
|
168
|
-
- [`Required<T>`](https://
|
331
|
+
- [`Required<T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#requiredtype) - Make all properties in `T` required.
|
169
332
|
<details>
|
170
333
|
<summary>
|
171
334
|
Example
|
@@ -195,7 +358,7 @@ There are many advanced types most users don't know about.
|
|
195
358
|
```
|
196
359
|
</details>
|
197
360
|
|
198
|
-
- [`Readonly<T>`](https://
|
361
|
+
- [`Readonly<T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#readonlytype) - Make all properties in `T` readonly.
|
199
362
|
<details>
|
200
363
|
<summary>
|
201
364
|
Example
|
@@ -240,7 +403,7 @@ There are many advanced types most users don't know about.
|
|
240
403
|
```
|
241
404
|
</details>
|
242
405
|
|
243
|
-
- [`Pick<T, K>`](https://
|
406
|
+
- [`Pick<T, K>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys) - From `T`, pick a set of properties whose keys are in the union `K`.
|
244
407
|
<details>
|
245
408
|
<summary>
|
246
409
|
Example
|
@@ -280,7 +443,7 @@ There are many advanced types most users don't know about.
|
|
280
443
|
```
|
281
444
|
</details>
|
282
445
|
|
283
|
-
- [`Record<K, T>`](https://
|
446
|
+
- [`Record<K, T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type) - Construct a type with a set of properties `K` of type `T`.
|
284
447
|
<details>
|
285
448
|
<summary>
|
286
449
|
Example
|
@@ -323,7 +486,7 @@ There are many advanced types most users don't know about.
|
|
323
486
|
```
|
324
487
|
</details>
|
325
488
|
|
326
|
-
- [`Exclude<T, U>`](https://
|
489
|
+
- [`Exclude<T, U>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#excludetype-excludedunion) - Exclude from `T` those types that are assignable to `U`.
|
327
490
|
<details>
|
328
491
|
<summary>
|
329
492
|
Example
|
@@ -357,7 +520,7 @@ There are many advanced types most users don't know about.
|
|
357
520
|
```
|
358
521
|
</details>
|
359
522
|
|
360
|
-
- [`Extract<T, U>`](https://
|
523
|
+
- [`Extract<T, U>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#extracttype-union) - Extract from `T` those types that are assignable to `U`.
|
361
524
|
<details>
|
362
525
|
<summary>
|
363
526
|
Example
|
@@ -400,12 +563,12 @@ There are many advanced types most users don't know about.
|
|
400
563
|
```
|
401
564
|
</details>
|
402
565
|
|
403
|
-
- [`NonNullable<T>`](https://
|
566
|
+
- [`NonNullable<T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#nonnullabletype) - Exclude `null` and `undefined` from `T`.
|
404
567
|
<details>
|
405
568
|
<summary>
|
406
569
|
Example
|
407
570
|
</summary>
|
408
|
-
Works with <code>strictNullChecks</code> set to <code>true</code>.
|
571
|
+
Works with <a href="https://www.typescriptlang.org/tsconfig#strictNullChecks"><code>strictNullChecks</code></a> set to <code>true</code>.
|
409
572
|
|
410
573
|
[Playground](https://typescript-play.js.org/?target=6#code/C4TwDgpgBACg9gJ2AOQK4FsBGEFQLxQDOwCAlgHYDmUAPlORtrnQwDasDcAUFwPQBU-WAEMkUOADMowqAGNWwwoSgATCBIqlgpOOSjAAFsOBRSy1IQgr9cKJlSlW1mZYQA3HFH68u8xcoBlHA8EACEHJ08Aby4oKDBUTFZSWXjEFEYcAEIALihkXTR2YSSIAB54JDQsHAA+blj4xOTUsHSACkMzPKD3HHDHNQQAGjSkPMqMmoQASh7g-oihqBi4uNIpdraxPAI2VhmVxrX9AzMAOm2ppnwoAA4ABifuE4BfKAhWSyOTuK7CS7pao3AhXF5rV48E4ICDAVAIPT-cGQyG+XTEIgLMJLTx7CAAdygvRCA0iCHaMwarhJOIQjUBSHaACJHk8mYdeLwxtdcVAAOSsh58+lXdr7Dlcq7A3n3J4PEUdADMcspUE53OluAIUGVTx46oAKuAIAFZGQwCYAKIIBCILjUxaDHAMnla+iodjcIA)
|
411
574
|
|
@@ -439,7 +602,7 @@ There are many advanced types most users don't know about.
|
|
439
602
|
```
|
440
603
|
</details>
|
441
604
|
|
442
|
-
- [`Parameters<T>`](https://
|
605
|
+
- [`Parameters<T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#parameterstype) - Obtain the parameters of a function type in a tuple.
|
443
606
|
<details>
|
444
607
|
<summary>
|
445
608
|
Example
|
@@ -467,7 +630,7 @@ There are many advanced types most users don't know about.
|
|
467
630
|
```
|
468
631
|
</details>
|
469
632
|
|
470
|
-
- [`ConstructorParameters<T>`](https://
|
633
|
+
- [`ConstructorParameters<T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#constructorparameterstype) - Obtain the parameters of a constructor function type in a tuple.
|
471
634
|
<details>
|
472
635
|
<summary>
|
473
636
|
Example
|
@@ -515,7 +678,7 @@ There are many advanced types most users don't know about.
|
|
515
678
|
```
|
516
679
|
</details>
|
517
680
|
|
518
|
-
- [`ReturnType<T>`](https://
|
681
|
+
- [`ReturnType<T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#returntypetype) - Obtain the return type of a function type.
|
519
682
|
<details>
|
520
683
|
<summary>
|
521
684
|
Example
|
@@ -550,7 +713,7 @@ There are many advanced types most users don't know about.
|
|
550
713
|
```
|
551
714
|
</details>
|
552
715
|
|
553
|
-
- [`InstanceType<T>`](https://
|
716
|
+
- [`InstanceType<T>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#instancetypetype) - Obtain the instance type of a constructor function type.
|
554
717
|
<details>
|
555
718
|
<summary>
|
556
719
|
Example
|
@@ -603,7 +766,7 @@ There are many advanced types most users don't know about.
|
|
603
766
|
```
|
604
767
|
</details>
|
605
768
|
|
606
|
-
- [`Omit<T, K>`](https://
|
769
|
+
- [`Omit<T, K>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys) - Constructs a type by picking all properties from T and then removing K.
|
607
770
|
<details>
|
608
771
|
<summary>
|
609
772
|
Example
|
@@ -625,14 +788,98 @@ There are many advanced types most users don't know about.
|
|
625
788
|
type AnimalShortInfo = Omit<Animal, 'images' | 'paragraphs'>;
|
626
789
|
|
627
790
|
function renderAnimalHoverInfo (animals: AnimalShortInfo[]): HTMLElement {
|
628
|
-
const container =
|
791
|
+
const container = document.createElement('div');
|
629
792
|
// Internal implementation.
|
630
793
|
return container;
|
631
794
|
}
|
632
795
|
```
|
633
796
|
</details>
|
634
797
|
|
635
|
-
|
798
|
+
- [`Uppercase<S extends string>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#uppercasestringtype) - Transforms every character in a string into uppercase.
|
799
|
+
<details>
|
800
|
+
<summary>
|
801
|
+
Example
|
802
|
+
</summary>
|
803
|
+
|
804
|
+
```ts
|
805
|
+
type T = Uppercase<'hello'>; // 'HELLO'
|
806
|
+
|
807
|
+
type T2 = Uppercase<'foo' | 'bar'>; // 'FOO' | 'BAR'
|
808
|
+
|
809
|
+
type T3<S extends string> = Uppercase<`aB${S}`>;
|
810
|
+
type T4 = T3<'xYz'>; // 'ABXYZ'
|
811
|
+
|
812
|
+
type T5 = Uppercase<string>; // string
|
813
|
+
type T6 = Uppercase<any>; // any
|
814
|
+
type T7 = Uppercase<never>; // never
|
815
|
+
type T8 = Uppercase<42>; // Error, type 'number' does not satisfy the constraint 'string'
|
816
|
+
```
|
817
|
+
</details>
|
818
|
+
|
819
|
+
- [`Lowercase<S extends string>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#lowercasestringtype) - Transforms every character in a string into lowercase.
|
820
|
+
<details>
|
821
|
+
<summary>
|
822
|
+
Example
|
823
|
+
</summary>
|
824
|
+
|
825
|
+
```ts
|
826
|
+
type T = Lowercase<'HELLO'>; // 'hello'
|
827
|
+
|
828
|
+
type T2 = Lowercase<'FOO' | 'BAR'>; // 'foo' | 'bar'
|
829
|
+
|
830
|
+
type T3<S extends string> = Lowercase<`aB${S}`>;
|
831
|
+
type T4 = T3<'xYz'>; // 'abxyz'
|
832
|
+
|
833
|
+
type T5 = Lowercase<string>; // string
|
834
|
+
type T6 = Lowercase<any>; // any
|
835
|
+
type T7 = Lowercase<never>; // never
|
836
|
+
type T8 = Lowercase<42>; // Error, type 'number' does not satisfy the constraint 'string'
|
837
|
+
```
|
838
|
+
</details>
|
839
|
+
|
840
|
+
- [`Capitalize<S extends string>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#capitalizestringtype) - Transforms the first character in a string into uppercase.
|
841
|
+
<details>
|
842
|
+
<summary>
|
843
|
+
Example
|
844
|
+
</summary>
|
845
|
+
|
846
|
+
```ts
|
847
|
+
type T = Capitalize<'hello'>; // 'Hello'
|
848
|
+
|
849
|
+
type T2 = Capitalize<'foo' | 'bar'>; // 'Foo' | 'Bar'
|
850
|
+
|
851
|
+
type T3<S extends string> = Capitalize<`aB${S}`>;
|
852
|
+
type T4 = T3<'xYz'>; // 'ABxYz'
|
853
|
+
|
854
|
+
type T5 = Capitalize<string>; // string
|
855
|
+
type T6 = Capitalize<any>; // any
|
856
|
+
type T7 = Capitalize<never>; // never
|
857
|
+
type T8 = Capitalize<42>; // Error, type 'number' does not satisfy the constraint 'string'
|
858
|
+
```
|
859
|
+
</details>
|
860
|
+
|
861
|
+
- [`Uncapitalize<S extends string>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#uncapitalizestringtype) - Transforms the first character in a string into lowercase.
|
862
|
+
<details>
|
863
|
+
<summary>
|
864
|
+
Example
|
865
|
+
</summary>
|
866
|
+
|
867
|
+
```ts
|
868
|
+
type T = Uncapitalize<'Hello'>; // 'hello'
|
869
|
+
|
870
|
+
type T2 = Uncapitalize<'Foo' | 'Bar'>; // 'foo' | 'bar'
|
871
|
+
|
872
|
+
type T3<S extends string> = Uncapitalize<`AB${S}`>;
|
873
|
+
type T4 = T3<'xYz'>; // 'aBxYz'
|
874
|
+
|
875
|
+
type T5 = Uncapitalize<string>; // string
|
876
|
+
type T6 = Uncapitalize<any>; // any
|
877
|
+
type T7 = Uncapitalize<never>; // never
|
878
|
+
type T8 = Uncapitalize<42>; // Error, type 'number' does not satisfy the constraint 'string'
|
879
|
+
```
|
880
|
+
</details>
|
881
|
+
|
882
|
+
You can find some examples in the [TypeScript docs](https://www.typescriptlang.org/docs/handbook/utility-types.html).
|
636
883
|
|
637
884
|
## Maintainers
|
638
885
|
|
@@ -643,7 +890,7 @@ You can find some examples in the [TypeScript docs](https://www.typescriptlang.o
|
|
643
890
|
|
644
891
|
## License
|
645
892
|
|
646
|
-
(MIT OR CC0-1.0)
|
893
|
+
SPDX-License-Identifier: (MIT OR CC0-1.0)
|
647
894
|
|
648
895
|
---
|
649
896
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {PromiseValue} from './promise-value';
|
1
|
+
import type {PromiseValue} from './promise-value';
|
2
2
|
|
3
3
|
type AsyncFunction = (...args: any[]) => Promise<unknown>;
|
4
4
|
|
@@ -9,7 +9,7 @@ There has been [discussion](https://github.com/microsoft/TypeScript/pull/35998)
|
|
9
9
|
|
10
10
|
@example
|
11
11
|
```ts
|
12
|
-
import {AsyncReturnType} from 'type-fest';
|
12
|
+
import type {AsyncReturnType} from 'type-fest';
|
13
13
|
import {asyncFunction} from 'api';
|
14
14
|
|
15
15
|
// This type resolves to the unwrapped return type of `asyncFunction`.
|
@@ -19,5 +19,7 @@ async function doSomething(value: Value) {}
|
|
19
19
|
|
20
20
|
asyncFunction().then(value => doSomething(value));
|
21
21
|
```
|
22
|
+
|
23
|
+
@category Async
|
22
24
|
*/
|
23
25
|
export type AsyncReturnType<Target extends AsyncFunction> = PromiseValue<ReturnType<Target>>;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {PromiseValue} from './promise-value';
|
2
|
-
import {SetReturnType} from './set-return-type';
|
1
|
+
import type {PromiseValue} from './promise-value';
|
2
|
+
import type {SetReturnType} from './set-return-type';
|
3
3
|
|
4
4
|
/**
|
5
5
|
Create an async version of the given function type, by boxing the return type in `Promise` while keeping the same parameter types.
|
@@ -8,7 +8,7 @@ Use-case: You have two functions, one synchronous and one asynchronous that do t
|
|
8
8
|
|
9
9
|
@example
|
10
10
|
```
|
11
|
-
import {Asyncify} from 'type-fest';
|
11
|
+
import type {Asyncify} from 'type-fest';
|
12
12
|
|
13
13
|
// Synchronous function.
|
14
14
|
function getFooSync(someArg: SomeType): Foo {
|
@@ -27,5 +27,7 @@ const getFooAsync: AsyncifiedFooGetter = (someArg) => {
|
|
27
27
|
// …
|
28
28
|
}
|
29
29
|
```
|
30
|
+
|
31
|
+
@category Async
|
30
32
|
*/
|
31
33
|
export type Asyncify<Fn extends (...args: any[]) => any> = SetReturnType<Fn, Promise<PromiseValue<ReturnType<Fn>>>>;
|