Full Code of millsp/ts-toolbelt for AI

master b8a49285e3ed cached
293 files
382.9 KB
121.0k tokens
588 symbols
1 requests
Download .txt
Showing preview only (438K chars total). Download the full file or copy to clipboard to get everything.
Repository: millsp/ts-toolbelt
Branch: master
Commit: b8a49285e3ed
Files: 293
Total size: 382.9 KB

Directory structure:
gitextract_d0x81m7m/

├── .commitlintrc.json
├── .eslintrc.json
├── .github/
│   ├── CODEOWNERS
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── ---bug-report.md
│   │   └── ---feature-request.md
│   ├── pull_request_template.md
│   └── stale.yml
├── .gitignore
├── .huskyrc.json
├── .travis.yml
├── .versionrc.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── package.json
├── scripts/
│   ├── build/
│   │   ├── clean.sh
│   │   ├── code.sh
│   │   ├── docs.sh
│   │   └── types.sh
│   ├── ci/
│   │   ├── branch/
│   │   │   ├── ad.sh
│   │   │   └── bd.sh
│   │   ├── master/
│   │   │   ├── ad.sh
│   │   │   └── bd.sh
│   │   └── test/
│   │       ├── ad.sh
│   │       └── bd.sh
│   ├── release.sh
│   ├── test/
│   │   ├── all.sh
│   │   ├── code.sh
│   │   ├── lint.sh
│   │   └── types.sh
│   └── tools/
│       ├── check-deploy.sh
│       ├── dt-update-version.ts
│       ├── package-test-version.ts
│       └── regex-update-file.ts
├── sources/
│   ├── Any/
│   │   ├── At.ts
│   │   ├── Await.ts
│   │   ├── Cast.ts
│   │   ├── Compute.ts
│   │   ├── Contains.ts
│   │   ├── Equals.ts
│   │   ├── Extends.ts
│   │   ├── If.ts
│   │   ├── Is.ts
│   │   ├── Key.ts
│   │   ├── Keys.ts
│   │   ├── KnownKeys.ts
│   │   ├── Promise.ts
│   │   ├── Try.ts
│   │   ├── Type.ts
│   │   ├── _Internal.ts
│   │   ├── _api.ts
│   │   └── x.ts
│   ├── Boolean/
│   │   ├── And.ts
│   │   ├── Not.ts
│   │   ├── Or.ts
│   │   ├── Xor.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── Class/
│   │   ├── Class.ts
│   │   ├── Instance.ts
│   │   ├── Parameters.ts
│   │   └── _api.ts
│   ├── Community/
│   │   ├── IncludesDeep.ts
│   │   ├── IsLiteral.ts
│   │   └── _api.ts
│   ├── Function/
│   │   ├── AutoPath.ts
│   │   ├── Compose/
│   │   │   ├── List/
│   │   │   │   ├── Async.ts
│   │   │   │   └── Sync.ts
│   │   │   └── Multi/
│   │   │       ├── Async.ts
│   │   │       └── Sync.ts
│   │   ├── Compose.ts
│   │   ├── Curry.ts
│   │   ├── Exact.ts
│   │   ├── Function.ts
│   │   ├── Length.ts
│   │   ├── Narrow.ts
│   │   ├── NoInfer.ts
│   │   ├── Parameters.ts
│   │   ├── Pipe/
│   │   │   ├── List/
│   │   │   │   ├── Async.ts
│   │   │   │   └── Sync.ts
│   │   │   └── Multi/
│   │   │       ├── Async.ts
│   │   │       └── Sync.ts
│   │   ├── Pipe.ts
│   │   ├── Promisify.ts
│   │   ├── Return.ts
│   │   ├── UnCurry.ts
│   │   ├── ValidPath.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── Iteration/
│   │   ├── Iteration.ts
│   │   ├── IterationOf.ts
│   │   ├── Key.ts
│   │   ├── Next.ts
│   │   ├── Pos.ts
│   │   ├── Prev.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── List/
│   │   ├── Append.ts
│   │   ├── Assign.ts
│   │   ├── AtLeast.ts
│   │   ├── Compulsory.ts
│   │   ├── CompulsoryKeys.ts
│   │   ├── Concat.ts
│   │   ├── Diff.ts
│   │   ├── Drop.ts
│   │   ├── Either.ts
│   │   ├── Exclude.ts
│   │   ├── ExcludeKeys.ts
│   │   ├── Extract.ts
│   │   ├── Filter.ts
│   │   ├── FilterKeys.ts
│   │   ├── Flatten.ts
│   │   ├── Group.ts
│   │   ├── Has.ts
│   │   ├── HasPath.ts
│   │   ├── Head.ts
│   │   ├── Includes.ts
│   │   ├── Intersect.ts
│   │   ├── IntersectKeys.ts
│   │   ├── KeySet.ts
│   │   ├── Last.ts
│   │   ├── LastKey.ts
│   │   ├── Length.ts
│   │   ├── List.ts
│   │   ├── Longest.ts
│   │   ├── Merge.ts
│   │   ├── MergeAll.ts
│   │   ├── Modify.ts
│   │   ├── NonNullable.ts
│   │   ├── NonNullableKeys.ts
│   │   ├── Nullable.ts
│   │   ├── NullableKeys.ts
│   │   ├── ObjectOf.ts
│   │   ├── Omit.ts
│   │   ├── Optional.ts
│   │   ├── OptionalKeys.ts
│   │   ├── Overwrite.ts
│   │   ├── Partial.ts
│   │   ├── Patch.ts
│   │   ├── PatchAll.ts
│   │   ├── Path.ts
│   │   ├── Paths.ts
│   │   ├── Pick.ts
│   │   ├── Pop.ts
│   │   ├── Prepend.ts
│   │   ├── Readonly.ts
│   │   ├── ReadonlyKeys.ts
│   │   ├── Remove.ts
│   │   ├── Repeat.ts
│   │   ├── Replace.ts
│   │   ├── Required.ts
│   │   ├── RequiredKeys.ts
│   │   ├── Reverse.ts
│   │   ├── Select.ts
│   │   ├── SelectKeys.ts
│   │   ├── Shortest.ts
│   │   ├── Tail.ts
│   │   ├── Take.ts
│   │   ├── UnNest.ts
│   │   ├── Undefinable.ts
│   │   ├── UndefinableKeys.ts
│   │   ├── UnionOf.ts
│   │   ├── Unionize.ts
│   │   ├── Update.ts
│   │   ├── Writable.ts
│   │   ├── WritableKeys.ts
│   │   ├── Zip.ts
│   │   ├── ZipObj.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── Misc/
│   │   ├── BuiltIn.ts
│   │   ├── JSON/
│   │   │   ├── Array.ts
│   │   │   ├── Object.ts
│   │   │   ├── Primitive.ts
│   │   │   ├── Value.ts
│   │   │   └── _api.ts
│   │   ├── Primitive.ts
│   │   └── _api.ts
│   ├── Number/
│   │   ├── Absolute.ts
│   │   ├── Add.ts
│   │   ├── Greater.ts
│   │   ├── GreaterEq.ts
│   │   ├── IsNegative.ts
│   │   ├── IsPositive.ts
│   │   ├── IsZero.ts
│   │   ├── Lower.ts
│   │   ├── LowerEq.ts
│   │   ├── Negate.ts
│   │   ├── Range.ts
│   │   ├── Sub.ts
│   │   └── _api.ts
│   ├── Object/
│   │   ├── Assign.ts
│   │   ├── AtLeast.ts
│   │   ├── Compulsory.ts
│   │   ├── CompulsoryKeys.ts
│   │   ├── Diff.ts
│   │   ├── Either.ts
│   │   ├── Exclude.ts
│   │   ├── ExcludeKeys.ts
│   │   ├── Filter.ts
│   │   ├── FilterKeys.ts
│   │   ├── Has.ts
│   │   ├── HasPath.ts
│   │   ├── Includes.ts
│   │   ├── Intersect.ts
│   │   ├── IntersectKeys.ts
│   │   ├── Invert.ts
│   │   ├── ListOf.ts
│   │   ├── Merge.ts
│   │   ├── MergeAll.ts
│   │   ├── Modify.ts
│   │   ├── NonNullable.ts
│   │   ├── NonNullableKeys.ts
│   │   ├── Nullable.ts
│   │   ├── NullableKeys.ts
│   │   ├── Object.ts
│   │   ├── Omit.ts
│   │   ├── Optional.ts
│   │   ├── OptionalKeys.ts
│   │   ├── Overwrite.ts
│   │   ├── P/
│   │   │   ├── Merge.ts
│   │   │   ├── Omit.ts
│   │   │   ├── Pick.ts
│   │   │   ├── Readonly.ts
│   │   │   ├── Record.ts
│   │   │   ├── Update.ts
│   │   │   ├── _Internal.ts
│   │   │   └── _api.ts
│   │   ├── Partial.ts
│   │   ├── Patch.ts
│   │   ├── PatchAll.ts
│   │   ├── Path.ts
│   │   ├── Paths.ts
│   │   ├── Pick.ts
│   │   ├── Readonly.ts
│   │   ├── ReadonlyKeys.ts
│   │   ├── Record.ts
│   │   ├── Replace.ts
│   │   ├── Required.ts
│   │   ├── RequiredKeys.ts
│   │   ├── Select.ts
│   │   ├── SelectKeys.ts
│   │   ├── Undefinable.ts
│   │   ├── UndefinableKeys.ts
│   │   ├── UnionOf.ts
│   │   ├── Unionize.ts
│   │   ├── Update.ts
│   │   ├── Writable.ts
│   │   ├── WritableKeys.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── String/
│   │   ├── At.ts
│   │   ├── Join.ts
│   │   ├── Length.ts
│   │   ├── Replace.ts
│   │   ├── Split.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── Test.ts
│   ├── Union/
│   │   ├── Diff.ts
│   │   ├── Exclude.ts
│   │   ├── Filter.ts
│   │   ├── Has.ts
│   │   ├── Intersect.ts
│   │   ├── IntersectOf.ts
│   │   ├── Last.ts
│   │   ├── ListOf.ts
│   │   ├── Merge.ts
│   │   ├── NonNullable.ts
│   │   ├── Nullable.ts
│   │   ├── Pop.ts
│   │   ├── Replace.ts
│   │   ├── Select.ts
│   │   ├── Strict.ts
│   │   └── _api.ts
│   └── index.ts
├── tests/
│   ├── Any.ts
│   ├── Boolean.ts
│   ├── Class.ts
│   ├── Community.ts
│   ├── Function.ts
│   ├── Iteration.ts
│   ├── List.ts
│   ├── Misc.ts
│   ├── Number.ts
│   ├── Object.ts
│   ├── String.ts
│   └── Union.ts
└── tsconfig.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .commitlintrc.json
================================================
{
    "extends": ["@commitlint/config-conventional"]
}

================================================
FILE: .eslintrc.json
================================================
{ // https://github.com/Microsoft/vscode-eslint/issues/284
    "parser": "@typescript-eslint/parser",
    "extends": ["eslint:recommended"],
    "plugins": ["react", "fp"],
    "env": {
        "browser": true,
        "es6": true,
        "commonjs": true
    },
    "globals": {
        "__dirname": false
    },
    "parserOptions": {
        "jsx": true,
        "ecmaFeatures": {
            "jsx": true
        },
        "ecmaVersion": 2018,
        "sourceType": "module"
    },
    "rules": {
        // code features
        "array-callback-return"       : ["error"],
        "arrow-parens"                : ["error"],
        "arrow-spacing"               : ["error"],
        "curly"                       : ["error", "multi-or-nest"],
        "default-case"                : ["error"],
        "dot-location"                : ["error"],
        "eqeqeq"                      : ["warn"],
        "generator-star-spacing"      : ["error"],
        "no-caller"                   : ["error"],
        "no-console"                  : ["off"],
        "no-div-regex"                : ["error"],
        "no-else-return"              : ["error"],
        "no-extend-native"            : ["error"],
        "no-floating-decimal"         : ["error"],
        // "no-implicit-coercion"        : ["error"],
        "no-implicit-globals"         : ["error"],
        "no-implied-eval"             : ["error"],
        "no-invalid-this"             : ["error"],
        "no-labels"                   : ["error"],
        "no-new-wrappers"             : ["error"],
        "no-proto"                    : ["error"],
        "no-return-assign"            : ["error"],
        "no-return-await"             : ["error"],
        "no-self-compare"             : ["error"],
        "no-sequences"                : ["error"],
        "no-unmodified-loop-condition": ["warn"],
        "no-undef"                    : ["off"],
        "no-unused-vars"              : ["off"],
        "no-useless-call"             : ["error"],
        "no-useless-catch"            : ["error"],
        "no-useless-concat"           : ["error"],
        "no-useless-return"           : ["error"],
        "no-var"                      : ["error"],
        "no-with"                     : ["error"],
        // "object-shorthand"            : ["warn"],
        "prefer-arrow-callback"       : ["error"],
        "prefer-rest-params"          : ["error"],
        "prefer-spread"               : ["error"],
        "prefer-template"             : ["error"],
        "require-await"               : ["warn"],
        "require-unicode-regexp"      : ["error"],
        "rest-spread-spacing"         : ["error"],
        "symbol-description"          : ["error"],
        "template-curly-spacing"      : ["error"],
        "yield-star-spacing"          : ["error", "before"],
        "yoda"                        : ["error"],
        // code style
        "array-bracket-newline"        : ["error", "consistent"],
        "array-bracket-spacing"        : ["error"],
        "block-spacing"                : ["error", "never"],
        "brace-style"                  : ["error", "1tbs", {"allowSingleLine": true}],
        "comma-dangle"                 : ["error", "always-multiline"],
        "comma-spacing"                : ["error", {"before": false, "after": true}],
        "computed-property-spacing"    : ["error"],
        "eol-last"                     : ["error"],
        "func-call-spacing"            : ["error"],
        "indent"                       : ["error", 4, {"MemberExpression": 0}],
        "key-spacing"                  : ["error", {"align": "colon"}],
        "keyword-spacing"              : ["error"],
        "linebreak-style"              : ["error"],
        "new-cap"                      : ["error", {"capIsNew": false}],
        "no-array-constructor"         : ["error"],
        "no-multi-assign"              : ["error"],
        "no-nested-ternary"            : ["error"],
        "no-whitespace-before-property": ["error"],
        "object-curly-newline"         : ["error"],
        "object-curly-spacing"         : ["error"],
        "prefer-object-spread"         : ["error"],
        "quotes"                       : ["error", "single"],
        "semi"                         : ["error", "never"],
        "no-trailing-spaces"           : ["error"]
        // "multiline-comment-style"      : ["error", "starred-block"]
    }
}

================================================
FILE: .github/CODEOWNERS
================================================
* @millsp

================================================
FILE: .github/FUNDING.yml
================================================
github: millsp
custom: https://www.buymeacoffee.com/millsp
patreon: millsp


================================================
FILE: .github/ISSUE_TEMPLATE/---bug-report.md
================================================
---
name: "🐞 Bug Report"
about: "Something isn't working well 💔"

---

## 🐞 Bug Report

#### Describe the bug
<!-- A clear and concise description of what the bug is. -->

#### Reproduce the bug
```ts
// REPL or a link to your repository if applicable.
// A *self-contained* demonstration of the problem.
```

#### Expected behavior
<!-- A clear & concise description of what you expected to happen. -->

#### Possible Solution
<!-- Only if you have suggestions on a fix for the bug. -->

#### Screenshots
<!-- If applicable, add screenshots to help explaining. -->

#### Additional context
<!-- Add any other context about the problem here (version, environment, tools...). -->


================================================
FILE: .github/ISSUE_TEMPLATE/---feature-request.md
================================================
---
name: "🍩 Feature Request"
about: "Suggest an idea for this project 💡"

---

## 🍩 Feature Request

#### Is your feature request related to a problem?
<!-- A clear & concise description of what the problem is. (e.g. I have an issue when [...]). -->

#### Describe the solution you'd like
<!-- A clear & concise description of what you want to happen. Add any considered drawbacks. -->

#### Describe alternatives you've considered
<!-- A clear & concise description of any alternative solutions or features you've considered. -->

#### Teachability, Documentation, Adoption, Migration Strategy
<!-- If you can, explain how users will be able to use this and possibly write out a
version of the docs.

Maybe a screenshot or design? -->


================================================
FILE: .github/pull_request_template.md
================================================
## 🎁 Pull Request

<!-- Fill the following checklist. -->
* [ ] Used a clear / meaningful title for this pull request
* [ ] Tested the changes in your own code (on your projects)
* [ ] Added / Edited tests to reflect changes (`tests` folder)
* [ ] Have read the **Contributing** part of the **Readme**
* [ ] Passed `npm test`

<!-- Complete the following parts. -->

#### Fixes
<!-- List the issues that this fixes. -->

#### Why have you made changes?
<!-- A clear & concise explanation. -->

#### What changes have you made?
* changed this to achieve this
* changed that to achieve this
* ...

#### What tests have you updated?
* tested this in `tests/...`
* tested that in `tests/...`
* ...

#### Is there any breaking changes?
<!-- Fill the following checklist. -->
* [ ] Yes, I changed the public API & documented it
* [ ] Yes, I changed existing tests
* [ ] No,  I added to the public API & documented it
* [ ] No,  I added to the existing tests
* [ ] I don't know

#### Anything else worth mentioning?
<!-- Please help with the PR process. -->
<!-- Leave any extra useful information. -->
<!-- Or mention someone who is concerned. -->


================================================
FILE: .github/stale.yml
================================================
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
  - pinned #todo
  - security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
  This issue has been automatically marked as stale because it has not had
  recent activity. It will be closed if no further activity occurs. Thank you
  for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false


================================================
FILE: .gitignore
================================================
package-lock.json
node_modules
.vscode
*.tgz
docs
out
dt

================================================
FILE: .huskyrc.json
================================================
{
    "hooks": {
        "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
}

================================================
FILE: .travis.yml
================================================
# https://docs.travis-ci.com/user/job-lifecycle

language: node_js

node_js:
- '12.0'

git:
  depth: 5

install:
- npm install --only=dev

env:
  - DEPLOY=true

stages:
  - test
  - deploy:master
  - deploy:branch
  - deploy:docs

jobs:
  include:
    - stage: test
      if: tag IS blank # filter double build with tags
      script:
        - npm run test 
      deploy:
        edge: true
        provider: npm
        email: $NPM_EMAIL
        api_key: $NPM_TOKEN
        skip_cleanup: true
        tag: test
        on:
          all_branches: true
      before_deploy: # https://github.com/travis-ci/travis-ci/issues/1574#issuecomment-451787844
        - if ! npm run ci:test:bd; then travis_terminate 1; fi
      after_deploy: # the above link explains how to make the build fail if something went wrong
        - if ! npm run ci:test:ad; then travis_terminate 1; fi

    - stage: deploy:master
      if: tag IS blank AND branch = master AND fork = false AND env(DEPLOY) = true
      deploy:
        edge: true
        provider: npm
        email: $NPM_EMAIL
        api_key: $NPM_TOKEN
        tag: latest
        skip_cleanup: true
        on:
          all_branches: true
      before_deploy:
        - if ! npm run ci:master:bd; then travis_terminate 1; fi
      after_deploy:
        - if ! npm run ci:master:ad; then travis_terminate 1; fi
  
    - stage: deploy:branch
      if: tag IS blank AND branch != master AND fork = false AND env(DEPLOY) = true
      deploy:
        edge: true
        provider: npm
        email: $NPM_EMAIL
        api_key: $NPM_TOKEN
        tag: $TRAVIS_BRANCH
        skip_cleanup: true
        on:
          all_branches: true
      before_deploy:
        - if ! npm run ci:branch:bd; then travis_terminate 1; fi
      after_deploy:
        - if ! npm run ci:branch:ad; then travis_terminate 1; fi

    - stage: deploy:docs #deploys doc to gh-pages branch
      if: tag IS blank AND branch = master AND fork = false AND env(DEPLOY) = true
      deploy:
        edge: true
        provider: pages
        skip_cleanup: true
        github_token: $GH_TOKEN
        local_dir: "docs"
        keep_history: true
        on:
          all_branches: true
      before_deploy:
        - if ! npm run ci:docs:bd; then travis_terminate 1; fi
      after_deploy:
        - if ! npm run ci:docs:ad; then travis_terminate 1; fi


================================================
FILE: .versionrc.json
================================================
{
    "types": [
        {"type": "feat", "section": "Features"},
        {"type": "fix", "section": "Bug Fixes"},
        {"type": "build", "section": "Others"},
        {"type": "ci", "section": "Others"},
        {"type": "chore", "section": "Others"},
        {"type": "docs", "section": "Others"},
        {"type": "perf", "section": "Others"},
        {"type": "refactor", "section": "Others"},
        {"type": "revert", "section": "Others"},
        {"type": "style", "section": "Others"},
        {"type": "test", "section": "Others"}
    ]
}

================================================
FILE: CHANGELOG.md
================================================
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [9.6.0](https://github.com/millsp/ts-toolbelt/compare/v9.5.1...v9.6.0) (2021-03-10)


### Features

* **paths:** parameter for AutoPath delimiter ([6d5bbdc](https://github.com/millsp/ts-toolbelt/commit/6d5bbdc834ce15dd3339d101c828457b1a34cce4))


### Bug Fixes

* **f.autopath:** distribute ([29eddd9](https://github.com/millsp/ts-toolbelt/commit/29eddd99c6826696941c50681ce4858243786110))
* **f.autopath:** do not show primitive props ([1ad2638](https://github.com/millsp/ts-toolbelt/commit/1ad26389aa6a9a795d19d90d2724c73ae2bd51d9))
* **f.autopath:** no primitve paths ([2bdb477](https://github.com/millsp/ts-toolbelt/commit/2bdb4778325288154c8f71c0a5ae4a1b7e2b217f))
* **f.narrow:** fix variance and array inference ([4c7618d](https://github.com/millsp/ts-toolbelt/commit/4c7618d77b07d6b8c6dfd5087aa85a073bf57db3))
* **f.narrow:** higher order function support ([dad05ee](https://github.com/millsp/ts-toolbelt/commit/dad05eec6e6710ea4f63063658a3dee4d9c0ca28))
* **f.narrow:** preserve fns and better display ([a0d62d8](https://github.com/millsp/ts-toolbelt/commit/a0d62d8cfcd28eab7132c225ba187556ca749b4d))
* **f.narrow:** preserve functions ([c34f1b9](https://github.com/millsp/ts-toolbelt/commit/c34f1b95d0e0855203104eb696cfcb8221a65374))
* **f.narrow:** revert variance fixes ([12e014a](https://github.com/millsp/ts-toolbelt/commit/12e014a3f3d34047a3722486a73493f857a3697a))
* **f.narrow:** variance ([866ecd7](https://github.com/millsp/ts-toolbelt/commit/866ecd76744fc38244d85e7ef7b4bb90105cf7eb))
* **fn:** allow for curried in compose ([2bc5604](https://github.com/millsp/ts-toolbelt/commit/2bc560446916b423977c25e396b4f1f310b6c03f))
* **o.paths:** dive within arrays and deeper ([626beb6](https://github.com/millsp/ts-toolbelt/commit/626beb61b3100c5e4fd699c946e0e2fed7e24cb6))


### Others

* **list:** more flexible keys ([d9415b2](https://github.com/millsp/ts-toolbelt/commit/d9415b2f85633c7c74a815c9909899114faf530c))
* **o.p:** re-implement ([0f44362](https://github.com/millsp/ts-toolbelt/commit/0f443626dc3b114b6784d2053510a1e0c2f7f839))
* **release:** 9.5.10 ([1f3928a](https://github.com/millsp/ts-toolbelt/commit/1f3928a70ff2a7e903a5398b53295c9c9997b42c))
* **release:** 9.5.11 ([bde9210](https://github.com/millsp/ts-toolbelt/commit/bde9210d0a361ddb1e03920a0c2bd42dad17ee30))
* **release:** 9.5.12 ([80579e1](https://github.com/millsp/ts-toolbelt/commit/80579e1eaa17b2d1c61bd7881d0ea6ff94753141))
* **release:** 9.5.13 ([277a6e2](https://github.com/millsp/ts-toolbelt/commit/277a6e2ac5ca8be2bbcd7593d987aaac3ea9bb75))
* **release:** 9.5.2 ([ec4a953](https://github.com/millsp/ts-toolbelt/commit/ec4a953cabe6c4d704c0dca5f37d1dc630de047b))
* **release:** 9.5.3 ([0836f6e](https://github.com/millsp/ts-toolbelt/commit/0836f6e8187287a0c86f249e4e552d68a44e4f60))
* **release:** 9.5.4 ([855855e](https://github.com/millsp/ts-toolbelt/commit/855855e520ed4a04059f9d61884d2045dd0d751b))
* **release:** 9.5.5 ([e28bddf](https://github.com/millsp/ts-toolbelt/commit/e28bddf33066850a764e2ba344883ff84da561b9))
* **release:** 9.5.6 ([b8e0d0a](https://github.com/millsp/ts-toolbelt/commit/b8e0d0a83228baf666e00f4fdb0d99ca936c133f))
* **release:** 9.5.7 ([5646455](https://github.com/millsp/ts-toolbelt/commit/564645547862c7d698f4a03b15ccb7a5ffb5fc29))
* **release:** 9.5.8 ([bceb8be](https://github.com/millsp/ts-toolbelt/commit/bceb8be67701f9c7aba9608aed851567e8118ca5))
* **release:** 9.5.9 ([533a6ac](https://github.com/millsp/ts-toolbelt/commit/533a6ac0f7b713933c94f0962166c7a0245b055e))
* **release:** 9.6.0 ([5e6d008](https://github.com/millsp/ts-toolbelt/commit/5e6d008888c1705e41bf752b3a308323a5c563fe))
* **string:** instantiation limiters ([9a678d8](https://github.com/millsp/ts-toolbelt/commit/9a678d8a400c97436d428dad05405abb154af958))
* **update:** remove dirty code ([9d0ff64](https://github.com/millsp/ts-toolbelt/commit/9d0ff6441518c2c9a01cea7726c08acd19eb37d9))
* cleanup ([6f23f2e](https://github.com/millsp/ts-toolbelt/commit/6f23f2ec79145a0545eb45d15d50d0363a119b12))


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
  advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
  address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [gitter.im/millsp](https://gitter.im/millsp). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq



================================================
FILE: CONTRIBUTING.md
================================================
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. There are many ways to contribute to the project:

### Community

* [Help the community with answers on Gitter](https://gitter.im/ts-toolbelt/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
* [Reporting bugs or requesting new features](https://github.com/millsp/ts-toolbelt/issues/new/choose)

### Codebase

* Improving existing documentation 
* Adding new types to the collection
* [Getting involved with things to do](#-whats-next)

### Pull Requests

1. [Read the tutorial](https://medium.com/free-code-camp/typescript-curry-ramda-types-f747e99744ab)

2. Fork the project

3. Clone your fork

4. Create a pr/**feature** branch

   ```sh
   git checkout -b pr/CoolFeature
   ```
   
5. Commit your changes

   You **must** follow the [conventional commit](https://conventionalcommits.org) to be able to commit
   ```sh
   git commit -m "feat(name): Added this CoolFeature"
   ```

6. [Run the tests](#-running-tests)

7. Push your changes

   ```sh
   npm run release -- --no-tags
   ```

8. Open a pull request


================================================
FILE: LICENSE
================================================
                              Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2019 Pierre-Antoine Mills

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

================================================
FILE: README.md
================================================
<p align="center">
  <a href="https://github.com/millsp/ts-toolbelt">
    <img alt="banner" title="ts-toolbelt" src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/banner.svg">
  </a>
  <h4 align="center">TypeScript's largest utility library</h4>
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/ts-toolbelt" >
    <img src="https://img.shields.io/npm/v/ts-toolbelt.svg">
  </a>
  <a href="#">
    <img src="https://img.shields.io/npm/dm/ts-toolbelt.svg">
  </a>
  <a href="#">
    <img src="http://isitmaintained.com/badge/resolution/millsp/ts-toolbelt.svg"/>
  </a>
</p>

<p align="center">
  <a href="https://gitter.im/ts-toolbelt/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link" >
    <img src="https://img.shields.io/gitter/room/ts-toolbelt/community.svg">
  </a>
  <a href="http://makeapullrequest.com" >
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg">
  </a>
  <a href="https://conventionalcommits.org" >
    <img src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-green.svg">
  </a>
  <a href="https://github.com/millsp/ts-toolbelt/blob/master/CODE_OF_CONDUCT.md" >
    <img src="https://img.shields.io/badge/CoC-Contributor%20Covenant-green.svg">
  </a>
  <a href="#">
    <img src="https://img.shields.io/npm/l/ts-toolbelt.svg">
  </a>
</p>

<p align="center">
  <a href="https://millsp.github.io/ts-toolbelt/">📖 Documentation</a>
  ·
  <a href="https://github.com/millsp/ts-toolbelt/issues?utf8=✓&q=is%3Aissue+label%3Aannouncement+sort%3Acreated-desc+">📣 Announcements</a>
  ·
  <a href="https://github.com/millsp/ts-toolbelt/issues/new?template=---bug-report.md" alt="Bug Report">🐞 Report Bug</a>
  ·
  <a href="https://github.com/millsp/ts-toolbelt/issues/new?template=---feature-request.md" alt="Request Feature">🍩 Request Feature</a>
  ·
  <a href="https://github.com/millsp/ts-toolbelt/discussions/new" alt="Ask Questions">🤔 Ask Questions</a>
</p>

## About

**ts-toolbelt** is the largest, and most tested type library available right
now, featuring **+200 utilities**. Our type collection packages some of the most
advanced mapped types, conditional types, and recursive types on the market.

**Spend less time, build stronger**. Benefit from a wide range of generic type
functions to achieve better type safety. 

We work just like lodash, or ramda, but applied to the type system. Our mission
is to provide you with simple ways to compute, change, and create types. We
abstract all those complex type checks away for you. We provide a simple,
reusable, and standard API to help you get more done with TypeScript.

**ts-toolbelt** is a well organized package that can help you perform advanced
operations on object types, union types, as well as function, and literal types.
It is carefully and coherently designed for building robust, flexible, and
type-safe software.

<p align="center">
  <a href="https://codesandbox.io/s/ts-toolbelt-x4jly?file=/src/index.ts">
    <img alt="demo" width="800" title="ts-toolbelt" src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/demo.svg">
  </a>
</p>

We are a community and a knowledge base. Everyone is welcome to ask questions
about types. If you are stuck or you misunderstand something, you came to the
right place!. We welcome beginners and advanced developers to come take part.
**Welcome!**

## Getting Started

### Prerequisites

```sh
npm install typescript@^4.1.0 --save-dev
```

For best results, add this to your `tsconfig.json`

```ts
{
  "compilerOptions": {
    // highly recommended (required by few utilities)
    "strictNullChecks": true,

    // this is optional, but enable whenever possible
    "strict": true,

    // this is the lowest supported standard library
    "lib": ["es2015"],
  }
}
```

### Installation

```sh
npm install ts-toolbelt --save
```

### Hello World

```ts
import {Object} from "ts-toolbelt"
// Check the docs below for more

// Merge two `object` together
type merge = Object.Merge<{name: string}, {age?: number}>
// {name: string, age?: number}

// Make a field of an `object` optional
type optional = Object.Optional<{id: number, name: string}, "name">
// {id: number, name?: string}
```

You can [**level-up, and re-code this library from
scratch**](https://medium.com/free-code-camp/typescript-curry-ramda-types-f747e99744ab).

## [Documentation ⤢](https://millsp.github.io/ts-toolbelt/)

### Imports

The project is organized around TypeScript's main concepts:

| **Any**    | **Boolean** | **Class**    | **Function** | **Iteration** | **List** |
|------------|-------------|--------------|--------------|---------------|----------|
| **Number** | **Object**  | **Object.P** | **String**   | **Union**     | **Test** |

> **`TIP`** How to choose categories? Match your type with them.

There are many ways to import the types into your project:

* **Explicit**
  ```ts
  import {Any, Boolean, Class, Function, Iteration, List, Number, Object, String, Union} from "ts-toolbelt"
  ```

* **Compact**
  ```ts
  import {A, B, C, F, I, L, N, O, S, U} from "ts-toolbelt"
  ```

* **Portable**
  ```ts
  import tb from "ts-toolbelt"
  ```

You can also import our non-official API from the community:
  ```ts
  import {Community} from "ts-toolbelt"
  ```

> **`TIP`** The community API is for our community to publish useful types that
> don't see fit in the standard API.

### Utility Index

|ANY|OBJECT|LIST|FUNCTION|STRING|UNION|CLASS|BOOLEAN|NUMBER|OBJECT.P|ITERATION|
|---|---|---|---|---|---|---|---|---|---|---|
|[Await](https://millsp.github.io/ts-toolbelt/modules/any_await.html)|[Assign](https://millsp.github.io/ts-toolbelt/modules/object_assign.html)|[Append](https://millsp.github.io/ts-toolbelt/modules/list_append.html)|[AutoPath](https://millsp.github.io/ts-toolbelt/modules/function_autopath.html)|[At](https://millsp.github.io/ts-toolbelt/modules/string_at.html)|[Diff](https://millsp.github.io/ts-toolbelt/modules/union_diff.html)|[Class](https://millsp.github.io/ts-toolbelt/modules/class_class.html)|[And](https://millsp.github.io/ts-toolbelt/modules/boolean_and.html)|[Absolute](https://millsp.github.io/ts-toolbelt/modules/number_absolute.html)|[Merge](https://millsp.github.io/ts-toolbelt/modules/object_p_merge.html)|[Iteration](https://millsp.github.io/ts-toolbelt/modules/iteration_iteration.html)|
|[At](https://millsp.github.io/ts-toolbelt/modules/any_at.html)|[AtLeast](https://millsp.github.io/ts-toolbelt/modules/object_atleast.html)|[Assign](https://millsp.github.io/ts-toolbelt/modules/list_assign.html)|[Compose](https://millsp.github.io/ts-toolbelt/modules/function_compose.html)|[Join](https://millsp.github.io/ts-toolbelt/modules/string_join.html)|[Exclude](https://millsp.github.io/ts-toolbelt/modules/union_exclude.html)|[Instance](https://millsp.github.io/ts-toolbelt/modules/class_instance.html)|[Not](https://millsp.github.io/ts-toolbelt/modules/boolean_not.html)|[Add](https://millsp.github.io/ts-toolbelt/modules/number_add.html)|[Omit](https://millsp.github.io/ts-toolbelt/modules/object_p_omit.html)|[IterationOf](https://millsp.github.io/ts-toolbelt/modules/iteration_iterationof.html)|
|[Cast](https://millsp.github.io/ts-toolbelt/modules/any_cast.html)|[Compulsory](https://millsp.github.io/ts-toolbelt/modules/object_compulsory.html)|[AtLeast](https://millsp.github.io/ts-toolbelt/modules/list_atleast.html)|[Curry](https://millsp.github.io/ts-toolbelt/modules/function_curry.html)|[Length](https://millsp.github.io/ts-toolbelt/modules/string_length.html)|[Filter](https://millsp.github.io/ts-toolbelt/modules/union_filter.html)|[Parameters](https://millsp.github.io/ts-toolbelt/modules/class_parameters.html)|[Or](https://millsp.github.io/ts-toolbelt/modules/boolean_or.html)|[Greater](https://millsp.github.io/ts-toolbelt/modules/number_greater.html)|[Pick](https://millsp.github.io/ts-toolbelt/modules/object_p_pick.html)|[Key](https://millsp.github.io/ts-toolbelt/modules/iteration_key.html)|
|[Compute](https://millsp.github.io/ts-toolbelt/modules/any_compute.html)|[CompulsoryKeys](https://millsp.github.io/ts-toolbelt/modules/object_compulsorykeys.html)|[Compulsory](https://millsp.github.io/ts-toolbelt/modules/list_compulsory.html)|[Exact](https://millsp.github.io/ts-toolbelt/modules/function_exact.html)|[Replace](https://millsp.github.io/ts-toolbelt/modules/string_replace.html)|[Has](https://millsp.github.io/ts-toolbelt/modules/union_has.html)||[Xor](https://millsp.github.io/ts-toolbelt/modules/boolean_xor.html)|[GreaterEq](https://millsp.github.io/ts-toolbelt/modules/number_greatereq.html)|[Readonly](https://millsp.github.io/ts-toolbelt/modules/object_p_readonly.html)|[Next](https://millsp.github.io/ts-toolbelt/modules/iteration_next.html)|
|[Contains](https://millsp.github.io/ts-toolbelt/modules/any_contains.html)|[Diff](https://millsp.github.io/ts-toolbelt/modules/object_diff.html)|[CompulsoryKeys](https://millsp.github.io/ts-toolbelt/modules/list_compulsorykeys.html)|[Function](https://millsp.github.io/ts-toolbelt/modules/function_function.html)|[Split](https://millsp.github.io/ts-toolbelt/modules/string_split.html)|[IntersectOf](https://millsp.github.io/ts-toolbelt/modules/union_intersectof.html)|||[IsNegative](https://millsp.github.io/ts-toolbelt/modules/number_isnegative.html)|[Update](https://millsp.github.io/ts-toolbelt/modules/object_p_update.html)|[Pos](https://millsp.github.io/ts-toolbelt/modules/iteration_pos.html)|
|[Equals](https://millsp.github.io/ts-toolbelt/modules/any_equals.html)|[Either](https://millsp.github.io/ts-toolbelt/modules/object_either.html)|[Concat](https://millsp.github.io/ts-toolbelt/modules/list_concat.html)|[Length](https://millsp.github.io/ts-toolbelt/modules/function_length.html)||[Last](https://millsp.github.io/ts-toolbelt/modules/union_last.html)|||[IsPositive](https://millsp.github.io/ts-toolbelt/modules/number_ispositive.html)|[Record](https://millsp.github.io/ts-toolbelt/modules/object_p_record.html)|[Prev](https://millsp.github.io/ts-toolbelt/modules/iteration_prev.html)|
|[Extends](https://millsp.github.io/ts-toolbelt/modules/any_extends.html)|[Exclude](https://millsp.github.io/ts-toolbelt/modules/object_exclude.html)|[Diff](https://millsp.github.io/ts-toolbelt/modules/list_diff.html)|[Narrow](https://millsp.github.io/ts-toolbelt/modules/function_narrow.html)||[Merge](https://millsp.github.io/ts-toolbelt/modules/union_merge.html)|||[IsZero](https://millsp.github.io/ts-toolbelt/modules/number_iszero.html)|||
|[Key](https://millsp.github.io/ts-toolbelt/modules/any_key.html)|[ExcludeKeys](https://millsp.github.io/ts-toolbelt/modules/object_excludekeys.html)|[Drop](https://millsp.github.io/ts-toolbelt/modules/list_drop.html)|[NoInfer](https://millsp.github.io/ts-toolbelt/modules/function_noinfer.html)||[NonNullable](https://millsp.github.io/ts-toolbelt/modules/union_nonnullable.html)|||[Lower](https://millsp.github.io/ts-toolbelt/modules/number_lower.html)|||
|[Keys](https://millsp.github.io/ts-toolbelt/modules/any_keys.html)|[Filter](https://millsp.github.io/ts-toolbelt/modules/object_filter.html)|[Either](https://millsp.github.io/ts-toolbelt/modules/list_either.html)|[Parameters](https://millsp.github.io/ts-toolbelt/modules/function_parameters.html)||[Nullable](https://millsp.github.io/ts-toolbelt/modules/union_nullable.html)|||[LowerEq](https://millsp.github.io/ts-toolbelt/modules/number_lowereq.html)|||
|[KnownKeys](https://millsp.github.io/ts-toolbelt/modules/any_knownkeys.html)|[FilterKeys](https://millsp.github.io/ts-toolbelt/modules/object_filterkeys.html)|[Exclude](https://millsp.github.io/ts-toolbelt/modules/list_exclude.html)|[Pipe](https://millsp.github.io/ts-toolbelt/modules/function_pipe.html)||[Pop](https://millsp.github.io/ts-toolbelt/modules/union_pop.html)|||[Negate](https://millsp.github.io/ts-toolbelt/modules/number_negate.html)|||
|[Is](https://millsp.github.io/ts-toolbelt/modules/any_is.html)|[Has](https://millsp.github.io/ts-toolbelt/modules/object_has.html)|[ExcludeKeys](https://millsp.github.io/ts-toolbelt/modules/list_excludekeys.html)|[Promisify](https://millsp.github.io/ts-toolbelt/modules/function_promisify.html)||[Replace](https://millsp.github.io/ts-toolbelt/modules/union_replace.html)|||[Range](https://millsp.github.io/ts-toolbelt/modules/number_range.html)|||
|[Promise](https://millsp.github.io/ts-toolbelt/modules/any_promise.html)|[HasPath](https://millsp.github.io/ts-toolbelt/modules/object_haspath.html)|[Extract](https://millsp.github.io/ts-toolbelt/modules/list_extract.html)|[Return](https://millsp.github.io/ts-toolbelt/modules/function_return.html)||[Select](https://millsp.github.io/ts-toolbelt/modules/union_select.html)|||[Sub](https://millsp.github.io/ts-toolbelt/modules/number_sub.html)|||
|[Try](https://millsp.github.io/ts-toolbelt/modules/any_try.html)|[Includes](https://millsp.github.io/ts-toolbelt/modules/object_includes.html)|[Filter](https://millsp.github.io/ts-toolbelt/modules/list_filter.html)|[UnCurry](https://millsp.github.io/ts-toolbelt/modules/function_uncurry.html)||[Strict](https://millsp.github.io/ts-toolbelt/modules/union_strict.html)||||||
|[Type](https://millsp.github.io/ts-toolbelt/modules/any_type.html)|[Intersect](https://millsp.github.io/ts-toolbelt/modules/object_intersect.html)|[FilterKeys](https://millsp.github.io/ts-toolbelt/modules/list_filterkeys.html)|[ValidPath](https://millsp.github.io/ts-toolbelt/modules/function_validpath.html)||[ListOf](https://millsp.github.io/ts-toolbelt/modules/union_listof.html)||||||
|[x](https://millsp.github.io/ts-toolbelt/modules/any_x.html)|[IntersectKeys](https://millsp.github.io/ts-toolbelt/modules/object_intersectkeys.html)|[Flatten](https://millsp.github.io/ts-toolbelt/modules/list_flatten.html)|||||||||
||[Invert](https://millsp.github.io/ts-toolbelt/modules/object_invert.html)|[Group](https://millsp.github.io/ts-toolbelt/modules/list_group.html)|||||||||
||[ListOf](https://millsp.github.io/ts-toolbelt/modules/object_listof.html)|[Has](https://millsp.github.io/ts-toolbelt/modules/list_has.html)|||||||||
||[Merge](https://millsp.github.io/ts-toolbelt/modules/object_merge.html)|[HasPath](https://millsp.github.io/ts-toolbelt/modules/list_haspath.html)|||||||||
||[MergeAll](https://millsp.github.io/ts-toolbelt/modules/object_mergeall.html)|[Head](https://millsp.github.io/ts-toolbelt/modules/list_head.html)|||||||||
||[Modify](https://millsp.github.io/ts-toolbelt/modules/object_modify.html)|[Includes](https://millsp.github.io/ts-toolbelt/modules/list_includes.html)|||||||||
||[NonNullable](https://millsp.github.io/ts-toolbelt/modules/object_nonnullable.html)|[Intersect](https://millsp.github.io/ts-toolbelt/modules/list_intersect.html)|||||||||
||[NonNullableKeys](https://millsp.github.io/ts-toolbelt/modules/object_nonnullablekeys.html)|[IntersectKeys](https://millsp.github.io/ts-toolbelt/modules/list_intersectkeys.html)|||||||||
||[Nullable](https://millsp.github.io/ts-toolbelt/modules/object_nullable.html)|[KeySet](https://millsp.github.io/ts-toolbelt/modules/list_keyset.html)|||||||||
||[NullableKeys](https://millsp.github.io/ts-toolbelt/modules/object_nullablekeys.html)|[Last](https://millsp.github.io/ts-toolbelt/modules/list_last.html)|||||||||
||[Object](https://millsp.github.io/ts-toolbelt/modules/object_object.html)|[LastKey](https://millsp.github.io/ts-toolbelt/modules/list_lastkey.html)|||||||||
||[Omit](https://millsp.github.io/ts-toolbelt/modules/object_omit.html)|[Length](https://millsp.github.io/ts-toolbelt/modules/list_length.html)|||||||||
||[Optional](https://millsp.github.io/ts-toolbelt/modules/object_optional.html)|[List](https://millsp.github.io/ts-toolbelt/modules/list_list.html)|||||||||
||[OptionalKeys](https://millsp.github.io/ts-toolbelt/modules/object_optionalkeys.html)|[Longest](https://millsp.github.io/ts-toolbelt/modules/list_longest.html)|||||||||
||[Overwrite](https://millsp.github.io/ts-toolbelt/modules/object_overwrite.html)|[Merge](https://millsp.github.io/ts-toolbelt/modules/list_merge.html)|||||||||
||[Partial](https://millsp.github.io/ts-toolbelt/modules/object_partial.html)|[MergeAll](https://millsp.github.io/ts-toolbelt/modules/list_mergeall.html)|||||||||
||[Patch](https://millsp.github.io/ts-toolbelt/modules/object_patch.html)|[Modify](https://millsp.github.io/ts-toolbelt/modules/list_modify.html)|||||||||
||[PatchAll](https://millsp.github.io/ts-toolbelt/modules/object_patchall.html)|[NonNullable](https://millsp.github.io/ts-toolbelt/modules/list_nonnullable.html)|||||||||
||[Path](https://millsp.github.io/ts-toolbelt/modules/object_path.html)|[NonNullableKeys](https://millsp.github.io/ts-toolbelt/modules/list_nonnullablekeys.html)|||||||||
||[Paths](https://millsp.github.io/ts-toolbelt/modules/object_paths.html)|[Nullable](https://millsp.github.io/ts-toolbelt/modules/list_nullable.html)|||||||||
||[Pick](https://millsp.github.io/ts-toolbelt/modules/object_pick.html)|[NullableKeys](https://millsp.github.io/ts-toolbelt/modules/list_nullablekeys.html)|||||||||
||[Readonly](https://millsp.github.io/ts-toolbelt/modules/object_readonly.html)|[ObjectOf](https://millsp.github.io/ts-toolbelt/modules/list_objectof.html)|||||||||
||[ReadonlyKeys](https://millsp.github.io/ts-toolbelt/modules/object_readonlykeys.html)|[Omit](https://millsp.github.io/ts-toolbelt/modules/list_omit.html)|||||||||
||[Record](https://millsp.github.io/ts-toolbelt/modules/object_record.html)|[Optional](https://millsp.github.io/ts-toolbelt/modules/list_optional.html)|||||||||
||[Replace](https://millsp.github.io/ts-toolbelt/modules/object_replace.html)|[OptionalKeys](https://millsp.github.io/ts-toolbelt/modules/list_optionalkeys.html)|||||||||
||[Required](https://millsp.github.io/ts-toolbelt/modules/object_required.html)|[Overwrite](https://millsp.github.io/ts-toolbelt/modules/list_overwrite.html)|||||||||
||[RequiredKeys](https://millsp.github.io/ts-toolbelt/modules/object_requiredkeys.html)|[Partial](https://millsp.github.io/ts-toolbelt/modules/list_partial.html)|||||||||
||[Select](https://millsp.github.io/ts-toolbelt/modules/object_select.html)|[Patch](https://millsp.github.io/ts-toolbelt/modules/list_patch.html)|||||||||
||[SelectKeys](https://millsp.github.io/ts-toolbelt/modules/object_selectkeys.html)|[PatchAll](https://millsp.github.io/ts-toolbelt/modules/list_patchall.html)|||||||||
||[Undefinable](https://millsp.github.io/ts-toolbelt/modules/object_undefinable.html)|[Path](https://millsp.github.io/ts-toolbelt/modules/list_path.html)|||||||||
||[UndefinableKeys](https://millsp.github.io/ts-toolbelt/modules/object_undefinablekeys.html)|[Paths](https://millsp.github.io/ts-toolbelt/modules/list_paths.html)|||||||||
||[Unionize](https://millsp.github.io/ts-toolbelt/modules/object_unionize.html)|[Pick](https://millsp.github.io/ts-toolbelt/modules/list_pick.html)|||||||||
||[UnionOf](https://millsp.github.io/ts-toolbelt/modules/object_unionof.html)|[Pop](https://millsp.github.io/ts-toolbelt/modules/list_pop.html)|||||||||
||[Update](https://millsp.github.io/ts-toolbelt/modules/object_update.html)|[Prepend](https://millsp.github.io/ts-toolbelt/modules/list_prepend.html)|||||||||
||[Writable](https://millsp.github.io/ts-toolbelt/modules/object_writable.html)|[Readonly](https://millsp.github.io/ts-toolbelt/modules/list_readonly.html)|||||||||
||[WritableKeys](https://millsp.github.io/ts-toolbelt/modules/object_writablekeys.html)|[ReadonlyKeys](https://millsp.github.io/ts-toolbelt/modules/list_readonlykeys.html)|||||||||
|||[Remove](https://millsp.github.io/ts-toolbelt/modules/list_remove.html)|||||||||
|||[Repeat](https://millsp.github.io/ts-toolbelt/modules/list_repeat.html)|||||||||
|||[Replace](https://millsp.github.io/ts-toolbelt/modules/list_replace.html)|||||||||
|||[Required](https://millsp.github.io/ts-toolbelt/modules/list_required.html)|||||||||
|||[RequiredKeys](https://millsp.github.io/ts-toolbelt/modules/list_requiredkeys.html)|||||||||
|||[Reverse](https://millsp.github.io/ts-toolbelt/modules/list_reverse.html)|||||||||
|||[Select](https://millsp.github.io/ts-toolbelt/modules/list_select.html)|||||||||
|||[SelectKeys](https://millsp.github.io/ts-toolbelt/modules/list_selectkeys.html)|||||||||
|||[Shortest](https://millsp.github.io/ts-toolbelt/modules/list_shortest.html)|||||||||
|||[Tail](https://millsp.github.io/ts-toolbelt/modules/list_tail.html)|||||||||
|||[Take](https://millsp.github.io/ts-toolbelt/modules/list_take.html)|||||||||
|||[Undefinable](https://millsp.github.io/ts-toolbelt/modules/list_undefinable.html)|||||||||
|||[UndefinableKeys](https://millsp.github.io/ts-toolbelt/modules/list_undefinablekeys.html)|||||||||
|||[Unionize](https://millsp.github.io/ts-toolbelt/modules/list_unionize.html)|||||||||
|||[UnionOf](https://millsp.github.io/ts-toolbelt/modules/list_unionof.html)|||||||||
|||[UnNest](https://millsp.github.io/ts-toolbelt/modules/list_unnest.html)|||||||||
|||[Update](https://millsp.github.io/ts-toolbelt/modules/list_update.html)|||||||||
|||[Writable](https://millsp.github.io/ts-toolbelt/modules/list_writable.html)|||||||||
|||[WritableKeys](https://millsp.github.io/ts-toolbelt/modules/list_writablekeys.html)|||||||||
|||[Zip](https://millsp.github.io/ts-toolbelt/modules/list_zip.html)|||||||||
|||[ZipObj](https://millsp.github.io/ts-toolbelt/modules/list_zipobj.html)|||||||||

### [Archives ⤢](https://github.com/millsp/ts-toolbelt/tree/gh-pages)

> **`EXAMPLE`** https://millsp.github.io/ts-toolbelt/4.2.1/

## [Good to Know ⤢](https://github.com/millsp/ts-toolbelt/discussions/categories/q-a)

In this wiki, you will find some extra resources for your learning, and
understanding.

**Are you missing something?** Participate to the open-wiki by [posting your
questions](https://github.com/millsp/ts-toolbelt/discussions/new).

## Running tests

### For this project

To run the `lint` & `type` tests, simply run:

```sh
npm test
```

### For your project

Want to test your own types? Let's get started:

```ts
import {Number, Test} from "ts-toolbelt"

const {checks, check} = Test

checks([
    check<Number.Add<1, 30>, 31, Test.Pass>(),
    check<Number.Add<5, -3>, 2,  Test.Pass>(),
])
```

> **`TIP`** Place it in a file that won't be executed, it's just for TypeScript
> to test types.

### Continuous Integration

The releases are done with Travis CI in stages & whenever a branch or PR is
pushed:

- Tests are run with `npm test`
- Tests against
  [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/)
- Releases to npm@[branch-name]

## Compatibility

The project is maintained to adapt to the constant [changes of
TypeScript](https://github.com/Microsoft/TypeScript/wiki/Roadmap):

| ts-toolbelt | typescript |
|-------------|------------|
| 9.x.x       | ^4.1.x     |

Major version numbers will upgrade whenever TypeScript had breaking changes. 

Otherwise, the release versions will naturally follow the semantic versioning.

## What's next

* Automated performance tests
  ```sh
  # performance is checked manually with 
  npx tsc --noEmit --extendedDiagnostics
  ```

* Need to write more examples

## License

[![FOSSA
Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fpirix-gh%2Fts-toolbelt.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fpirix-gh%2Fts-toolbelt?ref=badge_large)


================================================
FILE: SECURITY.md
================================================
If you have discovered a security vulnerability, please report it via [Tidelift](https://tidelift.com/security).


================================================
FILE: package.json
================================================
{
  "name": "ts-toolbelt",
  "version": "9.6.0",
  "description": "TypeScript's largest utility library",
  "keywords": [
    "safe",
    "tools",
    "types",
    "typesafe",
    "typescript"
  ],
  "homepage": "https://github.com/millsp/ts-toolbelt",
  "repository": {
    "type": "git",
    "url": "https://github.com/millsp/ts-toolbelt"
  },
  "license": "Apache-2.0",
  "author": {
    "name": "Pierre-Antoine Mills",
    "url": "https://github.com/millsp"
  },
  "main": "out/index.js",
  "types": "out/index.d.ts",
  "files": [
    "out"
  ],
  "scripts": {
    "build:clean": "bash scripts/build/clean.sh",
    "build:code": "bash scripts/build/code.sh",
    "build:docs": "bash scripts/build/docs.sh",
    "build:types": "bash scripts/build/types.sh",
    "ci:branch:ad": "bash scripts/ci/branch/ad.sh",
    "ci:branch:bd": "bash scripts/ci/branch/bd.sh",
    "ci:docs:ad": "bash scripts/ci/docs/ad.sh",
    "ci:docs:bd": "bash scripts/ci/docs/bd.sh",
    "ci:master:ad": "bash scripts/ci/master/ad.sh",
    "ci:master:bd": "bash scripts/ci/master/bd.sh",
    "ci:test:ad": "bash scripts/ci/test/ad.sh",
    "ci:test:bd": "bash scripts/ci/test/bd.sh",
    "release": "bash scripts/release.sh",
    "test": "bash scripts/test/all.sh",
    "test:code": "bash scripts/test/code.sh",
    "test:lint": "bash scripts/test/lint.sh",
    "test:types": "bash scripts/test/types.sh"
  },
  "dependencies": {},
  "devDependencies": {
    "@commitlint/cli": "^11.0.0",
    "@commitlint/config-conventional": "^11.0.0",
    "@typescript-eslint/parser": "^4.14.0",
    "eledoc": "^0.2.0",
    "eslint": "^7.18.0",
    "eslint-plugin-fp": "^2.3.0",
    "eslint-plugin-react": "^7.22.0",
    "husky": "^4.3.0",
    "npx": "^10.2.0",
    "sort-package-json": "^1.48.0",
    "standard-version": "^9.1.0",
    "ts-node": "^9.1.0",
    "tslib": "^2.1.0",
    "typedoc": "^0.20.0",
    "typescript": "latest"
  }
}


================================================
FILE: scripts/build/clean.sh
================================================
#!/bin/bash

rm -fr out
rm -fr docs


================================================
FILE: scripts/build/code.sh
================================================
#!/bin/bash

mkdir -p out

touch out/index.js


================================================
FILE: scripts/build/docs.sh
================================================
#!/bin/bash

# creates folder if it doesn't exist yet
mkdir -p docs

# get the current version of the package
DOCS_VERSION=$(node -p "require('./package.json').version")

# force typedoc to use higher ts version
rm -rf node_modules/typedoc/node_modules/typescript
# !\ can cause bugs, be vigilent with it

# generate docs their own version folder
npx typedoc --out "docs/${DOCS_VERSION}" sources --theme node_modules/eledoc/bin/default/ && 

# & for github to display them correctly
touch "docs/${DOCS_VERSION}/.nojekyll"


================================================
FILE: scripts/build/types.sh
================================================
#!/bin/bash

mkdir -p out

npx tsc sources/index.ts -d --emitDeclarationOnly --outDir out


================================================
FILE: scripts/ci/branch/ad.sh
================================================
#!/bin/bash

bash ./scripts/tools/check-deploy.sh


================================================
FILE: scripts/ci/branch/bd.sh
================================================
#!/bin/bash

npm run build:clean
npm run build:code &&
npm run build:types


================================================
FILE: scripts/ci/master/ad.sh
================================================
#!/bin/bash

bash ./scripts/tools/check-deploy.sh

================================================
FILE: scripts/ci/master/bd.sh
================================================
#!/bin/bash

npm run build:clean
npm run build:code &&
npm run build:types


================================================
FILE: scripts/ci/test/ad.sh
================================================
#!/bin/bash

# rm -fr dt

# git clone --depth=1 https://github.com/DefinitelyTyped/DefinitelyTyped.git dt &&

# npx ts-node scripts/tools/dt-update-version.ts &&

# cd dt &&

# git commit -am "dependents testing" &&

# npm i &&

# npm test


================================================
FILE: scripts/ci/test/bd.sh
================================================
#!/bin/bash

npm run build:clean

npx ts-node scripts/tools/package-test-version.ts &&
npm run build:code &&
npm run build:types

================================================
FILE: scripts/release.sh
================================================
#!/bin/bash

# Make sure that we passed all tests
npm run test &&

# Get the name of the current branch
BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD` &&

# Sort package.json, keeps neat
npx sort-package-json &&

# check if we have to do a release
RELEASE=$(node -p "require('./package.json').version.split('.')[2] === '0'") &&

# Publish the current branch origin
if [ "$BRANCH" != "master" ]; then
    npx standard-version --skip.tag &&        # skip changelog
    git push origin $BRANCH                   # not a release
else
    if [ "$RELEASE" = "false" ]; then
        npx standard-version --skip.tag &&    # gen changelog
        git push origin $BRANCH
    else
        npx standard-version &&               # gen changelog
        git push origin $BRANCH --follow-tags # only releases
    fi;
fi;


================================================
FILE: scripts/test/all.sh
================================================
#!/bin/bash

npm run test:code &&
npm run test:lint &&
npm run test:types


================================================
FILE: scripts/test/code.sh
================================================
#!/bin/bash


================================================
FILE: scripts/test/lint.sh
================================================
#!/bin/bash

npx eslint 'sources/**'


================================================
FILE: scripts/test/types.sh
================================================
#!/bin/bash

npx tsc --noEmit --diagnostics


================================================
FILE: scripts/tools/check-deploy.sh
================================================
#!/bin/bash

sleep 60s # we'll just wait a little for it to get propagated

# we replace the travis branch name with "latest" if "master"
PKG_VERSTAG=$(echo ${TRAVIS_BRANCH//master/latest})

# we need to compare the current push and published versions
PKG_VERSION=$(node -p "require('./package.json').version")
PUB_VERSION=$(npm info .@${PKG_VERSTAG} version)

if [ $PKG_VERSION != $PUB_VERSION ]; then
    echo 
    exit 1 # travis has just failed the build, force to fail
fi

exit 0


================================================
FILE: scripts/tools/dt-update-version.ts
================================================
import replace from './regex-update-file'

replace('./dt/types', '"ts-toolbelt": ".*"', '"ts-toolbelt": "test"',
    [
        '?.*/package.json',
    ],
    [],
)


================================================
FILE: scripts/tools/package-test-version.ts
================================================
import replace from './regex-update-file'

replace('.', '"version": "(?<version>.*)"', `"version": "<version>-test.${Date.now()}"`,
    [
        'package.json',
    ],
    [],
)


================================================
FILE: scripts/tools/regex-update-file.ts
================================================
// @ts-ignore
import * as fs from 'fs'
// @ts-ignore
import * as rl from 'readline'

// regex-update-file
// regex-find-file

const updateMatchTo = (line: string, match: RegExp, to: string) => {
    const result = match.exec(line) || {groups: {}}
    const groups = result.groups

    // if user is not using groups just do
    if (!groups) return line.replace(match, to)

    Object.keys(groups).forEach((key) => {
        const groupMatch = new RegExp(`<${key}>`, 'gu')

        to   = to.replace(groupMatch, groups[key])
        line = line.replace(match, to)
    })

    return line
}


const replaceInFile = (
    file : string,
    path : string,
    match: RegExp,
    to   : string,
) => {
    let content  = ''
    let didMatch = false

    const filePath = `${path}/${file}`
    const streamFD = fs.createReadStream(filePath)

    rl.createInterface(streamFD).
    on('line', (line: string) => {
        if (line.match(match)) {
            line = updateMatchTo(line, match, to)

            didMatch = true
        }

        content += `${line}\n`
    }).
    on('close', () => {
        if (didMatch) {
            fs.writeFileSync(filePath, content)

            console.info(`wrote: ${filePath}`)
        }

        streamFD.close()
    })
}

const isPathIncluded = (
    path: string,
    include: string[],
    exclude: string[],
) => {
    // reduces down to `true` if a regex is a match
    const isExcluded = exclude.reduce((acc, val) => {
        return !!path.match(new RegExp(val, 'u')) || acc
    }, false)

    if (isExcluded)
        return false

    // reduces down to `true` if a regex is a match
    const isIncluded = include.reduce((acc, val) => {
        return !!path.match(new RegExp(val, 'u')) || acc
    }, false)

    return isIncluded
}

const replaceInDir = (
    path   : string,
    match  : RegExp,
    replc  : string,
    include: string[],
    exclude: string[],
) => fs.readdir(path, 'utf8', (error: Error, docs: string[]) => {
    if (error)
        console.error(error)
    else {
        docs.forEach((doc) => {
            const docPath = `${path}/${doc}`

            if (fs.statSync(docPath).isDirectory()) {
                // it is important to add `/` for the regex matching
                if (isPathIncluded(`${docPath}/`, include, exclude))
                    replaceInDir(docPath, match, replc, include, exclude)
            }

            if (fs.statSync(docPath).isFile()) {
                if (isPathIncluded(docPath, include, exclude))
                    replaceInFile(doc, path, match, replc)
            }
        })
    }
})

const pathToRegExp = (root: string) => (path: string) => {
    path = `^${root}/${path}`

    // // prepare insertion of different regexps
    // path = path.replace(/\*\*/gu, '[rec]')  // .*
    // path = path.replace(/\*/gu,   '[any]')  // [\\w\\.]+
    // // we do this because we can't replace '*'

    // // insert the regexps at their positions
    // path = path.replace(/\[rec\]/gu, '.*')
    // path = path.replace(/\[any\]/gu, '[\\w\\.]*')

    return `${path}$`
}

const paths = (paths: string[]) => {
    let possibilities: string[] = []

    paths.forEach((path) => {
        possibilities = [
            ...possibilities,                         // merge previous
            ...path.split('/').                       // split the path
            // @ts-ignore
            map((path, index, array) => {             // get combination
                return array.slice(0, index + 1)
            }).                                       // got combinations
            map((splitPath, index, splitPaths) => {   // put it back as path
                if (index < splitPaths.length - 1)    // add regex `$` for all
                    return `${splitPath.join('/')}/$` // merge string back
                return splitPath.join('/')            // but not the last one
            }),
        ]
    })

    return possibilities
}

const replace = (
    path: string,
    match: string,
    replc: string,
    include: string[],
    exclude: string[],
) => {
    // change/map paths to string regexps
    include = include.map(pathToRegExp(path))
    exclude = exclude.map(pathToRegExp(path))

    // only the end directory is included
    // so the algo can't follow by default
    // let's include all the possible paths
    const pathsInclude = paths(include)
    const pathsExclude = paths(exclude)

    include = include.concat(pathsInclude)
    exclude = exclude.concat(pathsExclude)

    // console.log(include)

    return replaceInDir(path, new RegExp(match, 'u'), replc, include, exclude)
}

export default replace


================================================
FILE: sources/Any/At.ts
================================================
import {Key} from './Key'
import {List} from '../List/List'

/**
 * Get in `O` the type of a field of key `K`
 * @param O to extract from
 * @param K to extract at
 * @returns [[Any]]
 * @example
 * ```ts
 * import {O} from 'ts-toolbelt'
 *
 * type User = {
 *  info: {
 *      name: string
 *      age: number
 *      payment: {}
 *  }
 *  id: number
 * }
 *
 * type test0 = O.At<User, 'id'> // number
 * ```
 */
export type At<A extends any, K extends Key> =
    A extends List
    ? number extends A['length']
      ? K extends number | `${number}`
        ? A[never] | undefined
        : undefined
      : K extends keyof A ? A[K] : undefined
    : unknown extends A ? unknown :
      K extends keyof A ? A[K] :
      undefined;


================================================
FILE: sources/Any/Await.ts
================================================
/**
 * Get the result type of a `Promise`
 * @param P A promise
 * @returns [[Any]]
 * @example
 * ```ts
 * import {C} from 'ts-toolbelt'
 *
 * const promise = new Promise<string>((res, rej) => res('x'))
 *
 * type test0 = C.Await<typeof promise>  // string
 * type test1 = C.Await<Promise<number>> // number
 * ```
 */
export type Await<P extends any> =
    P extends Promise<infer A>
    ? A
    : P


================================================
FILE: sources/Any/Cast.ts
================================================
/**
 * Ask TS to re-check that `A1` extends `A2`.
 * And if it fails, `A2` will be enforced anyway.
 * Can also be used to add constraints on parameters.
 * @param A1 to check against
 * @param A2 to cast to
 * @returns `A1 | A2`
 * @example
 * ```ts
 * import {A} from 'ts-toolbelt'
 *
 * type test0 = A.Cast<'42', string> // '42'
 * type test1 = A.Cast<'42', number> // number
 * ```
 */
export type Cast<A1 extends any, A2 extends any> =
    A1 extends A2
    ? A1
    : A2


================================================
FILE: sources/Any/Compute.ts
================================================
import {Depth} from '../Object/_Internal'
import {BuiltIn} from '../Misc/BuiltIn'
import {Has} from '../Union/Has'
import {If} from './If'
import {Key} from './Key'

/**
 * @hidden
 */
export type ComputeRaw<A extends any> =
    A extends Function
    ? A
    : {[K in keyof A]: A[K]} & unknown

/**
 * @hidden
 */
type ComputeFlat<A extends any> =
    A extends BuiltIn ? A :
    A extends Array<any>
    ? A extends Array<Record<Key, any>>
      ? Array<{[K in keyof A[number]]: A[number][K]} & unknown>
      : A
    : A extends ReadonlyArray<any>
      ? A extends ReadonlyArray<Record<Key, any>>
        ? ReadonlyArray<{[K in keyof A[number]]: A[number][K]} & unknown>
        : A
      : {[K in keyof A]: A[K]} & unknown;

/**
 * @hidden
 */
type ComputeDeep<A extends any, Seen = never> =
    A extends BuiltIn ? A : If<Has<Seen, A>, A, (
      A extends Array<any>
      ? A extends Array<Record<Key, any>>
        ? Array<{[K in keyof A[number]]: ComputeDeep<A[number][K], A | Seen>} & unknown>
        : A
      : A extends ReadonlyArray<any>
        ? A extends ReadonlyArray<Record<Key, any>>
          ? ReadonlyArray<{[K in keyof A[number]]: ComputeDeep<A[number][K], A | Seen>} & unknown>
          : A
        : {[K in keyof A]: ComputeDeep<A[K], A | Seen>} & unknown
    )>;

/**
 * Force TS to load a type that has not been computed (to resolve composed
 * types that TS haven't fully resolved, for display purposes mostly).
 * @param A to compute
 * @returns `A`
 * @example
 * ```ts
 * import {A} from 'ts-toolbelt'
 *
 * type test0 = A.Compute<{x: 'x'} & {y: 'y'}> // {x: 'x', y: 'y'}
 * ```
 */
export type Compute<A extends any, depth extends Depth = 'deep'> = {
    'flat': ComputeFlat<A>
    'deep': ComputeDeep<A>
}[depth]


================================================
FILE: sources/Any/Contains.ts
================================================
import {Extends} from './Extends'

/**
 * Check whether `A1` is part of `A2` or not. It works like
 * [[Extends]] but [[Boolean]] results are narrowed to [[False]].
 * @param A1
 * @param A2
 * @returns [[Boolean]]
 * @example
 * ```ts
 * type test0 = A.Contains<'a' | 'b', 'b'> // False
 * type test1 = A.Contains<'a', 'a' | 'b'> // True
 *
 * type test2 = A.Contains<{a: string}, {a: string, b: number}> // False
 * type test3 = A.Contains<{a: string, b: number}, {a: string}> // True
 *
 * type test4 = A.Contains<never, never> // False
 * /// Nothing cannot contain nothing, use `A.Equals`
 * ```
 */
export type Contains<A1 extends any, A2 extends any> =
    Extends<A1, A2> extends 1
    ? 1
    : 0


================================================
FILE: sources/Any/Equals.ts
================================================
/**
 * Check whether `A1` is equal to `A2` or not.
 * @param A1
 * @param A2
 * @returns [[Boolean]]
 * @example
 * ```ts
 * import {A} from 'ts-toolbelt'
 *
 * type test0 = A.Equals<42 | 0, 42 | 0>                    // true
 * type test1 = A.Equals<{a: string}, {b: string}>          // false
 * type test3 = A.Equals<{a: string}, {readonly a: string}> // false
 * ```
 */
export type Equals<A1 extends any, A2 extends any> =
    (<A>() => A extends A2 ? 1 : 0) extends (<A>() => A extends A1 ? 1 : 0)
    ? 1
    : 0

// Credit https://stackoverflow.com/a/52473108/3570903


================================================
FILE: sources/Any/Extends.ts
================================================
/**
 * Check whether `A1` is part of `A2` or not. The difference with
 * `extends` is that it forces a [[Boolean]] return.
 * @param A1
 * @param A2
 * @returns [[Boolean]]
 * @example
 * ```ts
 * import {A} from 'ts-toolbelt'
 *
 * type test0 = A.Extends<'a' | 'b', 'b'> // Boolean
 * type test1 = A.Extends<'a', 'a' | 'b'> // True
 *
 * type test2 = A.Extends<{a: string}, {a: any}>      // True
 * type test3 = A.Extends<{a: any}, {a: any, b: any}> // False
 *
 * type test4 = A.Extends<never, never> // False
 * /// Nothing cannot extend nothing, use `A.Equals`
 * ```
 */
export type Extends<A1 extends any, A2 extends any> =
    [A1] extends [never]
    ? 0
    : A1 extends A2
      ? 1
      : 0

/*
 * Comes from the fact that `never` is a fall-through type that we want to
 * narrow down to `0`. So it means that `Extends<never, never>` is false
 */


================================================
FILE: sources/Any/If.ts
================================================
import {Boolean} from '../Boolean/_Internal'

export type If<B extends Boolean, Then, Else = never> =
    B extends 1
    ? Then
    : Else


================================================
FILE: sources/Any/Is.ts
================================================
import {Match} from './_Internal'
import {Extends} from './Extends'
import {Equals} from './Equals'
import {Contains} from './Contains'

/**
 * Check whether `A` is similar to `A1` or not. In other words, it is a compact
 * type that bundles [[Equals]], [[Extends]], [[Contains]], comparison types.
 * @param A to be compared
 * @param A1 to compare to
 * @param match (?=`'default'`) to change precision
 * @returns [[Boolean]]
 * @example
 * ```ts
 * import {A} from 'ts-toolbelt'
 *
 * type test0 = A.Is<'a', 'a' | 'b', 'extends->'> // True
 * type test1 = A.Is<'a' | 'b', 'a', 'extends->'> // Boolean
 *
 * type test2 = A.Is<'a', 'a' | 'b', '<-extends'> // Boolean
 * type test3 = A.Is<'a' | 'b', 'a', '<-extends'> // True
 *
 * type test4 = A.Is<'a', 'a' | 'b', 'contains->'> // True
 * type test5 = A.Is<'a' | 'b', 'a', 'contains->'> // False
 *
 * type test6 = A.Is<'a', 'a' | 'b', '<-contains'> // False
 * type test7 = A.Is<'a' | 'b', 'a', '<-contains'> // True
 *
 * type test8 = A.Is<'a', 'a' | 'b', 'equals'>      // False
 * type test9 = A.Is<'b' |'a', 'a' | 'b', 'equals'> // True
 * ```
 */
export type Is<A extends any, A1 extends any, match extends Match = 'default'> = {
    'default'   : Extends<A,   A1>
    'contains->': Contains<A,  A1>
    'extends->' : Extends<A,   A1>
    '<-contains': Contains<A1, A>
    '<-extends' : Extends<A1,  A>
    'equals'    : Equals<A1,   A>
}[match]


================================================
FILE: sources/Any/Key.ts
================================================
/**
 * Describes index keys for any type
 */
export type Key = string | number | symbol


================================================
FILE: sources/Any/Keys.ts
================================================
import {List} from '../List/List'

/**
 * Get the keys of `A`
 * @param A
 * @returns [[Key]]
 * @example
 * ```ts
 * ```
 */
export type Keys<A extends any> =
    A extends List
    ? Exclude<keyof A, keyof any[]> | number
    : keyof A


================================================
FILE: sources/Any/KnownKeys.ts
================================================
import {Keys} from './Keys'

/**
 * Get the known keys of an [[Object]]
 * @param O
 * @returns [[Key]]
 * @example
 * ```ts
 * ```
 */
export type KnownKeys<O extends object> = {
    [K in keyof O]:
    string extends K ? never :
    number extends K ? never :
    K
} extends {
    [K in keyof O]: infer U
} ? U & Keys<O> : never;


================================================
FILE: sources/Any/Promise.ts
================================================
/**
 * Create an asynchronous operation like the original `Promise` type but this
 * one prevents promises to be wrapped within more promises (not possible).
 * @param A
 * @example
 * ```ts
 * import {A} from 'ts-toolbelt'
 *
 * type test0 = A.Promise<Promise<number>> // Promise<number>
 * type test1 = Promise<Promise<number>> // Promise<Promise<number>>
 * ```
 */
export type Promise<A extends any> =
    globalThis.Promise<
        A extends globalThis.Promise<infer X>
        ? X
        : A
    >


================================================
FILE: sources/Any/Try.ts
================================================
/**
 * Similar to [[Cast]] but with a custom fallback `Catch`. If it fails,
 * it will enforce `Catch` instead of `A2`.
 * @param A1 to check against
 * @param A2 to try/test with
 * @param Catch to fallback to if the test failed
 * @returns `A1 | Catch`
 * @example
 * ```ts
 * import {A} from 'ts-toolbelt'
 *
 * type test0 = A.Try<'42', string>          // '42'
 * type test1 = A.Try<'42', number>          // never
 * type test1 = A.Try<'42', number, 'tried'> // 'tried'
 * ```
 */
export type Try<A1 extends any, A2 extends any, Catch = never> =
    A1 extends A2
    ? A1
    : Catch


================================================
FILE: sources/Any/Type.ts
================================================
import {Key} from './Key'

declare const id: unique symbol

/**
 * Create your own opaque sub-type from a type `A`
 * @param A to be personalized
 * @param Id to name the sub-type
 * @returns A new type `Type<A, Id>`
 * @example
 * ```ts
 * import {A} from 'ts-toolbelt'
 *
 * type EUR = A.Type<number, 'eur'>
 * type USD = A.Type<number, 'usd'>
 *
 * let eurWallet = 10 as EUR
 * let usdWallet = 15 as USD
 *
 * eurWallet = usdWallet // error
 * ```
 */
export type Type<A extends any, Id extends Key> = {
    [id]: Id
} & A


================================================
FILE: sources/Any/_Internal.ts
================================================
/**
 * Describes the match strategy when matching types
 * * `default`     : `extends->`
 * * `contains->`  : X contains   Y ([[Contains]]<X, Y>)
 * * `extends->`   : X extends    Y ([[Extends]]<X, Y>)
 * * `<-contains`  : Y contains   X ([[Contains]]<Y, X>)
 * * `<-extends`   : Y extends    X ([[Extends]]<Y, X>)
 * * `equals`      : X equals     Y (([[Equals]]<X, Y>))
 */
export type Match = | 'default'
                    | 'contains->'
                    | 'extends->'
                    | '<-contains'
                    | '<-extends'
                    | 'equals'


================================================
FILE: sources/Any/_api.ts
================================================
/** @ignore *//** */

export {Await} from './Await'
export {At} from './At'
export {Cast} from './Cast'
export {Compute} from './Compute'
export {Contains} from './Contains'
export {Equals} from './Equals'
export {Extends} from './Extends'
export {Key} from './Key'
export {Keys} from './Keys'
export {KnownKeys} from './KnownKeys'
export {Is} from './Is'
export {Promise} from './Promise'
export {Try} from './Try'
export {Type} from './Type'
export {x} from './x'


================================================
FILE: sources/Any/x.ts
================================================
const _ = Symbol('x')

/**
 * A placeholder that is used in various ways
 */
export type x = typeof _ & {}


================================================
FILE: sources/Boolean/And.ts
================================================
import {Boolean} from './_Internal'

/**
 * Logical `&&` operator (behaves like the JS one)
 * @param B1 Left-hand side
 * @param B2 Right-hand side
 * @returns [[Boolean]]
 * @example
 * ```ts
 * import {B} from 'ts-toolbelt'
 *
 * type test0 = B.And<B.True, B.False>          // False
 * type test1 = B.And<B.True, B.True>           // True
 * type test2 = B.And<B.True | B.False, B.True> // Boolean
 * ```
 */
export type And<B1 extends Boolean, B2 extends Boolean> = {
    0: {
      0: 0
      1: 0
    }
    1: {
      0: 0
      1: 1
    }
}[B1][B2]



================================================
FILE: sources/Boolean/Not.ts
================================================
import {Boolean} from './_Internal'

/**
 * Logical `!` operator (behaves like the JS one)
 * @param B to negate
 * @returns [[Boolean]]
 * @example
 * ```ts
 * import {B} from 'ts-toolbelt'
 *
 * type test0 = B.Not<B.True>  // False
 * type test1 = B.Not<B.False> // True
 * ```
 */
export type Not<B extends Boolean> = {
    0: 1
    1: 0
}[B]


================================================
FILE: sources/Boolean/Or.ts
================================================
import {Boolean} from './_Internal'

/**
 * Logical `||` operator (behaves like the JS one)
 * @param B1 Left-hand side
 * @param B2 Right-hand side
 * @returns [[Boolean]]
 * @example
 * ```ts
 * import {B} from 'ts-toolbelt'
 *
 * type test0 = B.Or<B.True, B.False>    // True
 * type test1 = B.Or<B.True, B.True>     // True
 * type test2 = B.Or<B.Boolean, B.False> // Boolean
 * ```
 */
export type Or<B1 extends Boolean, B2 extends Boolean> = {
    0: {
        0: 0
        1: 1
    }
    1: {
        0: 1
        1: 1
    }
}[B1][B2]


================================================
FILE: sources/Boolean/Xor.ts
================================================
import {Boolean} from './_Internal'

/**
 * Logical `^` operator (behaves like the JS one)
 * @param B1 Left-hand side
 * @param B2 Right-hand side
 * @returns [[Boolean]]
 * @example
 * ```ts
 * import {B} from 'ts-toolbelt'
 *
 * type test0 = B.Xor<B.True, B.True>    // False
 * type test1 = B.Xor<B.False, B.True>   // True
 * type test2 = B.Xor<B.Boolean, B.True> // Boolean
 * ```
 */
export type Xor<B1 extends Boolean, B2 extends Boolean> = {
    0: {
        0: 0
        1: 1
    }
    1: {
        0: 1
        1: 0
    }
}[B1][B2]


================================================
FILE: sources/Boolean/_Internal.ts
================================================
export type Boolean = 0 | 1


================================================
FILE: sources/Boolean/_api.ts
================================================
/** @ignore *//** */

export {And} from './And'
export {Not} from './Not'
export {Or} from './Or'
export {Xor} from './Xor'


================================================
FILE: sources/Class/Class.ts
================================================
import {List} from '../List/List'

/**
 * Alias to create/describe a `class`
 * @param P its constructor parameters
 * @param R the object it constructs
 * @returns `class`
 * @example
 * ```ts
 * import {C} from 'ts-toolbelt'
 *
 * type test0 = C.Class<[string, number], {a: string, b: number}>
 *
 * declare const SomeClass: test0
 *
 * const obj = new SomeClass('foo', 42) // {a: string, b: number}
 * ```
 */
export type Class<P extends List = any[], R extends object = object> = {
    new (...args: P): R
}


================================================
FILE: sources/Class/Instance.ts
================================================
import {Class} from './Class'

/**
 * Get the instance type of a `class` from a class object
 * @param C * *typeof** class
 * @returns [[Object]]
 * @example
 * ```ts
 * import {C} from 'ts-toolbelt'
 *
 * /// `create` takes an instance constructor and creates an instance of it
 * declare function create<C extends (new (...args: any[]) => any)>(c: C): C.InstanceOf<C>
 *
 * class A {}
 * class B {}
 *
 * let a = create(A) // A
 * let b = create(B) // B
 * ```
 */
export type Instance<C extends Class> =
    C extends Class<any[], infer R>
    ? R
    : any


================================================
FILE: sources/Class/Parameters.ts
================================================
import {Class} from './Class'

/**
 * Get the parameters of a class constructor
 * @param C **typeof** class
 * @returns [[List]]
 * @example
 * ```ts
 * import {C} from 'ts-toolbelt'
 *
 * type User = C.Class<[string, string], {firstname: string, lastname: string}>
 *
 * type test0 = C.Parameters<User> // [string, string]
 * ```
 */
export type Parameters<C extends Class> =
    C extends Class<infer P, any>
    ? P
    : never


================================================
FILE: sources/Class/_api.ts
================================================
/** @ignore *//** */

export {Class} from './Class'
export {Instance} from './Instance'
export {Parameters} from './Parameters'


================================================
FILE: sources/Community/IncludesDeep.ts
================================================
import {Match} from '../Any/_Internal'
import {UnionOf} from '../Object/UnionOf'
import {Next} from '../Iteration/Next'
import {Prev} from '../Iteration/Prev'
import {Iteration} from '../Iteration/Iteration'
import {IterationOf} from '../Iteration/IterationOf'
import {Is} from '../Any/Is'
import {Boolean} from '../Boolean/_Internal'
import {Cast} from '../Any/Cast'
import {Pos} from '../Iteration/Pos'

/**
 * @hidden
 */
type _IncludesDeep<O, M extends any, match extends Match, limit extends number, I extends Iteration = IterationOf<0>> = {
    0: _IncludesDeep<O extends object ? UnionOf<O> : O, M, match, limit, Next<I>>
    1: 1
    2: 0
}[
    Pos<Prev<I>> extends limit // if we go past the limit
    ? 2                        // end the loop here
    : Is<O, M, match>          // if 0 => continue, if 1 => end
]

/**
 * Check whether `O`, or its sub-objects have fields that match `M`
 * where the maximum allowed depth is set with `limit`.
 *
 * @param O to be inspected
 * @param M to check field type
 * @param match (?=`'default'`) to change precision
 * @param limit (?=`'10'`) to change the check depth
 * @returns [[Boolean]]
 * @example
 * ```ts
 * ```
 * @author millsp, ctrlplusb
 */
export type IncludesDeep<O extends object, M extends any, match extends Match = 'default', limit extends number = 10> =
    _IncludesDeep<O, M, match, limit> extends infer X
    ? Cast<X, Boolean>
    : never


================================================
FILE: sources/Community/IsLiteral.ts
================================================
import {And} from '../Boolean/And'
import {Or} from '../Boolean/Or'
import {Extends} from '../Any/Extends'

/**
 * @hidden
 */
export type IsStringLiteral<A extends any> =
    A extends string
    ? string extends A
      ? 0
      : 1
    : 0

/**
 * @hidden
 */
export type IsNumberLiteral<A extends any> =
    A extends number
    ? number extends A
      ? 0
      : 1
    : 0

/**
 * Literal to restrict against
 */
export type Kind = string | number

/**
 * Determine whether `A` is literal or not
 * @param A to be checked
 * @param kind (?=`'string' | 'number'`) to restrict
 * @example
 * ```ts
 * import {A} from 'ts-toolbelt'
 *
 * type test0 = A.IsLiteral<1 | 2> // 1
 * type test1 = A.IsLiteral<1 | 2, string> // 0
 * type test2 = A.IsLiteral<1 | '2', string> // 0 | 1
 * type test3 = A.IsLiteral<number> // 0
 * ```
 */
export type IsLiteral<A extends any, kind extends Kind = Kind> =
    And<Or<IsStringLiteral<A>, IsNumberLiteral<A>>, Extends<A, kind>>


================================================
FILE: sources/Community/_api.ts
================================================
/** @ignore *//** */

export {IncludesDeep} from './IncludesDeep'
export {IsLiteral} from './IsLiteral'


================================================
FILE: sources/Function/AutoPath.ts
================================================
import {Key} from '../Any/Key'
import {Head} from '../List/Head'
import {List} from '../List/List'
import {Pop} from '../List/Pop'
import {Tail} from '../List/Tail'
import {Path} from '../Object/Path'
import {UnionOf} from '../Object/UnionOf'
import {Select} from '../Union/Select'
import {Join} from '../String/Join'
import {Split} from '../String/Split'

/**
 * @ignore
 */
type Index = number | string;

/**
 * @ignore
 */
type KeyToIndex<K extends Key, SP extends List<Index>> =
  number extends K ? Head<SP> : K & Index;

/**
 * @ignore
 */
type MetaPath<O, D extends string, SP extends List<Index> = [], P extends List<Index> = []> = {
  [K in keyof O]:
    | MetaPath<O[K], D, Tail<SP>, [...P, KeyToIndex<K, SP>]>
    | Join<[...P, KeyToIndex<K, SP>], D>;
};

/**
 * @ignore
 */
type NextPath<OP> =
  // the next paths after property `K` are on sub objects
  // O[K] === K | {x: '${K}.x' | {y: '${K}.x.y' ...}}
  // So we access O[K] then we only keep the next paths
  // To do this, we can just exclude `string` out of it:
  // O[K] === {x: '${K}.x' | {y: '${K}.x.y' ...}}
  // To do this, we create a union of what we just got
  // This will yield a union of paths and meta paths
  // We exclude the next paths (meta) paths by excluding
  // `object`. Then we are left with the direct next path
  Select<UnionOf<Exclude<OP, string> & {}>, string>;

/**
 * @ignore
 */
type ExecPath<A, SP extends List<Index>, Delimiter extends string> =
  // We go in the `MetaPath` of `O` to get the prop at `SP`
  // So we query what is going the `NextPath` at `O[...SP]`
  NextPath<Path<MetaPath<A, Delimiter, SP>, SP>>;

/**
 * @ignore
 */
type HintPath<A, P extends string, SP extends List<Index>, Exec extends string, D extends string> = [Exec] extends [never] // if has not found paths
  ? ExecPath<A, Pop<SP>, D> // display previous paths
  : Exec | P; // display current + next

/**
 * @ignore
 */
type _AutoPath<A, P extends string, D extends string, SP extends List<Index> = Split<P, D>> =
  HintPath<A, P, SP, ExecPath<A, SP, D>, D>;

/**
 * Auto-complete, validate, and query the string path of an object `O`
 * @param O to work on
 * @param P path of `O`
 * @param D (?=`'.'`) delimiter for path
 *
 * ```ts
 * declare function get<O extends object, P extends string>(
 *     object: O, path: AutoPath<O, P>
 * ): Path<O, Split<P, '.'>>
 *
 * declare const user: User
 *
 * type User = {
 *     name: string
 *     friends: User[]
 * }
 *
 * // works
 * const friendName = get(user, 'friends.40.name')
 * const friendFriendName = get(user, 'friends.40.friends.12.name')
 *
 * // errors
 * const friendNames = get(user, 'friends.40.names')
 * const friendFriendNames = get(user, 'friends.40.friends.12.names')
 * ```
 */
export type AutoPath<O extends any, P extends string, D extends string = '.'> =
  _AutoPath<O, P, D>;


================================================
FILE: sources/Function/Compose/List/Async.ts
================================================
/** @ignore *//** */

import {Function} from '../../Function'
import {Await} from '../../../Any/Await'
import {Curry} from '../../Curry'

/**
 *@hidden
 */
export type ComposeListAsync = {
    <
        R0,
        P extends any[],
    >(fns: [
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R0>>>

    <
        R0,
        R1,
        P extends any[],
    >(fns: [
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R1>>>

    <
        R0,
        R1,
        R2,
        P extends any[],
    >(fns: [
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R2>>>

    <
        R0,
        R1,
        R2,
        R3,
        P extends any[],
    >(fns: [
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R3>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        P extends any[],
    >(fns: [
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R4>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        P extends any[],
    >(fns: [
        Function<[Await<R4>],     R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R5>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        P extends any[],
    >(fns: [
        Function<[Await<R5>],     R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R4>],     R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R6>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        P extends any[],
    >(fns: [
        Function<[Await<R6>],     R7> | Curry<Function<[Await<R6>], R7>>,
        Function<[Await<R5>],     R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R4>],     R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R7>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        P extends any[],
    >(fns: [
        Function<[Await<R7>],     R8> | Curry<Function<[Await<R7>], R8>>,
        Function<[Await<R6>],     R7> | Curry<Function<[Await<R6>], R7>>,
        Function<[Await<R5>],     R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R4>],     R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R8>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        R9,
        P extends any[],
    >(fns: [
        Function<[Await<R8>],     R9> | Curry<Function<[Await<R8>], R9>>,
        Function<[Await<R7>],     R8> | Curry<Function<[Await<R7>], R8>>,
        Function<[Await<R6>],     R7> | Curry<Function<[Await<R6>], R7>>,
        Function<[Await<R5>],     R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R4>],     R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R9>>>
}


================================================
FILE: sources/Function/Compose/List/Sync.ts
================================================
/** @ignore *//** */

import {Curry} from '../../Curry'
import {Function} from '../../Function'

/**
 *@hidden
 */
export type ComposeListSync = {
    <
        R0,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R0>

    <
        R0,
        R1,
        P extends any[],
    >(fns: [
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R1>

    <
        R0,
        R1,
        R2,
        P extends any[],
    >(fns: [
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R2>

    <
        R0,
        R1,
        R2,
        R3,
        P extends any[],
    >(fns: [
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R3>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        P extends any[],
    >(fns: [
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R4>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        P extends any[],
    >(fns: [
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R5>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        P extends any[],
    >(fns: [
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R6>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        P extends any[],
    >(fns: [
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R7>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        P extends any[],
    >(fns: [
        Function<[R7], R8> | Curry<Function<[R7], R8>>,
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R8>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        R9,
        P extends any[],
    >(fns: [
        Function<[R8], R9> | Curry<Function<[R8], R9>>,
        Function<[R7], R8> | Curry<Function<[R7], R8>>,
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R9>
}


================================================
FILE: sources/Function/Compose/Multi/Async.ts
================================================
/** @ignore *//** */

import {Function} from '../../Function'
import {Await} from '../../../Any/Await'
import {Curry} from '../../Curry'

/**
 *@hidden
 */
export type ComposeMultiAsync = {
    <
        R0,
        P extends any[],
    >(...fns: [
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R0>>>

    <
        R0,
        R1,
        P extends any[],
    >(...fns: [
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R1>>>

    <
        R0,
        R1,
        R2,
        P extends any[],
    >(...fns: [
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R2>>>

    <
        R0,
        R1,
        R2,
        R3,
        P extends any[],
    >(...fns: [
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R3>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        P extends any[],
    >(...fns: [
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R4>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        P extends any[],
    >(...fns: [
        Function<[Await<R4>],     R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R5>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        P extends any[],
    >(...fns: [
        Function<[Await<R5>],     R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R4>],     R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R6>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        P extends any[],
    >(...fns: [
        Function<[Await<R6>],     R7> | Curry<Function<[Await<R6>], R7>>,
        Function<[Await<R5>],     R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R4>],     R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R7>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        P extends any[],
    >(...fns: [
        Function<[Await<R7>],     R8> | Curry<Function<[Await<R7>], R8>>,
        Function<[Await<R6>],     R7> | Curry<Function<[Await<R6>], R7>>,
        Function<[Await<R5>],     R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R4>],     R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R8>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        R9,
        P extends any[],
    >(...fns: [
        Function<[Await<R8>],     R9> | Curry<Function<[Await<R8>], R9>>,
        Function<[Await<R7>],     R8> | Curry<Function<[Await<R7>], R8>>,
        Function<[Await<R6>],     R7> | Curry<Function<[Await<R6>], R7>>,
        Function<[Await<R5>],     R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R4>],     R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R3>],     R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R2>],     R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R1>],     R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R0>],     R1> | Curry<Function<[Await<R0>], R1>>,
        Function<P,               R0> | Curry<Function<P,           R0>>,
    ]): Function<P, Promise<Await<R9>>>
}


================================================
FILE: sources/Function/Compose/Multi/Sync.ts
================================================

/** @ignore *//** */

import {Curry} from '../../Curry'
import {Function} from '../../Function'

/**
 *@hidden
 */
export type ComposeMultiSync = {
    <
        R0,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R0>

    <
        R0,
        R1,
        P extends any[],
    >(...fns: [
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R1>

    <
        R0,
        R1,
        R2,
        P extends any[],
    >(...fns: [
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R2>

    <
        R0,
        R1,
        R2,
        R3,
        P extends any[],
    >(...fns: [
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R3>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        P extends any[],
    >(...fns: [
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R4>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        P extends any[],
    >(...fns: [
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R5>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        P extends any[],
    >(...fns: [
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R6>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        P extends any[],
    >(...fns: [
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R7>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        P extends any[],
    >(...fns: [
        Function<[R7], R8> | Curry<Function<[R7], R8>>,
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R8>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        R9,
        P extends any[],
    >(...fns: [
        Function<[R8], R9> | Curry<Function<[R8], R9>>,
        Function<[R7], R8> | Curry<Function<[R7], R8>>,
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R9>
}


================================================
FILE: sources/Function/Compose.ts
================================================
import {IntersectOf} from '../Union/IntersectOf'
import {ComposeListAsync} from './Compose/List/Async'
import {ComposeListSync} from './Compose/List/Sync'
import {ComposeMultiAsync} from './Compose/Multi/Async'
import {ComposeMultiSync} from './Compose/Multi/Sync'
import {Input, Mode} from './_Internal'

/**
 * Compose [[Function]]s together
 * @param mode  (?=`'sync'`)    sync/async (this depends on your implementation)
 * @param input (?=`'multi'`)   whether you want it to take a list or parameters
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * /// If you are looking for creating types for `compose`
 * /// `Composer` will check for input & `Compose` the output
 * declare const compose: F.Compose
 *
 * const a = (a1: number) => `${a1}`
 * const c = (c1: string[]) => [c1]
 * const b = (b1: string) => [b1]
 *
 * compose(c, b, a)(42)
 *
 * /// And if you are looking for an async `compose` type
 * declare const compose: F.Compose<'async'>
 *
 * const a = async (a1: number) => `${a1}`
 * const b = async (b1: string) => [b1]
 * const c = async (c1: string[]) => [c1]
 *
 * await compose(c, b, a)(42)
 */
export type Compose<mode extends Mode = 'sync', input extends Input = 'multi'> = IntersectOf<{
    'sync' : {
        'multi': ComposeMultiSync
        'list' : ComposeListSync
    }
    'async': {
        'multi': ComposeMultiAsync
        'list' : ComposeListAsync
    }
}[mode][input]> // `IntersectOf` in case of unions


================================================
FILE: sources/Function/Curry.ts
================================================
import {Pos} from '../Iteration/Pos'
import {Concat} from '../List/Concat'
import {Length} from '../List/Length'
import {Next} from '../Iteration/Next'
import {Cast} from '../Any/Cast'
import {Parameters} from './Parameters'
import {Return} from './Return'
import {IterationOf} from '../Iteration/IterationOf'
import {Iteration} from '../Iteration/Iteration'
import {NonNullableFlat} from '../Object/NonNullable'
import {x} from '../Any/x'
import {List} from '../List/List'
import {Function} from './Function'
import {Extends} from '../Any/Extends'
import {Tail} from '../List/Tail'
import {RequiredKeys} from '../List/RequiredKeys'

/**
 * @hidden
 */
type _SplitParams<P extends List, PSplit extends List[] = [], PRest extends List = Tail<P>> = {
    0: P extends [...infer A, ...PRest]
       ? _SplitParams<Tail<P>, [...PSplit, A], Tail<PRest>>
       : never
    1: PSplit
    2: P[number][][]
}[
    number extends Length<P>
    ? 2
    : P extends []
      ? 1
      : 0
]

/**
 * Splits tuples to preserve their labels
 * @hidden
 */
type SplitParams<P extends List> =
    _SplitParams<P> extends infer X
    ? Cast<X, List[]>
    : never

/**
 * @hidden
 */
type _JoinParams<PSplit extends List[], L extends List = []> = {
    0: _JoinParams<Tail<PSplit>, [...L, ...PSplit[0]]>
    1: L
    2: PSplit[number][]
}[
    number extends Length<PSplit>
    ? 2
    : PSplit extends []
      ? 1
      : 0
]

/**
 * Undoes the job of [[SplitParams]]
 * @hidden
 */
type JoinParams<P extends List[]> =
    _JoinParams<P> extends infer X
    ? Cast<X, List>
    : never

/**
 * @hidden
 */
type GapOf<L1 extends List, L2 extends List[], LN extends List, I extends Iteration> =
    L1[Pos<I>] extends x
    ? Concat<LN, L2[Pos<I>]>
    : LN

/**
 * @hidden
 */
type _GapsOf<L1 extends List, L2 extends List[], LN extends List = [], L2D extends List[] = L2, I extends Iteration = IterationOf<0>> = {
    0: _GapsOf<L1, L2, GapOf<L1, L2, LN, I>, Tail<L2D>, Next<I>>
    1: Concat<LN, JoinParams<L2D>>
}[Extends<Pos<I>, Length<L1>>]

/**
 * @hidden
 */
type GapsOf<L1 extends List, L2 extends List> =
    _GapsOf<L1, SplitParams<L2>> extends infer X
    ? Cast<X, List>
    : never

/**
 * @hidden
 */
type Gaps<L extends List> = Cast<NonNullableFlat<{
    [K in keyof L]?: L[K] | x
}>, List>

/**
 * Curry a [[Function]]
 * @param F to curry
 * @returns [[Function]]
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * /// If you are looking for creating types for `curry`
 * /// It handles placeholders and variable arguments
 * declare function curry<Fn extends F.Function>(fn: Fn): F.Curry<Fn>
 * ```
 */
export type Curry<F extends Function> =
    <
        P extends Gaps<Parameters<F>>,
        G extends List = GapsOf<P, Parameters<F>>,
        R extends any = Return<F>
    >(...p: Gaps<Parameters<F>> | P) =>
        // handles optional parameters
        RequiredKeys<G> extends never
        ? R
        : Curry<(...p: G) => R>


================================================
FILE: sources/Function/Exact.ts
================================================
import {Narrowable} from './_Internal'

/**
 * Force `A` to comply with `W`. `A` must be a shape of `W`. In other words, `A`
 * must extend `W` and have the same properties - no more, no less.
 * @param A
 * @param W
 */
type Exact<A, W> =
W extends unknown ?
    A extends W
    ? A extends Narrowable
      ? A
      : {
            [K in keyof A]: K extends keyof W
                            ? Exact<A[K], W[K]>
                            : never
        }
    : W
: never;

export {Exact}


================================================
FILE: sources/Function/Function.ts
================================================
import {List} from '../List/List'

/**
 * Alias to create a [[Function]]
 * @param P parameters
 * @param R return type
 * @returns [[Function]]
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * type test0 = F.Function<[string, number], boolean>
 * /// (args_0: string, args_1: number) => boolean
 * ```
 */
export type Function<P extends List = any, R extends any = any> =
    (...args: P) => R


================================================
FILE: sources/Function/Length.ts
================================================
import {Function} from './Function'
import {Parameters} from './Parameters'
import {Length as LLength} from '../List/Length'

/**
 * Extract arguments' length from a [[Function]]
 * @param F to extract from
 * @returns [[String]] or `number`
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * const fn = (a1: any, a2: any) => {}
 *
 * type test0 = F.LengthOf<typeof fn>               // 2
 *
 * type test1 = F.LengthOf<(a1?: any) => any>       // 0 | 1
 *
 * type test2 = F.LengthOf<(...a: any[]) => any>    // number
 * ```
 */
export type Length<Fn extends Function> =
    LLength<Parameters<Fn>>


================================================
FILE: sources/Function/Narrow.ts
================================================
import {Try} from '../Any/Try'
import {Narrowable} from './_Internal'

/**
 * @hidden
 */
type NarrowRaw<A> =
| (A extends [] ? [] : never)
| (A extends Narrowable ? A : never)
| ({[K in keyof A]: A[K] extends Function
                    ? A[K]
                    : NarrowRaw<A[K]>});

/**
 * Prevent type widening on generic function parameters
 * @param A to narrow
 * @returns `A`
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * declare function foo<A extends any[]>(x: F.Narrow<A>): A;
 * declare function bar<A extends object>(x: F.Narrow<A>): A;
 *
 * const test0 = foo(['e', 2, true, {f: ['g', ['h']]}])
 * // `A` inferred : ['e', 2, true, {f: ['g']}]
 *
 * const test1 = bar({a: 1, b: 'c', d: ['e', 2, true, {f: ['g']}]})
 * // `A` inferred : {a: 1, b: 'c', d: ['e', 2, true, {f: ['g']}]}
 * ```
 */
type Narrow<A extends any> =
    Try<A, [], NarrowRaw<A>>

export {Narrow}


================================================
FILE: sources/Function/NoInfer.ts
================================================
/**
 * Explain to TS which function parameter has priority for generic inference
 * @param A to de-prioritize
 * @returns `A`
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * const fn0 = <A extends any>(a0: A, a1: F.NoInfer<A>): A => {
 *  return {} as unknown as A // just for the example
 * }
 *
 * const fn1 = <A extends any>(a0: F.NoInfer<A>, a1: A): A => {
 *  return {} as unknown as A // just for the example
 * }
 *
 * const fn2 = <A extends any>(a0: F.NoInfer<A>, a1: F.NoInfer<A>): A => {
 *  return {} as unknown as A // just for the example
 * }
 *
 * const test0 = fn0('b', 'a') // error: infer priority is `a0`
 * const test1 = fn1('b', 'a') // error: infer priority is `a1`
 * const test2 = fn2('b', 'a') // works: infer priority is `a0` | `a1`
 * ```
 * @see https://stackoverflow.com/questions/56687668
 */
export type NoInfer<A extends any> =
    [A][A extends any ? 0 : never]

/*
 * https://github.com/microsoft/TypeScript/issues/14829#issuecomment-322267089
 * https://stackoverflow.com/questions/56687668
 */




================================================
FILE: sources/Function/Parameters.ts
================================================
import {Function} from './Function'

/**
 * Extract parameters from a [[Function]]
 * @param F to extract from
 * @returns [[List]]
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * const fn = (name: string, age: number) => {}
 *
 * type test0 = F.ParamsOf<typeof fn>                         // [string, number]
 *
 * type test1 = F.ParamsOf<(name: string, age: number) => {}> // [string, number]
 * ```
 */
export type Parameters<F extends Function> =
    F extends ((...args: infer L) => any)
    ? L
    : never


================================================
FILE: sources/Function/Pipe/List/Async.ts
================================================
/** @ignore *//** */
import {Function} from '../../Function'
import {Await} from '../../../Any/Await'
import {Curry} from '../../Curry'

/**
 *@hidden
 */
export type PipeListAsync = {
    <
        R0,
        P extends any[],
    >(fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
    ]): Function<P,   Promise<Await<R0>>>

    <
        R0,
        R1,
        P extends any[],
    >(fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
    ]): Function<P,   Promise<Await<R1>>>

    <
        R0,
        R1,
        R2,
        P extends any[],
    >(fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
    ]): Function<P,   Promise<Await<R2>>>

    <
        R0,
        R1,
        R2,
        R3,
        P extends any[],
    >(fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
    ]): Function<P,   Promise<Await<R3>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        P extends any[],
    >(fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
    ]): Function<P,   Promise<Await<R4>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        P extends any[],
    >(fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R4>],       R5> | Curry<Function<[Await<R4>], R5>>,
    ]): Function<P,   Promise<Await<R5>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        P extends any[],
    >(fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R4>],       R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R5>],       R6> | Curry<Function<[Await<R5>], R6>>,
    ]): Function<P,   Promise<Await<R6>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        P extends any[],
    >(fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R4>],       R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R5>],       R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R6>],       R7> | Curry<Function<[Await<R6>], R7>>,
    ]): Function<P,   Promise<Await<R7>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        P extends any[],
    >(fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R4>],       R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R5>],       R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R6>],       R7> | Curry<Function<[Await<R6>], R7>>,
        Function<[Await<R7>],       R8> | Curry<Function<[Await<R7>], R8>>,
    ]): Function<P,   Promise<Await<R8>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        R9,
        P extends any[],
    >(fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R4>],       R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R5>],       R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R6>],       R7> | Curry<Function<[Await<R6>], R7>>,
        Function<[Await<R7>],       R8> | Curry<Function<[Await<R7>], R8>>,
        Function<[Await<R8>],       R9> | Curry<Function<[Await<R8>], R9>>,
    ]): Function<P,   Promise<Await<R9>>>
}


================================================
FILE: sources/Function/Pipe/List/Sync.ts
================================================
/** @ignore *//** */

import {Curry} from '../../Curry'
import {Function} from '../../Function'

/**
 *@hidden
 */
export type PipeListSync = {
    <
        R0,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R0>

    <
        R0,
        R1,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
    ]): Function<P,    R1>

    <
        R0,
        R1,
        R2,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
    ]): Function<P,    R2>

    <
        R0,
        R1,
        R2,
        R3,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
    ]): Function<P,    R3>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
    ]): Function<P,    R4>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
    ]): Function<P,    R5>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
    ]): Function<P,    R6>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
    ]): Function<P,    R7>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
        Function<[R7], R8> | Curry<Function<[R7], R8>>,
    ]): Function<P,    R8>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        R9,
        P extends any[],
    >(fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
        Function<[R7], R8> | Curry<Function<[R7], R8>>,
        Function<[R8], R9> | Curry<Function<[R8], R9>>,
    ]): Function<P,    R9>
}


================================================
FILE: sources/Function/Pipe/Multi/Async.ts
================================================
/** @ignore *//** */

import {Function} from '../../Function'
import {Await} from '../../../Any/Await'
import {Curry} from '../../Curry'

/**
 *@hidden
 */
export type PipeMultiAsync = {
    <
        R0,
        P extends any[],
    >(...fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
    ]): Function<P,   Promise<Await<R0>>>

    <
        R0,
        R1,
        P extends any[],
    >(...fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
    ]): Function<P,   Promise<Await<R1>>>

    <
        R0,
        R1,
        R2,
        P extends any[],
    >(...fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
    ]): Function<P,   Promise<Await<R2>>>

    <
        R0,
        R1,
        R2,
        R3,
        P extends any[],
    >(...fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
    ]): Function<P,   Promise<Await<R3>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        P extends any[],
    >(...fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
    ]): Function<P,   Promise<Await<R4>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        P extends any[],
    >(...fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R4>],       R5> | Curry<Function<[Await<R4>], R5>>,
    ]): Function<P,   Promise<Await<R5>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        P extends any[],
    >(...fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R4>],       R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R5>],       R6> | Curry<Function<[Await<R5>], R6>>,
    ]): Function<P,   Promise<Await<R6>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        P extends any[],
    >(...fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R4>],       R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R5>],       R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R6>],       R7> | Curry<Function<[Await<R6>], R7>>,
    ]): Function<P,   Promise<Await<R7>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        P extends any[],
    >(...fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R4>],       R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R5>],       R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R6>],       R7> | Curry<Function<[Await<R6>], R7>>,
        Function<[Await<R7>],       R8> | Curry<Function<[Await<R7>], R8>>,
    ]): Function<P,   Promise<Await<R8>>>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        R9,
        P extends any[],
    >(...fns: [
        Function<P,                 R0> | Curry<Function<P,           R0>>,
        Function<[Await<R0>],       R1> | Curry<Function<[Await<R0>], R1>>,
        Function<[Await<R1>],       R2> | Curry<Function<[Await<R1>], R2>>,
        Function<[Await<R2>],       R3> | Curry<Function<[Await<R2>], R3>>,
        Function<[Await<R3>],       R4> | Curry<Function<[Await<R3>], R4>>,
        Function<[Await<R4>],       R5> | Curry<Function<[Await<R4>], R5>>,
        Function<[Await<R5>],       R6> | Curry<Function<[Await<R5>], R6>>,
        Function<[Await<R6>],       R7> | Curry<Function<[Await<R6>], R7>>,
        Function<[Await<R7>],       R8> | Curry<Function<[Await<R7>], R8>>,
        Function<[Await<R8>],       R9> | Curry<Function<[Await<R8>], R9>>,
    ]): Function<P,   Promise<Await<R9>>>
}


================================================
FILE: sources/Function/Pipe/Multi/Sync.ts
================================================
/** @ignore *//** */

import {Curry} from '../../Curry'
import {Function} from '../../Function'

/**
 *@hidden
 */
export type PipeMultiSync = {
    <
        R0,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
    ]): Function<P,    R0>

    <
        R0,
        R1,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
    ]): Function<P,    R1>

    <
        R0,
        R1,
        R2,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
    ]): Function<P,    R2>

    <
        R0,
        R1,
        R2,
        R3,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
    ]): Function<P,    R3>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
    ]): Function<P,    R4>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
    ]): Function<P,    R5>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
    ]): Function<P,    R6>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
    ]): Function<P,    R7>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
        Function<[R7], R8> | Curry<Function<[R7], R8>>,
    ]): Function<P,    R8>

    <
        R0,
        R1,
        R2,
        R3,
        R4,
        R5,
        R6,
        R7,
        R8,
        R9,
        P extends any[],
    >(...fns: [
        Function<P,    R0> | Curry<Function<P,    R0>>,
        Function<[R0], R1> | Curry<Function<[R0], R1>>,
        Function<[R1], R2> | Curry<Function<[R1], R2>>,
        Function<[R2], R3> | Curry<Function<[R2], R3>>,
        Function<[R3], R4> | Curry<Function<[R3], R4>>,
        Function<[R4], R5> | Curry<Function<[R4], R5>>,
        Function<[R5], R6> | Curry<Function<[R5], R6>>,
        Function<[R6], R7> | Curry<Function<[R6], R7>>,
        Function<[R7], R8> | Curry<Function<[R7], R8>>,
        Function<[R8], R9> | Curry<Function<[R8], R9>>,
    ]): Function<P,    R9>
}


================================================
FILE: sources/Function/Pipe.ts
================================================
import {IntersectOf} from '../Union/IntersectOf'
import {PipeListAsync} from './Pipe/List/Async'
import {PipeListSync} from './Pipe/List/Sync'
import {PipeMultiAsync} from './Pipe/Multi/Async'
import {PipeMultiSync} from './Pipe/Multi/Sync'
import {Input, Mode} from './_Internal'

/**
 * Pipe [[Function]]s together
 * @param mode (?=`'sync'`) sync/async (this depends on your implementation)
 * @param input (?=`'multi'`) whether you want to take a list or multiple parameters
 * @returns [[Function]]
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * /// If you are looking for creating types for `pipe`:
 * declare const pipe: F.Pipe
 *
 * const a = (a1: number) => `${a1}`
 * const b = (b1: string) => [b1]
 * const c = (c1: string[]) => [c1]
 *
 * pipe(a, b, c)(42)
 *
 * /// And if you are looking for an async `pipe` type:
 * declare const pipe: F.Pipe<'async'>
 *
 * const a = async (a1: number) => `${a1}`
 * const b = async (b1: string) => [b1]
 * const c = async (c1: string[]) => [c1]
 *
 * await pipe(a, b, c)(42)
 * ```
 */
export type Pipe<mode extends Mode = 'sync', input extends Input = 'multi'> = IntersectOf<{
    'sync' : {
        'multi': PipeMultiSync
        'list' : PipeListSync
    }
    'async': {
        'multi': PipeMultiAsync
        'list' : PipeListAsync
    }
}[mode][input]> // `IntersectOf` in case of unions


================================================
FILE: sources/Function/Promisify.ts
================================================
import {Function} from './Function'
import {Parameters} from './Parameters'
import {Return} from './Return'
import {Promise} from '../Any/Promise'

/**
 * Creates a promisified version of a `Function` `F`
 * @param F to promisify
 * @returns async F
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * type test0 = F.Promisify<(a: number) => number> // (a: number) => Promise<number>
 * ```
 */
export type Promisify<F extends Function> =
    (...args: Parameters<F>) => Promise<Return<F>>


================================================
FILE: sources/Function/Return.ts
================================================
import {Function} from './Function'
import {List} from '../List/List'

/**
 * Extract the return type of a [[Function]]
 * @param F to extract from
 * @returns [[Any]]
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * const fn = () => true
 *
 * type test0 = F.ReturnOf<typeof fn>  // boolean
 *
 * type test1 = F.ReturnOf<() => true> // true
 * ```
 */
export type Return<F extends Function> =
    F extends ((...args: List) => infer R)
    ? R
    : never


================================================
FILE: sources/Function/UnCurry.ts
================================================
import {Curry} from './Curry'

/**
 * Undoes the work that was done by [[Curry]]
 * @param F to uncurry
 * @returns [[Function]]
 * @example
 * ```ts
 * import {F} from 'ts-toolbelt'
 *
 * type test0 = F.Curry<(a: string, b: number) => boolean>
 * declare const foo: test0
 * const res0 = foo('a') // F.Curry<(b: number) => boolean> & ((b: number) => boolean)
 *
 * type test1 = F.UnCurry<test0> // (a: string, b: number) => boolean
 * declare const bar: test1
 * const res1 = bar('a') // TS2554: Expected 2 arguments, but got 1.
 * ```
 * @ignore
 */
export type UnCurry<F extends Curry<any>> =
    F extends Curry<infer UF>
    ? UF
    : never


================================================
FILE: sources/Function/ValidPath.ts
================================================
import {IterationOf} from '../Iteration/IterationOf'
import {Iteration} from '../Iteration/Iteration'
import {Next} from '../Iteration/Next'
import {Pos} from '../Iteration/Pos'
import {At} from '../Any/At'
import {Cast} from '../Any/Cast'
import {NonNullable} from '../Union/NonNullable'
import {Update} from '../List/Update'
import {Key} from '../Iteration/Key'
import {Key as AKey} from '../Any/Key'
import {List} from '../List/List'
import {Length} from '../List/Length'
import {Extends} from '../Any/Extends'

/**
 * @hidden
 */
type ValidatePath<O, Path extends List<AKey>, I extends Iteration> =
    Update<
        Path,
        Key<I>,
        [At<O & {}, Path[Pos<I>]>] extends [never]
        ? keyof O
        : Path[Pos<I>]
    >

/**
 * @hidden
 */
type __ValidPath<O, Path extends List<AKey>, I extends Iteration = IterationOf<0>> = {
    0: __ValidPath<NonNullable<At<O & {}, Path[Pos<I>]>>, ValidatePath<O, Path, I>, Next<I>>
    1: Path
}[Extends<Pos<I>, Length<Path>>]

/**
 * @hidden
 */
export type _ValidPath<O extends object, Path extends List<AKey>> =
    __ValidPath<O, Path> extends infer X
    ? Cast<X, List<AKey>>
    : never

/**
 * Replaces invalid parts of a path with `never`
 * @param O to be inspected
 * @param Path to be validated
 * @returns [[Index]][]
 * @example
 * ```ts
 * import {A, L, O} from 'ts-toolbelt'
 *
 * // Get a property in an object `o` at any depth with `path`
 * // `A.Cast<P, O.ValidPath<O, P>>` makes sure `path` is valid
 * const getAt = <
 * O extends object,
 * P extends L.List<A.Index>
 * >(o: O, path: A.Cast<P, O.ValidPath<O, P>>): O.Path<O, P> => {
 *     let valueAt = o
 *
 *     for (const p of path)
 *         valueAt = valueAt[p]
 *
 *     return valueAt as any
 * }
 *
 * const test0 = getAt({a: {b: {c: 1}}},          ['a', 'b'] as const) // {c: number}
 * const test1 = getAt({a: {b: {c: 1}}} as const, ['a', 'b'] as const) // {c: 1}
 * const test2 = getAt({a: {b: {c: 1}}},          ['x'] as const)      // error
 * ```
 */
export type ValidPath<O extends object, Path extends List<AKey>> =
    O extends unknown
    ? Path extends unknown
      ? _ValidPath<O, Path>
      : never
    : never


================================================
FILE: sources/Function/_Internal.ts
================================================
/**
 * Describes function modes
 * `sync` : Normal function
 * `async`: Promised result
 */
export type Mode = 'sync' | 'async'

/**
 * Describes function parameter input
 * `multi`: ( a, b, c ... n ) => X
 * `list` : ([a, b, c ... n]) => X
 */
export type Input = 'multi' | 'list'

/**
 * Describes types that can be narrowed
 */
export type Narrowable =
| string
| number
| bigint
| boolean


================================================
FILE: sources/Function/_api.ts
================================================
/** @ignore *//** */

export {AutoPath} from './AutoPath'
export {Compose} from './Compose'
export {Exact} from './Exact'
export {Curry} from './Curry'
export {Function} from './Function'
export {Narrow} from './Narrow'
export {Length} from './Length'
export {NoInfer} from './NoInfer'
export {Parameters} from './Parameters'
export {Pipe} from './Pipe'
export {Promisify} from './Promisify'
export {Return} from './Return'
export {UnCurry} from './UnCurry'
export {ValidPath} from './ValidPath'


================================================
FILE: sources/Iteration/Iteration.ts
================================================
/**
 * An entry of `IterationMap`
 */
export type Iteration = [
    value: number,
    sign: '-' | '0' | '+',
    prev: keyof IterationMap,
    next: keyof IterationMap,
    oppo: keyof IterationMap,
]

export type IterationMap = {
    '__': [number, '-' | '0' | '+', '__', '__', '__'],
    '-100': [-100, '-', '__', '-99', '100'],
    '-99': [-99, '-', '-100', '-98', '99'],
    '-98': [-98, '-', '-99', '-97', '98'],
    '-97': [-97, '-', '-98', '-96', '97'],
    '-96': [-96, '-', '-97', '-95', '96'],
    '-95': [-95, '-', '-96', '-94', '95'],
    '-94': [-94, '-', '-95', '-93', '94'],
    '-93': [-93, '-', '-94', '-92', '93'],
    '-92': [-92, '-', '-93', '-91', '92'],
    '-91': [-91, '-', '-92', '-90', '91'],
    '-90': [-90, '-', '-91', '-89', '90'],
    '-89': [-89, '-', '-90', '-88', '89'],
    '-88': [-88, '-', '-89', '-87', '88'],
    '-87': [-87, '-', '-88', '-86', '87'],
    '-86': [-86, '-', '-87', '-85', '86'],
    '-85': [-85, '-', '-86', '-84', '85'],
    '-84': [-84, '-', '-85', '-83', '84'],
    '-83': [-83, '-', '-84', '-82', '83'],
    '-82': [-82, '-', '-83', '-81', '82'],
    '-81': [-81, '-', '-82', '-80', '81'],
    '-80': [-80, '-', '-81', '-79', '80'],
    '-79': [-79, '-', '-80', '-78', '79'],
    '-78': [-78, '-', '-79', '-77', '78'],
    '-77': [-77, '-', '-78', '-76', '77'],
    '-76': [-76, '-', '-77', '-75', '76'],
    '-75': [-75, '-', '-76', '-74', '75'],
    '-74': [-74, '-', '-75', '-73', '74'],
    '-73': [-73, '-', '-74', '-72', '73'],
    '-72': [-72, '-', '-73', '-71', '72'],
    '-71': [-71, '-', '-72', '-70', '71'],
    '-70': [-70, '-', '-71', '-69', '70'],
    '-69': [-69, '-', '-70', '-68', '69'],
    '-68': [-68, '-', '-69', '-67', '68'],
    '-67': [-67, '-', '-68', '-66', '67'],
    '-66': [-66, '-', '-67', '-65', '66'],
    '-65': [-65, '-', '-66', '-64', '65'],
    '-64': [-64, '-', '-65', '-63', '64'],
    '-63': [-63, '-', '-64', '-62', '63'],
    '-62': [-62, '-', '-63', '-61', '62'],
    '-61': [-61, '-', '-62', '-60', '61'],
    '-60': [-60, '-', '-61', '-59', '60'],
    '-59': [-59, '-', '-60', '-58', '59'],
    '-58': [-58, '-', '-59', '-57', '58'],
    '-57': [-57, '-', '-58', '-56', '57'],
    '-56': [-56, '-', '-57', '-55', '56'],
    '-55': [-55, '-', '-56', '-54', '55'],
    '-54': [-54, '-', '-55', '-53', '54'],
    '-53': [-53, '-', '-54', '-52', '53'],
    '-52': [-52, '-', '-53', '-51', '52'],
    '-51': [-51, '-', '-52', '-50', '51'],
    '-50': [-50, '-', '-51', '-49', '50'],
    '-49': [-49, '-', '-50', '-48', '49'],
    '-48': [-48, '-', '-49', '-47', '48'],
    '-47': [-47, '-', '-48', '-46', '47'],
    '-46': [-46, '-', '-47', '-45', '46'],
    '-45': [-45, '-', '-46', '-44', '45'],
    '-44': [-44, '-', '-45', '-43', '44'],
    '-43': [-43, '-', '-44', '-42', '43'],
    '-42': [-42, '-', '-43', '-41', '42'],
    '-41': [-41, '-', '-42', '-40', '41'],
    '-40': [-40, '-', '-41', '-39', '40'],
    '-39': [-39, '-', '-40', '-38', '39'],
    '-38': [-38, '-', '-39', '-37', '38'],
    '-37': [-37, '-', '-38', '-36', '37'],
    '-36': [-36, '-', '-37', '-35', '36'],
    '-35': [-35, '-', '-36', '-34', '35'],
    '-34': [-34, '-', '-35', '-33', '34'],
    '-33': [-33, '-', '-34', '-32', '33'],
    '-32': [-32, '-', '-33', '-31', '32'],
    '-31': [-31, '-', '-32', '-30', '31'],
    '-30': [-30, '-', '-31', '-29', '30'],
    '-29': [-29, '-', '-30', '-28', '29'],
    '-28': [-28, '-', '-29', '-27', '28'],
    '-27': [-27, '-', '-28', '-26', '27'],
    '-26': [-26, '-', '-27', '-25', '26'],
    '-25': [-25, '-', '-26', '-24', '25'],
    '-24': [-24, '-', '-25', '-23', '24'],
    '-23': [-23, '-', '-24', '-22', '23'],
    '-22': [-22, '-', '-23', '-21', '22'],
    '-21': [-21, '-', '-22', '-20', '21'],
    '-20': [-20, '-', '-21', '-19', '20'],
    '-19': [-19, '-', '-20', '-18', '19'],
    '-18': [-18, '-', '-19', '-17', '18'],
    '-17': [-17, '-', '-18', '-16', '17'],
    '-16': [-16, '-', '-17', '-15', '16'],
    '-15': [-15, '-', '-16', '-14', '15'],
    '-14': [-14, '-', '-15', '-13', '14'],
    '-13': [-13, '-', '-14', '-12', '13'],
    '-12': [-12, '-', '-13', '-11', '12'],
    '-11': [-11, '-', '-12', '-10', '11'],
    '-10': [-10, '-', '-11', '-9', '10'],
    '-9': [-9, '-', '-10', '-8', '9'],
    '-8': [-8, '-', '-9', '-7', '8'],
    '-7': [-7, '-', '-8', '-6', '7'],
    '-6': [-6, '-', '-7', '-5', '6'],
    '-5': [-5, '-', '-6', '-4', '5'],
    '-4': [-4, '-', '-5', '-3', '4'],
    '-3': [-3, '-', '-4', '-2', '3'],
    '-2': [-2, '-', '-3', '-1', '2'],
    '-1': [-1, '-', '-2', '0', '1'],
    '0': [0, '0', '-1', '1', '0'],
    '1': [1, '+', '0', '2', '-1'],
    '2': [2, '+', '1', '3', '-2'],
    '3': [3, '+', '2', '4', '-3'],
    '4': [4, '+', '3', '5', '-4'],
    '5': [5, '+', '4', '6', '-5'],
    '6': [6, '+', '5', '7', '-6'],
    '7': [7, '+', '6', '8', '-7'],
    '8': [8, '+', '7', '9', '-8'],
    '9': [9, '+', '8', '10', '-9'],
    '10': [10, '+', '9', '11', '-10'],
    '11': [11, '+', '10', '12', '-11'],
    '12': [12, '+', '11', '13', '-12'],
    '13': [13, '+', '12', '14', '-13'],
    '14': [14, '+', '13', '15', '-14'],
    '15': [15, '+', '14', '16', '-15'],
    '16': [16, '+', '15', '17', '-16'],
    '17': [17, '+', '16', '18', '-17'],
    '18': [18, '+', '17', '19', '-18'],
    '19': [19, '+', '18', '20', '-19'],
    '20': [20, '+', '19', '21', '-20'],
    '21': [21, '+', '20', '22', '-21'],
    '22': [22, '+', '21', '23', '-22'],
    '23': [23, '+', '22', '24', '-23'],
    '24': [24, '+', '23', '25', '-24'],
    '25': [25, '+', '24', '26', '-25'],
    '26': [26, '+', '25', '27', '-26'],
    '27': [27, '+', '26', '28', '-27'],
    '28': [28, '+', '27', '29', '-28'],
    '29': [29, '+', '28', '30', '-29'],
    '30': [30, '+', '29', '31', '-30'],
    '31': [31, '+', '30', '32', '-31'],
    '32': [32, '+', '31', '33', '-32'],
    '33': [33, '+', '32', '34', '-33'],
    '34': [34, '+', '33', '35', '-34'],
    '35': [35, '+', '34', '36', '-35'],
    '36': [36, '+', '35', '37', '-36'],
    '37': [37, '+', '36', '38', '-37'],
    '38': [38, '+', '37', '39', '-38'],
    '39': [39, '+', '38', '40', '-39'],
    '40': [40, '+', '39', '41', '-40'],
    '41': [41, '+', '40', '42', '-41'],
    '42': [42, '+', '41', '43', '-42'],
    '43': [43, '+', '42', '44', '-43'],
    '44': [44, '+', '43', '45', '-44'],
    '45': [45, '+', '44', '46', '-45'],
    '46': [46, '+', '45', '47', '-46'],
    '47': [47, '+', '46', '48', '-47'],
    '48': [48, '+', '47', '49', '-48'],
    '49': [49, '+', '48', '50', '-49'],
    '50': [50, '+', '49', '51', '-50'],
    '51': [51, '+', '50', '52', '-51'],
    '52': [52, '+', '51', '53', '-52'],
    '53': [53, '+', '52', '54', '-53'],
    '54': [54, '+', '53', '55', '-54'],
    '55': [55, '+', '54', '56', '-55'],
    '56': [56, '+', '55', '57', '-56'],
    '57': [57, '+', '56', '58', '-57'],
    '58': [58, '+', '57', '59', '-58'],
    '59': [59, '+', '58', '60', '-59'],
    '60': [60, '+', '59', '61', '-60'],
    '61': [61, '+', '60', '62', '-61'],
    '62': [62, '+', '61', '63', '-62'],
    '63': [63, '+', '62', '64', '-63'],
    '64': [64, '+', '63', '65', '-64'],
    '65': [65, '+', '64', '66', '-65'],
    '66': [66, '+', '65', '67', '-66'],
    '67': [67, '+', '66', '68', '-67'],
    '68': [68, '+', '67', '69', '-68'],
    '69': [69, '+', '68', '70', '-69'],
    '70': [70, '+', '69', '71', '-70'],
    '71': [71, '+', '70', '72', '-71'],
    '72': [72, '+', '71', '73', '-72'],
    '73': [73, '+', '72', '74', '-73'],
    '74': [74, '+', '73', '75', '-74'],
    '75': [75, '+', '74', '76', '-75'],
    '76': [76, '+', '75', '77', '-76'],
    '77': [77, '+', '76', '78', '-77'],
    '78': [78, '+', '77', '79', '-78'],
    '79': [79, '+', '78', '80', '-79'],
    '80': [80, '+', '79', '81', '-80'],
    '81': [81, '+', '80', '82', '-81'],
    '82': [82, '+', '81', '83', '-82'],
    '83': [83, '+', '82', '84', '-83'],
    '84': [84, '+', '83', '85', '-84'],
    '85': [85, '+', '84', '86', '-85'],
    '86': [86, '+', '85', '87', '-86'],
    '87': [87, '+', '86', '88', '-87'],
    '88': [88, '+', '87', '89', '-88'],
    '89': [89, '+', '88', '90', '-89'],
    '90': [90, '+', '89', '91', '-90'],
    '91': [91, '+', '90', '92', '-91'],
    '92': [92, '+', '91', '93', '-92'],
    '93': [93, '+', '92', '94', '-93'],
    '94': [94, '+', '93', '95', '-94'],
    '95': [95, '+', '94', '96', '-95'],
    '96': [96, '+', '95', '97', '-96'],
    '97': [97, '+', '96', '98', '-97'],
    '98': [98, '+', '97', '99', '-98'],
    '99': [99, '+', '98', '100', '-99'],
    '100': [100, '+', '99', '__', '-100'],
}


================================================
FILE: sources/Iteration/IterationOf.ts
================================================
import {IterationMap} from './Iteration'

/**
 * Transform a number into an [[Iteration]]
 * (to use [[Prev]], [[Next]], & [[Pos]])
 * @param N to transform
 * @returns [[Iteration]]
 * @example
 * ```ts
 * import {I} from 'ts-toolbelt'
 *
 * type i = I.IterationOf<0> // ["-1", "1", "0", 0, "0"]
 *
 * type next = I.Next<i>       // ["0", "2", "1", 1, "+"]
 * type prev = I.Prev<i>       // ["-2", "0", "-1", -1, "-"]
 *
 * type nnext = I.Pos<next>    // +1
 * type nprev = I.Pos<prev>    // -1
 * ```
 */
export type IterationOf<N extends number> =
    `${N}` extends keyof IterationMap
    ? IterationMap[`${N}`]
    : IterationMap['__']


================================================
FILE: sources/Iteration/Key.ts
================================================
import {Iteration} from './Iteration'

/**
 * Get the position of `I` (**string**)
 * @param I to query
 * @returns [[String]]
 * @example
 * ```ts
 * import {I} from 'ts-toolbelt'
 *
 * type i = I.IterationOf<'20'>
 *
 * type test0 = I.Key<i>         // '20'
 * type test1 = I.Key<I.Next<i>> // '21'
 * ```
 */
export type Key<I extends Iteration> =
    `${I[0]}`


================================================
FILE: sources/Iteration/Next.ts
================================================
import {Iteration, IterationMap} from './Iteration'

/**
 * Move `I`'s position forward
 * @param I to move
 * @returns [[Iteration]]
 * @example
 * ```ts
 * import {I} from 'ts-toolbelt'
 *
 * type i = I.IterationOf<'20'>
 *
 * type test0 = I.Pos<i>         // 20
 * type test1 = I.Pos<I.Next<i>> // 21
 * ```
 */
export type Next<I extends Iteration> =
    IterationMap[I[3]]


================================================
FILE: sources/Iteration/Pos.ts
================================================
import {Iteration} from './Iteration'

/**
 * Get the position of `I` (**number**)
 * @param I to query
 * @returns `number`
 * @example
 * ```ts
 * import {I} from 'ts-toolbelt'
 *
 * type i = I.IterationOf<'20'>
 *
 * type test0 = I.Pos<i>         // 20
 * type test1 = I.Pos<I.Next<i>> // 21
 * ```
 */
export type Pos<I extends Iteration> =
    I[0]


================================================
FILE: sources/Iteration/Prev.ts
================================================

import {Iteration, IterationMap} from './Iteration'
/**
 * Move `I`'s position backwards
 * @param I to move
 * @returns [[Iteration]]
 * @example
 * ```ts
 * import {I} from 'ts-toolbelt'
 *
 * type i = I.IterationOf<'20'>
 *
 * type test0 = I.Pos<i>         // 20
 * type test1 = I.Pos<I.Prev<i>> // 19
 * ```
 */
export type Prev<I extends Iteration> =
    IterationMap[I[2]] // continues iterating


================================================
FILE: sources/Iteration/_Internal.ts
================================================
/**
 * Describes how to perform iterations
 */
export type Way = '->' | '<-'

// ---------------------------------------------------------------------------------------

/**
 * Generate the [[IterationOf]] type
 * @param min -40
 * @param max +40
 */
const IterationOfGenerator = (min: number, max: number) => {
    // eslint-disable-next-line no-nested-ternary
    const sign = (i: number) => `"${i > 0 ? '+' : i < 0 ? '-' : '0'}"`
    const prev = (i: number) => `"${i === min ? '__' : i - 1}"`
    const next = (i: number) => `"${i === max ? '__' : i + 1}"`
    const oppo = (i: number) => `"${i * -1}"`
    const entry = (i: number) => `"${i}": [${i}, ${sign(i)}, ${prev(i)}, ${next(i)}, ${oppo(i)}],`

    console.log(`{${entry(min)}`)

    for (let i = min + 1, k = 1; i <= max - 1; i++, k++)
        console.log(entry(i))

    console.log(`${entry(max)}}`)
}

IterationOfGenerator(-100, +100)


================================================
FILE: sources/Iteration/_api.ts
================================================
/** @ignore *//** */

export {Iteration} from './Iteration'
export {IterationOf} from './IterationOf'
export {Key} from './Key'
export {Next} from './Next'
export {Pos} from './Pos'
export {Prev} from './Prev'


================================================
FILE: sources/List/Append.ts
================================================
import {List} from './List'

/**
 * Add an element `A` at the end of `L`.
 * @param L to append to
 * @param A to be added to
 * @returns [[List]]
 * @example
 * ```ts
 * import {L} from 'ts-toolbelt'
 *
 * type test0 = L.Append<[1, 2, 3], 4> // [1, 2, 3, 4]
 * type test1 = L.Append<[], 'a'> // ['a']
 * type test2 = L.Append<readonly ['a', 'b'], 'c'> // ['a', 'b', 'c']
 * type test3 = L.Append<[1, 2], [3, 4]> // [1, 2, [3, 4]]
 * ```
 */
export type Append<L extends List, A extends any> =
    [...L, A]


================================================
FILE: sources/List/Assign.ts
================================================
import {Assign as OAssign} from '../Object/Assign'
import {List} from './List'
import {Depth} from '../Object/_Internal'
import {BuiltIn} from '../Misc/BuiltIn'
import {Cast} from '../Any/Cast'

/**
 * Assign a list of [[List]] into `L` with [[Merge]]. Merges from left to
 * right, first items get overridden by the next ones (last-in overrides).
 * @param L to assign to
 * @param Ls to assign
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @param ignore (?=`BuiltIn`) types not to merge
 * @param fill (?=`undefined`) types of `O` to be replaced with ones of `O1`
 * @returns [[Object]]
 * @example
 * ```ts
 * import {L} from 'ts-toolbelt'
 *
 * type test0 = Assign<[1, 2, 3], [[2, 1]]> // [2, 1, 3]
 * type test1 = Assign<[], [[1, 2, 3, 4], [2, 4, 6]]> // [2, 4, 6, 4]
 * type test2 = Assign<[0, 0, 0, 0, 0], [[0, 1], [0, 2, 0, 4?]]> // [0, 2, 0, 0 | 4, 0]
 * ```
 */
export type Assign<L extends List, Ls extends List<List>, depth extends Depth = 'flat', ignore extends object = BuiltIn, fill extends any = never> =
    Cast<OAssign<L, Ls, depth, ignore, fill>, List>


================================================
FILE: sources/List/AtLeast.ts
================================================
import {Key} from './_Internal'
import {AtLeast as OAtLeast} from '../Object/AtLeast'
import {ObjectOf} from './ObjectOf'
import {_ListOf} from '../Object/ListOf'
import {List} from './List'
import {Keys} from '../Any/Keys'

/**
 * Make that at least one of the keys `K` are required in `L` at a time.
 * @param L to make required
 * @param K (?=`keyof L`) to choose fields
 * @returns [[List]] [[Union]]
 * @example
 * ```ts
 * import {L} from 'ts-toolbelt'
 *
 * type test0 = L.AtLeast<[1, 2, 3], 0> // [1, 2 | undefined, 3 | undefined]
 * type test1 = L.AtLeast<[1, 2, 3], 0 | 1> // [1, 2 | undefined, 3 | undefined] | [1 | undefined, 2, 3 | undefined]
 * type test2 = L.AtLeast<[1, 2, 3]>
 * // | [1, 2, 3]
 * // | [1, 2 | undefined, 3 | undefined]
 * // | [1 | undefined, 2, 3 | undefined]
 * // | [1 | undefined, 2 | undefined, 3]
 * ```
 */
export type AtLeast<L extends List, K extends Key = Keys<L>> =
    OAtLeast<ObjectOf<L>, `${K & number}` | K> extends infer U
    ? U extends unknown // we distribute over the union
      ? _ListOf<U & {}> // each union member to a list
      : never
    : never

declare const sym: unique symbol


================================================
FILE: sources/List/Compulsory.ts
================================================
import {Depth} from '../Object/_Internal'
import {CompulsoryPart} from '../Object/Compulsory'
import {List} from './List'
import {_Pick} from '../Object/Pick'
import {Cast} from '../Any/Cast'

/**
 * Make that `L`'s fields cannot be [[Nullable]] or [[Optional]] (it's like
 * [[Required]] & [[NonNullable]] at once).
 * @param L to make compulsory
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @returns [[List]]
 * @example
 * ```ts
 *  * import {L} from 'ts-toolbelt'
 *
 * type test0 = L.Compulsory<[1, 2, 3?, 4?]> // [1, 2, 3, 4]
 * type test1 = L.Compulsory<['a', 'b' | undefined, 'c', 'd', 'e' | null]> // ['a', 'b', 'c', 'd', 'e']
 * ```
 */
export type Compulsory<L extends List, depth extends Depth = 'flat'> =
    Cast<CompulsoryPart<L, depth>, List>


================================================
FILE: sources/List/CompulsoryKeys.ts
================================================
import {CompulsoryKeys as OCompulsoryKeys} from '../Object/CompulsoryKeys'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Get the keys of `L` that are [[Compulsory]]
 *
 * (⚠️ needs `--strictNullChecks` enabled)
 * @param L
 * @returns [[Key]]
 * @example
 * ```ts
 * import {L} from 'ts-toolbelt'
 *
 * type test0 = L.CompulsoryKeys<[1, 2, 3]> // {0: 1, 1: 2, 2: 3}
 * ```
 */
export type CompulsoryKeys<L extends List> =
    OCompulsoryKeys<ObjectOf<L>>


================================================
FILE: sources/List/Concat.ts
================================================
import {List} from './List'

/**
 * Attach `L1` at the end of `L`
 * @param L to concat with
 * @param L1 to be attached
 * @returns [[List]]
 * @example
 * ```ts
 * import {L} from 'ts-toolbelt'
 *
 * type test0 = L.Concat<[1, 2], [3, 4]> // [1, 2, 3, 4]
 * type test1 = L.Concat<[1, 2], [[3], 4]> // [1, 2, [3], 4]
 * type test2 = L.Concat<[1, 2], number[]> // [1, 2, ...number[]]
 * type test3 = L.Concat<readonly [1, 2], readonly [3]> // [1, 2, 3]
 * ```
 */
export type Concat<L extends List, L1 extends List> =
    [...L, ...L1]


================================================
FILE: sources/List/Diff.ts
================================================
import {Diff as ODiff} from '../Object/Diff'
import {ListOf} from '../Object/ListOf'
import {Match} from '../Any/_Internal'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Get a [[List]] that is the difference between `L` & `L1`
 * (`L`'s differences have priority over `L1`'s if entries overlap)
 * (If `match = 'default'`, no type checks are done)
 * @param L to check differences with
 * @param L1 to check differences against
 * @param match (?=`'default'`) to change precision
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Diff<L extends List, L1 extends List, match extends Match = 'default'> =
    ListOf<ODiff<ObjectOf<L>, ObjectOf<L1>, match>>


================================================
FILE: sources/List/Drop.ts
================================================
import {Tail} from './Tail'
import {Cast} from '../Any/Cast'
import {IterationOf} from '../Iteration/IterationOf'
import {Iteration} from '../Iteration/Iteration'
import {Way} from '../Iteration/_Internal'
import {List} from './List'
import {Pos} from '../Iteration/Pos'
import {Prev} from '../Iteration/Prev'
import {Prepend} from './Prepend'
import {Naked} from './_Internal'
import {Extends} from '../Any/Extends'

/**
 * @hidden
 */
type DropForth<L extends List, N extends Iteration> = {
    0: DropForth<Tail<L>, Prev<N>>
    1: L
}[Extends<0, Pos<N>>]

/**
 * @hidden
 */
type DropBack<L extends List, N extends Iteration, I extends Iteration = Prev<N>, LN extends List = []> = {
    0: DropBack<L, N, Prev<I>, Prepend<LN, L[Pos<I>]>>
    1: LN
}[Extends<-1, Pos<I>>]

/**
 * @hidden
 */
type __Drop<L extends List, N extends Iteration, way extends Way> = {
    '->': DropForth<L, N>
    '<-': DropBack<L, N>
}[way]

/**
 * @hidden
 */
export type _Drop<L extends List, N extends number, way extends Way = '->'> =
    __Drop<Naked<L>, IterationOf<N>, way> extends infer X
    ? Cast<X, List>
    : never

/**
 * Remove `N` entries out of `L`
 * @param L to remove from
 * @param N to remove out
 * @param way (?=`'->'`) from front: '->', from end: '<-'
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Drop<L extends List, N extends number, way extends Way = '->'> =
    L extends unknown
    ? N extends unknown
      ? _Drop<L, N, way>
      : never
    : never


================================================
FILE: sources/List/Either.ts
================================================
import {Key} from './_Internal'
import {Either as OEither} from '../Object/Either'
import {ObjectOf} from './ObjectOf'
import {_ListOf} from '../Object/ListOf'
import {List} from './List'
import {Boolean} from '../Boolean/_Internal'

/**
 * Split `L` into a [[Union]] with `K` keys in such a way that none of
 * the keys are ever present with one another within the different unions.
 * @param L to split
 * @param K to split with
 * @param strict (?=`1`) to force excess property checks https://github.com/microsoft/TypeScript/issues/20863
 * @returns [[List]] [[Union]]
 * @example
 * ```ts
 * ```
 */
export type Either<L extends List, K extends Key, strict extends Boolean = 1> =
    OEither<ObjectOf<L>, `${K & number}` | K, strict> extends infer OE
    ? OE extends unknown
      ? _ListOf<OE & {}>
      : never
    : never


================================================
FILE: sources/List/Exclude.ts
================================================
import {Match} from '../Any/_Internal'
import {ListOf} from '../Object/ListOf'
import {Exclude as OExclude} from '../Object/Exclude'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Exclude the entries of `L1` out of `L`
 * (If `match = 'default'`, no type checks are done)
 * @param L to remove from
 * @param L1 to remove out
 * @param match (?=`'default'`) to change precision
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Exclude<L extends List, L1 extends List, match extends Match = 'default'> =
    ListOf<OExclude<ObjectOf<L>, ObjectOf<L1>, match>>


================================================
FILE: sources/List/ExcludeKeys.ts
================================================
import {ExcludeKeys as OExcludeKeys} from '../Object/ExcludeKeys'
import {Match} from '../Any/_Internal'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Exclude the keys of `L1` out of the keys of `L`
 * (If `match = 'default'`, no type checks are done)
 * @param L to remove the keys from
 * @param L1 to remove the keys out
 * @param match (?=`'default'`) to change precision
 * @returns [[Key]]
 * @example
 * ```ts
 * ```
 */
export type ExcludeKeys<L extends List, L1 extends List, match extends Match = 'default'> =
    OExcludeKeys<ObjectOf<L>, ObjectOf<L1>, match>


================================================
FILE: sources/List/Extract.ts
================================================
import {KeySet} from './KeySet'
import {Pick} from './Pick'
import {List} from './List'

/**
 * Pick a range of entries (portion) from `L`
 * @param L to pick from
 * @param From to start with
 * @param To to end with
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Extract<L extends List, From extends number, To extends number> =
    Pick<L, KeySet<From, To>>


================================================
FILE: sources/List/Filter.ts
================================================
import {Filter as OFilter} from '../Object/Filter'
import {ListOf} from '../Object/ListOf'
import {Match} from '../Any/_Internal'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Filter out of `L` the entries that match `M`
 * @param L to remove from
 * @param M to select entries
 * @param match (?=`'default'`) to change precision
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Filter<L extends List, M extends any, match extends Match = 'default'> =
    ListOf<OFilter<ObjectOf<L>, M, match>>


================================================
FILE: sources/List/FilterKeys.ts
================================================
import {FilterKeys as OFilterKeys} from '../Object/FilterKeys'
import {Match} from '../Any/_Internal'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Filter out the keys of `L` which entries match `M`
 * @param L to remove from
 * @param M to select entries
 * @param match (?=`'default'`) to change precision
 * @returns [[Key]]
 * @example
 * ```ts
 * ```
 */
export type FilterKeys<L extends List, M extends any, match extends Match = 'default'> =
    OFilterKeys<ObjectOf<L>, M, match>


================================================
FILE: sources/List/Flatten.ts
================================================
import {List} from './List'
import {_UnNest} from './UnNest'
import {Cast} from '../Any/Cast'
import {Equals} from '../Any/Equals'
import {Iteration} from '../Iteration/Iteration'
import {IterationOf} from '../Iteration/IterationOf'
import {Extends} from '../Any/Extends'
import {Next} from '../Iteration/Next'
import {Or} from '../Boolean/Or'
import {Boolean} from '../Boolean/_Internal'

/**
 * @hidden
 */
type __Flatten<L extends List, LO extends List, strict extends Boolean, limit extends Iteration, I extends Iteration = IterationOf<0>> = {
    0: __Flatten<_UnNest<L, strict>, L, strict, limit, Next<I>>
    1: L
}[Or<Equals<L, LO>, Extends<limit, I>>]

/**
 * @hidden
 */
export type _Flatten<L extends List, strict extends Boolean, limit extends number = number> =
    __Flatten<L, [], strict, IterationOf<limit>> extends infer X
    ? Cast<X, List>
    : never

/**
 * Remove all dimensions of `L` (10 max)
 * @param L to un-nest
 * @param strict (?=`1`) `0` to not preserve tuples
 * @param limit (?=`string`) to stop un-nesting at
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Flatten<L extends List, strict extends Boolean = 1, limit extends number = number> =
    L extends unknown
    ? _Flatten<L, strict, limit>
    : never


================================================
FILE: sources/List/Group.ts
================================================
import {_Drop} from './Drop'
import {_Take} from './Take'
import {Cast} from '../Any/Cast'
import {Append} from './Append'
import {List} from './List'
import {Extends} from '../Any/Extends'

/**
 * @hidden
 */
type __Group<L extends List, N extends number, LN extends List = []> = {
    0: __Group<_Drop<L, N>, N, Append<LN, _Take<L, N>>>
    1: LN
}[Extends<L, List<never>>]

/**
 * @hidden
 */
export type _Group<L extends List, N extends number> =
    __Group<L, N> extends infer X
    ? Cast<X, List>
    : never

/**
 * Split `L` into sub-[[List]]s every `N`
 * @param L to group
 * @param N to split at
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Group<L extends List, N extends number> =
    L extends unknown
    ? N extends unknown
      ? _Group<L, N>
      : never
    : never


================================================
FILE: sources/List/Has.ts
================================================
import {Match} from '../Any/_Internal'
import {Has as OHas} from '../Object/Has'
import {Key} from './_Internal'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Check whether `L` has a entry of key `K` that matches `M`
 * @param L to be inspected
 * @param K to choose entry
 * @param M (?=`any`) to check entry type
 * @param match (?=`'default'`) to change precision
 * @returns [[Boolean]]
 * @example
 * ```ts
 * ```
 */
export type Has<L extends List, K extends Key, M extends any = any, match extends Match = 'default'> =
    OHas<ObjectOf<L>, `${K & number}` | K, M, match>


================================================
FILE: sources/List/HasPath.ts
================================================
import {HasPath as OHasPath} from '../Object/HasPath'
import {Match} from '../Any/_Internal'
import {Key} from '../Any/Key'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Check whether `L` has nested entries that match `M`
 * @param L to be inspected
 * @param Path to be followed
 * @param M (?=`any`) to check entry type
 * @param match (?=`'default'`) to change precision
 * @returns [[Boolean]]
 * @example
 * ```ts
 * ```
 */
export type HasPath<L extends List, Path extends List<Key>, M extends any = any, match extends Match = 'default'> =
    OHasPath<ObjectOf<L>, Path, M, match>


================================================
FILE: sources/List/Head.ts
================================================
import {Length} from './Length'
import {List} from './List'

/**
 * Get the first entry of `L`
 * @param L to extract from
 * @returns [[Any]]
 * @example
 * ```ts
 * ```
 */
export type Head<L extends List> =
    Length<L> extends 0
    ? never
    : L[0]


================================================
FILE: sources/List/Includes.ts
================================================
import {Match} from '../Any/_Internal'
import {Includes as OIncludes} from '../Object/Includes'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Check whether `L` has entries that match `M`
 * @param L to be inspected
 * @param M to check entry type
 * @param match (?=`'default'`) to change precision
 * @returns [[Boolean]]
 * @example
 * ```ts
 * ```
 */
export type Includes<L extends List, M extends any, match extends Match = 'default'> =
    OIncludes<ObjectOf<L>, M, match>


================================================
FILE: sources/List/Intersect.ts
================================================
import {Intersect as OIntersect} from '../Object/Intersect'
import {Match} from '../Any/_Internal'
import {ListOf} from '../Object/ListOf'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Get the intersecting entries of `L` & `L1`
 * (If `match = 'default'`, no type checks are done)
 * @param L to check similarities with
 * @param L1 to check similarities against
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Intersect<L extends List, L1 extends List, match extends Match = 'default'> =
    ListOf<OIntersect<ObjectOf<L>, ObjectOf<L1>, match>>


================================================
FILE: sources/List/IntersectKeys.ts
================================================
import {Match} from '../Any/_Internal'
import {IntersectKeys as OIntersectKeys} from '../Object/IntersectKeys'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Get the intersecting entries of `L` & `L1`
 * (If `match = 'default'`, no type checks are done)
 * @param L to check similarities with
 * @param L1 to check similarities against
 * @returns [[Key]]
 * @example
 * ```ts
 * ```
 */
export type IntersectKeys<L extends List, L1 extends List, match extends Match = 'default'> =
    OIntersectKeys<ObjectOf<L>, L1, match>


================================================
FILE: sources/List/KeySet.ts
================================================
import {Range} from '../Number/Range'
import {UnionOf} from './UnionOf'

/**
 * Create a set of keys
 * @param From to start with
 * @param To to end with
 * @returns [[Key]]
 * @example
 * ```ts
 * ```
 */
export type KeySet<From extends number, To extends number> =
    UnionOf<Range<From, To, '->'>>


================================================
FILE: sources/List/Last.ts
================================================
import {Tail} from './Tail'
import {Length} from './Length'
import {List} from './List'

/**
 * Get the last entry of `L`
 * @param L to extract from
 * @returns [[Any]]
 * @example
 * ```ts
 * ```
 */
export type Last<L extends List> =
    L[Length<Tail<L>>]


================================================
FILE: sources/List/LastKey.ts
================================================
import {Length} from './Length'
import {Tail} from './Tail'
import {List} from './List'

/**
 * Get the last index of `L`
 * @param L to get from
 * @returns `number`
 * @example
 * ```ts
 * ```
 */
export type LastKey<L extends List> =
    Length<Tail<L>>


================================================
FILE: sources/List/Length.ts
================================================
import {List} from './List'

/**
 * Get the length of `L`
 * @param L to get length
 * @returns [[String]] or `number`
 * @example
 * ```ts
 * ```
 */
export type Length<L extends List> =
    L['length']


================================================
FILE: sources/List/List.ts
================================================
/**
 * A [[List]]
 * @param A its type
 * @returns [[List]]
 * @example
 * ```ts
 * type list0 = [1, 2, 3]
 * type list1 = number[]
 * ```
 */
export type List<A = any> = ReadonlyArray<A>


================================================
FILE: sources/List/Longest.ts
================================================
import {Has} from '../Union/Has'
import {List} from './List'

/**
 * Get the longest [[List]] of `L` & `L1`
 * (`L` has priority if both lengths are equal)
 * @param L to compare length
 * @param L1 to compare length
 * @returns `L | L1`
 * @example
 * ```ts
 * ```
 */
export type Longest<L extends List, L1 extends List> =
    L extends unknown ? L1 extends unknown ?
    {0: L1, 1: L}[Has<keyof L, keyof L1>]
    : never : never


================================================
FILE: sources/List/Merge.ts
================================================
import {Merge as OMerge} from '../Object/Merge'
import {List} from './List'
import {Depth} from '../Object/_Internal'
import {BuiltIn} from '../Misc/BuiltIn'
import {Cast} from '../Any/Cast'

/**
 * Accurately merge the fields of `L` with the ones of `L1`. It is
 * equivalent to the spread operator in JavaScript. [[Union]]s and [[Optional]]
 * fields will be handled gracefully.
 *
 * (⚠️ needs `--strictNullChecks` enabled)
 * @param L to complete
 * @param L1 to copy from
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @param ignore (?=`BuiltIn`) types not to merge
 * @param fill (?=`undefined`) types of `O` to be replaced with ones of `O1`
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Merge<L extends List, L1 extends List, depth extends Depth = 'flat', ignore extends object = BuiltIn, fill extends any = undefined> =
    Cast<OMerge<L, L1, depth, ignore, fill>, List>


================================================
FILE: sources/List/MergeAll.ts
================================================
import {MergeAll as OMergeAll} from '../Object/MergeAll'
import {List} from '../List/List'
import {Depth} from '../Object/_Internal'
import {BuiltIn} from '../Misc/BuiltIn'
import {Cast} from '../Any/Cast'

/**
 * [[Merge]] a list of [[List]]s into `L`. Merges from left to right, first
 * items get completed by the next ones (last-in completes).
 * @param L to start with
 * @param Ls to merge
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @param ignore (?=`BuiltIn`) types not to merge
 * @param fill (?=`undefined`) types of `O` to be replaced with ones of `O1`
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type MergeAll<L extends List, Ls extends List<List>, depth extends Depth = 'flat', ignore extends object = BuiltIn, fill extends any = undefined> =
    Cast<OMergeAll<L, Ls, depth, ignore, fill>, List>


================================================
FILE: sources/List/Modify.ts
================================================
import {Replace} from '../Union/Replace'
import {x} from '../Any/x'
import {List} from './List'
import {Cast} from '../Any/Cast'
import {At} from '../Any/At'

/**
 * Modify `L` with `LMod` & the [[x]] placeholder
 * @param L to copy from
 * @param LMod to copy to
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Modify<L extends List, LMod extends List> = Cast<{
    [K in keyof LMod]: Replace<LMod[K], x, Exclude<At<L, K>, undefined>>
}, List>


================================================
FILE: sources/List/NonNullable.ts
================================================
import {_Pick} from '../Object/Pick'
import {Key} from './_Internal'
import {NonNullable as UNonNullable} from '../Union/NonNullable'
import {Depth} from '../Object/_Internal'
import {BuiltIn} from '../Misc/BuiltIn'
import {Cast} from '../Any/Cast'
import {List} from './List'

/**
 * @hidden
 */
export type NonNullableFlat<O, K extends Key = Key> = {
    [P in keyof O]: P extends K
                    ? UNonNullable<O[P]>
                    : O[P]
} & {}

/**
 * @hidden
 */
type _NonNullableDeep<O> = {
    [K in keyof O]: O[K] extends BuiltIn
                    ? O[K]
                    : NonNullableDeep<O[K], Key>
}

/**
 * @hidden
 */
export type NonNullableDeep<O, K extends Key = Key> =
    _NonNullableDeep<NonNullableFlat<O, K>>

/**
 * @hidden
 */
export type NonNullablePart<O extends object, K extends Key, depth extends Depth> = {
    'flat': NonNullableFlat<O, K>
    'deep': NonNullableDeep<O, K>
}[depth]

/**
 * Make some entries of `L` not nullable (deeply or not)
 * @param L to make non nullable
 * @param K (?=`Key`) to choose fields
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type NonNullable<L extends List, K extends Key = Key, depth extends Depth = 'flat'> =
    Cast<NonNullablePart<L, `${K & number}` | K, depth>, List>


================================================
FILE: sources/List/NonNullableKeys.ts
================================================
import {NonNullableKeys as ONonNullableKeys} from '../Object/NonNullableKeys'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Get the keys of `L` that are non-nullable
 * @param L
 * @returns [[Key]]
 * @example
 * ```ts
 * ```
 */
export type NonNullableKeys<L extends List> =
    ONonNullableKeys<ObjectOf<L>>


================================================
FILE: sources/List/Nullable.ts
================================================
import {Key} from './_Internal'
import {List} from './List'
import {Update} from '../Object/Update'
import {x} from '../Any/x'
import {Cast} from '../Any/Cast'

/**
 * Make some entries of `L` nullable (deeply or not)
 * @param L to make nullable
 * @param K (?=`Key`) to choose fields
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Nullable<L extends List, K extends Key = Key> =
    Cast<Update<L, `${K & number}` | K, x | null | undefined>, List>


================================================
FILE: sources/List/NullableKeys.ts
================================================
import {NullableKeys as ONullableKeys} from '../Object/NullableKeys'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Get the keys of `L` that are nullable
 * @param L
 * @returns [[Key]]
 * @example
 * ```ts
 * ```
 */
export type NullableKeys<L extends List> =
    ONullableKeys<ObjectOf<L>>


================================================
FILE: sources/List/ObjectOf.ts
================================================
import {_Omit} from '../Object/Omit'
import {_Pick} from '../Object/Pick'
import {Length} from './Length'
import {List} from './List'

/**
 * Transform a [[List]] into an [[Object]] equivalent
 * @param L to transform
 * @returns [[Object]]
 * @example
 * ```ts
 * ```
 */
export type ObjectOf<O extends List> =
    O extends unknown
    ? number extends Length<O> // detect arrays
      ? _Pick<O, number>       // preserves arrays
      : _Omit<O, keyof any[]>  // transforms tuples
    : never


================================================
FILE: sources/List/Omit.ts
================================================
import {_Omit as _OOmit} from '../Object/Omit'
import {_ListOf} from '../Object/ListOf'
import {Key} from './_Internal'
import {List} from './List'
import {ObjectOf} from './ObjectOf'

/**
 * @hidden
 */
export type _Omit<L extends List, K extends Key> =
    _ListOf<_OOmit<ObjectOf<L>, `${K & number}` | K>>

/**
 * Remove out of `L` the entries of key `K`
 * @param L to remove from
 * @param K to chose entries
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Omit<L extends List, K extends Key> =
    L extends unknown
    ? _Omit<L, K>
    : never


================================================
FILE: sources/List/Optional.ts
================================================
import {Cast} from '../Any/Cast'
import {OptionalPart} from '../Object/Optional'
import {Depth} from '../Object/_Internal'
import {List} from './List'

/**
 * Make `L` optional (deeply or not)
 * @param L to make optional
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Optional<L extends List, depth extends Depth = 'flat'> =
    Cast<OptionalPart<L, depth>, List>


================================================
FILE: sources/List/OptionalKeys.ts
================================================
import {OptionalKeys as OOptionalKeys} from '../Object/OptionalKeys'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Get the keys of `L` that are optional
 * @param L
 * @returns [[Key]]
 * @example
 * ```ts
 * ```
 */
export type OptionalKeys<L extends List> =
    OOptionalKeys<ObjectOf<L>>


================================================
FILE: sources/List/Overwrite.ts
================================================
import {Overwrite as OOverwrite} from '../Object/Overwrite'
import {Cast} from '../Any/Cast'
import {List} from './List'

/**
 * Update the entries of `L` with the ones of `L1`
 * @param L to update
 * @param L1 to update with
 * @returns [[Object]]
 * @example
 * ```ts
 * ```
 */
export type Overwrite<L extends List, L1 extends object> =
    Cast<OOverwrite<L, L1>, List>


================================================
FILE: sources/List/Partial.ts
================================================
import {Partial as OPartial} from '../Object/Partial'
import {Depth} from '../Object/_Internal'
import {Cast} from '../Any/Cast'
import {List} from './List'

/**
 * Make all fields of `O` optional (deeply or not)
 * @param L to make optional
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @returns [[List]]
 * @example
 * ```ts
 * import {O} from 'ts-toolbelt'
 *
 * type L = [1, 2, 3, [4, [5]]]
 *
 * type test0 = O.Partial<L>
 * type test1 = O.Partial<L, 'deep'>
 * ```
 */
export type Partial<L extends List, depth extends Depth = 'flat'> =
    Cast<OPartial<L, depth>, List>


================================================
FILE: sources/List/Patch.ts
================================================
import {Patch as OPatch} from '../Object/Patch'
import {List} from './List'
import {Depth} from '../Object/_Internal'
import {BuiltIn} from '../Misc/BuiltIn'
import {Cast} from '../Any/Cast'

/**
 * Complete the fields of `L` with the ones of `L1`. This is a version of
 * [[Merge]] that does NOT handle optional fields, it only completes fields of `O`
 * with the ones of `O1` if they don't exist.
 *
 * (⚠️ needs `--strictNullChecks` enabled)
 * @param L to complete
 * @param L1 to copy from
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @param ignore (?=`BuiltIn`) types not to merge
 * @param fill (?=`never`) types of `O` to be replaced with ones of `O1`
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Patch<L extends List, L1 extends List, depth extends Depth = 'flat', ignore extends object = BuiltIn, fill extends any = never> =
    Cast<OPatch<L, L1, depth, ignore, fill>, List>


================================================
FILE: sources/List/PatchAll.ts
================================================
import {PatchAll as OPatchAll} from '../Object/PatchAll'
import {List} from '../List/List'
import {Depth} from '../Object/_Internal'
import {BuiltIn} from '../Misc/BuiltIn'
import {Cast} from '../Any/Cast'

/**
 * [[Patch]] a list of [[List]]s into `L`. Patches from left to right, first
 * items get completed by the next ones (last-in completes).
 * @param O to start with
 * @param Os to patch
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @param ignore (?=`BuiltIn`) types not to merge
 * @param fill (?=`never`) types of `O` to be replaced with ones of `O1`
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type PatchAll<O extends List, Ls extends List<List>, depth extends Depth = 'flat', ignore extends object = BuiltIn, fill extends any = never> =
    Cast<OPatchAll<O, Ls, depth, ignore, fill>, List>


================================================
FILE: sources/List/Path.ts
================================================
import {Path as OPath} from '../Object/Path'
import {Key} from '../Any/Key'
import {List} from './List'

/**
 * Get in `L` the type of nested properties
 * @param L to be inspected
 * @param Path to be followed
 * @returns [[Any]]
 * @example
 * ```ts
 * ```
 */
export type Path<L extends List, Path extends List<Key>> =
    OPath<L, Path>


================================================
FILE: sources/List/Paths.ts
================================================
import {Paths as OPaths} from '../Object/Paths'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * Get all the possible paths of `L`
 * (⚠️ this won't work with circular-refs)
 * @param L to be inspected
 * @returns [[String]][]
 * @example
 * ```ts
 * ```
 */
export type Paths<L extends List> =
    OPaths<ObjectOf<L>>


================================================
FILE: sources/List/Pick.ts
================================================
import {_Pick as _OPick} from '../Object/Pick'
import {_ListOf} from '../Object/ListOf'
import {Key} from './_Internal'
import {ObjectOf} from './ObjectOf'
import {List} from './List'

/**
 * @hidden
 */
export type _Pick<L extends List, K extends Key> =
    _ListOf<_OPick<ObjectOf<L>, `${K & number}` | K>>

/**
 * Extract out of `L` the entries of key `K`
 * @param L to extract from
 * @param K to chose entries
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Pick<L extends List, K extends Key> =
    L extends unknown
    ? _Pick<L, K>
    : never


================================================
FILE: sources/List/Pop.ts
================================================
import {_Omit} from './Omit'
import {List} from './List'

/**
 * Remove the last element out of `L`
 * @param L to remove from
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Pop<L extends List> =
    L extends (readonly [...infer LBody, any] | readonly [...infer LBody, any?])
    ? LBody
    : L


================================================
FILE: sources/List/Prepend.ts
================================================
import {List} from './List'

/**
 * Add an element `A` at the beginning of `L`
 * @param L to append to
 * @param A to be added to
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Prepend<L extends List, A extends any> =
    [A, ...L]


================================================
FILE: sources/List/Readonly.ts
================================================
import {Depth} from '../Object/_Internal'
import {ReadonlyPart} from '../Object/Readonly'
import {List} from './List'
import {Cast} from '../Any/Cast'

/**
 * Make `L` readonly (deeply or not)
 * @param L to make readonly
 * @param depth (?=`'flat'`) 'deep' to do it deeply
 * @returns [[List]]
 * @example
 * ```ts
 * ```
 */
export type Readonly<L extends List, depth extends Depth = 'flat'> =
    Cast<ReadonlyPart<L, depth>, List>


================================================
FILE: sources/List/ReadonlyKeys.ts
================================================
import {ReadonlyKeys as OReadonlyKeys} from '../Object/ReadonlyKeys'
import {ObjectOf} from './Ob
Download .txt
gitextract_d0x81m7m/

├── .commitlintrc.json
├── .eslintrc.json
├── .github/
│   ├── CODEOWNERS
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── ---bug-report.md
│   │   └── ---feature-request.md
│   ├── pull_request_template.md
│   └── stale.yml
├── .gitignore
├── .huskyrc.json
├── .travis.yml
├── .versionrc.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── package.json
├── scripts/
│   ├── build/
│   │   ├── clean.sh
│   │   ├── code.sh
│   │   ├── docs.sh
│   │   └── types.sh
│   ├── ci/
│   │   ├── branch/
│   │   │   ├── ad.sh
│   │   │   └── bd.sh
│   │   ├── master/
│   │   │   ├── ad.sh
│   │   │   └── bd.sh
│   │   └── test/
│   │       ├── ad.sh
│   │       └── bd.sh
│   ├── release.sh
│   ├── test/
│   │   ├── all.sh
│   │   ├── code.sh
│   │   ├── lint.sh
│   │   └── types.sh
│   └── tools/
│       ├── check-deploy.sh
│       ├── dt-update-version.ts
│       ├── package-test-version.ts
│       └── regex-update-file.ts
├── sources/
│   ├── Any/
│   │   ├── At.ts
│   │   ├── Await.ts
│   │   ├── Cast.ts
│   │   ├── Compute.ts
│   │   ├── Contains.ts
│   │   ├── Equals.ts
│   │   ├── Extends.ts
│   │   ├── If.ts
│   │   ├── Is.ts
│   │   ├── Key.ts
│   │   ├── Keys.ts
│   │   ├── KnownKeys.ts
│   │   ├── Promise.ts
│   │   ├── Try.ts
│   │   ├── Type.ts
│   │   ├── _Internal.ts
│   │   ├── _api.ts
│   │   └── x.ts
│   ├── Boolean/
│   │   ├── And.ts
│   │   ├── Not.ts
│   │   ├── Or.ts
│   │   ├── Xor.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── Class/
│   │   ├── Class.ts
│   │   ├── Instance.ts
│   │   ├── Parameters.ts
│   │   └── _api.ts
│   ├── Community/
│   │   ├── IncludesDeep.ts
│   │   ├── IsLiteral.ts
│   │   └── _api.ts
│   ├── Function/
│   │   ├── AutoPath.ts
│   │   ├── Compose/
│   │   │   ├── List/
│   │   │   │   ├── Async.ts
│   │   │   │   └── Sync.ts
│   │   │   └── Multi/
│   │   │       ├── Async.ts
│   │   │       └── Sync.ts
│   │   ├── Compose.ts
│   │   ├── Curry.ts
│   │   ├── Exact.ts
│   │   ├── Function.ts
│   │   ├── Length.ts
│   │   ├── Narrow.ts
│   │   ├── NoInfer.ts
│   │   ├── Parameters.ts
│   │   ├── Pipe/
│   │   │   ├── List/
│   │   │   │   ├── Async.ts
│   │   │   │   └── Sync.ts
│   │   │   └── Multi/
│   │   │       ├── Async.ts
│   │   │       └── Sync.ts
│   │   ├── Pipe.ts
│   │   ├── Promisify.ts
│   │   ├── Return.ts
│   │   ├── UnCurry.ts
│   │   ├── ValidPath.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── Iteration/
│   │   ├── Iteration.ts
│   │   ├── IterationOf.ts
│   │   ├── Key.ts
│   │   ├── Next.ts
│   │   ├── Pos.ts
│   │   ├── Prev.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── List/
│   │   ├── Append.ts
│   │   ├── Assign.ts
│   │   ├── AtLeast.ts
│   │   ├── Compulsory.ts
│   │   ├── CompulsoryKeys.ts
│   │   ├── Concat.ts
│   │   ├── Diff.ts
│   │   ├── Drop.ts
│   │   ├── Either.ts
│   │   ├── Exclude.ts
│   │   ├── ExcludeKeys.ts
│   │   ├── Extract.ts
│   │   ├── Filter.ts
│   │   ├── FilterKeys.ts
│   │   ├── Flatten.ts
│   │   ├── Group.ts
│   │   ├── Has.ts
│   │   ├── HasPath.ts
│   │   ├── Head.ts
│   │   ├── Includes.ts
│   │   ├── Intersect.ts
│   │   ├── IntersectKeys.ts
│   │   ├── KeySet.ts
│   │   ├── Last.ts
│   │   ├── LastKey.ts
│   │   ├── Length.ts
│   │   ├── List.ts
│   │   ├── Longest.ts
│   │   ├── Merge.ts
│   │   ├── MergeAll.ts
│   │   ├── Modify.ts
│   │   ├── NonNullable.ts
│   │   ├── NonNullableKeys.ts
│   │   ├── Nullable.ts
│   │   ├── NullableKeys.ts
│   │   ├── ObjectOf.ts
│   │   ├── Omit.ts
│   │   ├── Optional.ts
│   │   ├── OptionalKeys.ts
│   │   ├── Overwrite.ts
│   │   ├── Partial.ts
│   │   ├── Patch.ts
│   │   ├── PatchAll.ts
│   │   ├── Path.ts
│   │   ├── Paths.ts
│   │   ├── Pick.ts
│   │   ├── Pop.ts
│   │   ├── Prepend.ts
│   │   ├── Readonly.ts
│   │   ├── ReadonlyKeys.ts
│   │   ├── Remove.ts
│   │   ├── Repeat.ts
│   │   ├── Replace.ts
│   │   ├── Required.ts
│   │   ├── RequiredKeys.ts
│   │   ├── Reverse.ts
│   │   ├── Select.ts
│   │   ├── SelectKeys.ts
│   │   ├── Shortest.ts
│   │   ├── Tail.ts
│   │   ├── Take.ts
│   │   ├── UnNest.ts
│   │   ├── Undefinable.ts
│   │   ├── UndefinableKeys.ts
│   │   ├── UnionOf.ts
│   │   ├── Unionize.ts
│   │   ├── Update.ts
│   │   ├── Writable.ts
│   │   ├── WritableKeys.ts
│   │   ├── Zip.ts
│   │   ├── ZipObj.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── Misc/
│   │   ├── BuiltIn.ts
│   │   ├── JSON/
│   │   │   ├── Array.ts
│   │   │   ├── Object.ts
│   │   │   ├── Primitive.ts
│   │   │   ├── Value.ts
│   │   │   └── _api.ts
│   │   ├── Primitive.ts
│   │   └── _api.ts
│   ├── Number/
│   │   ├── Absolute.ts
│   │   ├── Add.ts
│   │   ├── Greater.ts
│   │   ├── GreaterEq.ts
│   │   ├── IsNegative.ts
│   │   ├── IsPositive.ts
│   │   ├── IsZero.ts
│   │   ├── Lower.ts
│   │   ├── LowerEq.ts
│   │   ├── Negate.ts
│   │   ├── Range.ts
│   │   ├── Sub.ts
│   │   └── _api.ts
│   ├── Object/
│   │   ├── Assign.ts
│   │   ├── AtLeast.ts
│   │   ├── Compulsory.ts
│   │   ├── CompulsoryKeys.ts
│   │   ├── Diff.ts
│   │   ├── Either.ts
│   │   ├── Exclude.ts
│   │   ├── ExcludeKeys.ts
│   │   ├── Filter.ts
│   │   ├── FilterKeys.ts
│   │   ├── Has.ts
│   │   ├── HasPath.ts
│   │   ├── Includes.ts
│   │   ├── Intersect.ts
│   │   ├── IntersectKeys.ts
│   │   ├── Invert.ts
│   │   ├── ListOf.ts
│   │   ├── Merge.ts
│   │   ├── MergeAll.ts
│   │   ├── Modify.ts
│   │   ├── NonNullable.ts
│   │   ├── NonNullableKeys.ts
│   │   ├── Nullable.ts
│   │   ├── NullableKeys.ts
│   │   ├── Object.ts
│   │   ├── Omit.ts
│   │   ├── Optional.ts
│   │   ├── OptionalKeys.ts
│   │   ├── Overwrite.ts
│   │   ├── P/
│   │   │   ├── Merge.ts
│   │   │   ├── Omit.ts
│   │   │   ├── Pick.ts
│   │   │   ├── Readonly.ts
│   │   │   ├── Record.ts
│   │   │   ├── Update.ts
│   │   │   ├── _Internal.ts
│   │   │   └── _api.ts
│   │   ├── Partial.ts
│   │   ├── Patch.ts
│   │   ├── PatchAll.ts
│   │   ├── Path.ts
│   │   ├── Paths.ts
│   │   ├── Pick.ts
│   │   ├── Readonly.ts
│   │   ├── ReadonlyKeys.ts
│   │   ├── Record.ts
│   │   ├── Replace.ts
│   │   ├── Required.ts
│   │   ├── RequiredKeys.ts
│   │   ├── Select.ts
│   │   ├── SelectKeys.ts
│   │   ├── Undefinable.ts
│   │   ├── UndefinableKeys.ts
│   │   ├── UnionOf.ts
│   │   ├── Unionize.ts
│   │   ├── Update.ts
│   │   ├── Writable.ts
│   │   ├── WritableKeys.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── String/
│   │   ├── At.ts
│   │   ├── Join.ts
│   │   ├── Length.ts
│   │   ├── Replace.ts
│   │   ├── Split.ts
│   │   ├── _Internal.ts
│   │   └── _api.ts
│   ├── Test.ts
│   ├── Union/
│   │   ├── Diff.ts
│   │   ├── Exclude.ts
│   │   ├── Filter.ts
│   │   ├── Has.ts
│   │   ├── Intersect.ts
│   │   ├── IntersectOf.ts
│   │   ├── Last.ts
│   │   ├── ListOf.ts
│   │   ├── Merge.ts
│   │   ├── NonNullable.ts
│   │   ├── Nullable.ts
│   │   ├── Pop.ts
│   │   ├── Replace.ts
│   │   ├── Select.ts
│   │   ├── Strict.ts
│   │   └── _api.ts
│   └── index.ts
├── tests/
│   ├── Any.ts
│   ├── Boolean.ts
│   ├── Class.ts
│   ├── Community.ts
│   ├── Function.ts
│   ├── Iteration.ts
│   ├── List.ts
│   ├── Misc.ts
│   ├── Number.ts
│   ├── Object.ts
│   ├── String.ts
│   └── Union.ts
└── tsconfig.json
Download .txt
SYMBOL INDEX (588 symbols across 234 files)

FILE: sources/Any/At.ts
  type At (line 25) | type At<A extends any, K extends Key> =

FILE: sources/Any/Await.ts
  type Await (line 15) | type Await<P extends any> =

FILE: sources/Any/Cast.ts
  type Cast (line 16) | type Cast<A1 extends any, A2 extends any> =

FILE: sources/Any/Compute.ts
  type ComputeRaw (line 10) | type ComputeRaw<A extends any> =
  type ComputeFlat (line 18) | type ComputeFlat<A extends any> =
  type ComputeDeep (line 33) | type ComputeDeep<A extends any, Seen = never> =
  type Compute (line 58) | type Compute<A extends any, depth extends Depth = 'deep'> = {

FILE: sources/Any/Contains.ts
  type Contains (line 21) | type Contains<A1 extends any, A2 extends any> =

FILE: sources/Any/Equals.ts
  type Equals (line 15) | type Equals<A1 extends any, A2 extends any> =

FILE: sources/Any/Extends.ts
  type Extends (line 21) | type Extends<A1 extends any, A2 extends any> =

FILE: sources/Any/If.ts
  type If (line 3) | type If<B extends Boolean, Then, Else = never> =

FILE: sources/Any/Is.ts
  type Is (line 33) | type Is<A extends any, A1 extends any, match extends Match = 'default'> = {

FILE: sources/Any/Key.ts
  type Key (line 4) | type Key = string | number | symbol

FILE: sources/Any/Keys.ts
  type Keys (line 11) | type Keys<A extends any> =

FILE: sources/Any/KnownKeys.ts
  type KnownKeys (line 11) | type KnownKeys<O extends object> = {

FILE: sources/Any/Promise.ts
  type Promise (line 13) | type Promise<A extends any> =

FILE: sources/Any/Try.ts
  type Try (line 17) | type Try<A1 extends any, A2 extends any, Catch = never> =

FILE: sources/Any/Type.ts
  type Type (line 23) | type Type<A extends any, Id extends Key> = {

FILE: sources/Any/_Internal.ts
  type Match (line 10) | type Match = | 'default'

FILE: sources/Any/x.ts
  type x (line 6) | type x = typeof _ & {}

FILE: sources/Boolean/And.ts
  type And (line 17) | type And<B1 extends Boolean, B2 extends Boolean> = {

FILE: sources/Boolean/Not.ts
  type Not (line 15) | type Not<B extends Boolean> = {

FILE: sources/Boolean/Or.ts
  type Or (line 17) | type Or<B1 extends Boolean, B2 extends Boolean> = {

FILE: sources/Boolean/Xor.ts
  type Xor (line 17) | type Xor<B1 extends Boolean, B2 extends Boolean> = {

FILE: sources/Boolean/_Internal.ts
  type Boolean (line 1) | type Boolean = 0 | 1

FILE: sources/Class/Class.ts
  type Class (line 19) | type Class<P extends List = any[], R extends object = object> = {

FILE: sources/Class/Instance.ts
  type Instance (line 21) | type Instance<C extends Class> =

FILE: sources/Class/Parameters.ts
  type Parameters (line 16) | type Parameters<C extends Class> =

FILE: sources/Community/IncludesDeep.ts
  type _IncludesDeep (line 15) | type _IncludesDeep<O, M extends any, match extends Match, limit extends ...
  type IncludesDeep (line 39) | type IncludesDeep<O extends object, M extends any, match extends Match =...

FILE: sources/Community/IsLiteral.ts
  type IsStringLiteral (line 8) | type IsStringLiteral<A extends any> =
  type IsNumberLiteral (line 18) | type IsNumberLiteral<A extends any> =
  type Kind (line 28) | type Kind = string | number
  type IsLiteral (line 44) | type IsLiteral<A extends any, kind extends Kind = Kind> =

FILE: sources/Function/AutoPath.ts
  type Index (line 15) | type Index = number | string;
  type KeyToIndex (line 20) | type KeyToIndex<K extends Key, SP extends List<Index>> =
  type MetaPath (line 26) | type MetaPath<O, D extends string, SP extends List<Index> = [], P extend...
  type NextPath (line 35) | type NextPath<OP> =
  type ExecPath (line 50) | type ExecPath<A, SP extends List<Index>, Delimiter extends string> =
  type HintPath (line 58) | type HintPath<A, P extends string, SP extends List<Index>, Exec extends ...
  type _AutoPath (line 65) | type _AutoPath<A, P extends string, D extends string, SP extends List<In...
  type AutoPath (line 95) | type AutoPath<O extends any, P extends string, D extends string = '.'> =

FILE: sources/Function/Compose.ts
  type Compose (line 35) | type Compose<mode extends Mode = 'sync', input extends Input = 'multi'> ...

FILE: sources/Function/Compose/List/Async.ts
  type ComposeListAsync (line 10) | type ComposeListAsync = {

FILE: sources/Function/Compose/List/Sync.ts
  type ComposeListSync (line 9) | type ComposeListSync = {

FILE: sources/Function/Compose/Multi/Async.ts
  type ComposeMultiAsync (line 10) | type ComposeMultiAsync = {

FILE: sources/Function/Compose/Multi/Sync.ts
  type ComposeMultiSync (line 10) | type ComposeMultiSync = {

FILE: sources/Function/Curry.ts
  type _SplitParams (line 21) | type _SplitParams<P extends List, PSplit extends List[] = [], PRest exte...
  type SplitParams (line 39) | type SplitParams<P extends List> =
  type _JoinParams (line 47) | type _JoinParams<PSplit extends List[], L extends List = []> = {
  type JoinParams (line 63) | type JoinParams<P extends List[]> =
  type GapOf (line 71) | type GapOf<L1 extends List, L2 extends List[], LN extends List, I extend...
  type _GapsOf (line 79) | type _GapsOf<L1 extends List, L2 extends List[], LN extends List = [], L...
  type GapsOf (line 87) | type GapsOf<L1 extends List, L2 extends List> =
  type Gaps (line 95) | type Gaps<L extends List> = Cast<NonNullableFlat<{
  type Curry (line 112) | type Curry<F extends Function> =

FILE: sources/Function/Exact.ts
  type Exact (line 9) | type Exact<A, W> =

FILE: sources/Function/Function.ts
  type Function (line 16) | type Function<P extends List = any, R extends any = any> =

FILE: sources/Function/Length.ts
  type Length (line 22) | type Length<Fn extends Function> =

FILE: sources/Function/Narrow.ts
  type NarrowRaw (line 7) | type NarrowRaw<A> =
  type Narrow (line 32) | type Narrow<A extends any> =

FILE: sources/Function/NoInfer.ts
  type NoInfer (line 27) | type NoInfer<A extends any> =

FILE: sources/Function/Parameters.ts
  type Parameters (line 18) | type Parameters<F extends Function> =

FILE: sources/Function/Pipe.ts
  type Pipe (line 36) | type Pipe<mode extends Mode = 'sync', input extends Input = 'multi'> = I...

FILE: sources/Function/Pipe/List/Async.ts
  type PipeListAsync (line 9) | type PipeListAsync = {

FILE: sources/Function/Pipe/List/Sync.ts
  type PipeListSync (line 9) | type PipeListSync = {

FILE: sources/Function/Pipe/Multi/Async.ts
  type PipeMultiAsync (line 10) | type PipeMultiAsync = {

FILE: sources/Function/Pipe/Multi/Sync.ts
  type PipeMultiSync (line 9) | type PipeMultiSync = {

FILE: sources/Function/Promisify.ts
  type Promisify (line 17) | type Promisify<F extends Function> =

FILE: sources/Function/Return.ts
  type Return (line 19) | type Return<F extends Function> =

FILE: sources/Function/UnCurry.ts
  type UnCurry (line 21) | type UnCurry<F extends Curry<any>> =

FILE: sources/Function/ValidPath.ts
  type ValidatePath (line 18) | type ValidatePath<O, Path extends List<AKey>, I extends Iteration> =
  type __ValidPath (line 30) | type __ValidPath<O, Path extends List<AKey>, I extends Iteration = Itera...
  type _ValidPath (line 38) | type _ValidPath<O extends object, Path extends List<AKey>> =
  type ValidPath (line 71) | type ValidPath<O extends object, Path extends List<AKey>> =

FILE: sources/Function/_Internal.ts
  type Mode (line 6) | type Mode = 'sync' | 'async'
  type Input (line 13) | type Input = 'multi' | 'list'
  type Narrowable (line 18) | type Narrowable =

FILE: sources/Iteration/Iteration.ts
  type Iteration (line 4) | type Iteration = [
  type IterationMap (line 12) | type IterationMap = {

FILE: sources/Iteration/IterationOf.ts
  type IterationOf (line 21) | type IterationOf<N extends number> =

FILE: sources/Iteration/Key.ts
  type Key (line 17) | type Key<I extends Iteration> =

FILE: sources/Iteration/Next.ts
  type Next (line 17) | type Next<I extends Iteration> =

FILE: sources/Iteration/Pos.ts
  type Pos (line 17) | type Pos<I extends Iteration> =

FILE: sources/Iteration/Prev.ts
  type Prev (line 17) | type Prev<I extends Iteration> =

FILE: sources/Iteration/_Internal.ts
  type Way (line 4) | type Way = '->' | '<-'

FILE: sources/List/Append.ts
  type Append (line 18) | type Append<L extends List, A extends any> =

FILE: sources/List/Assign.ts
  type Assign (line 25) | type Assign<L extends List, Ls extends List<List>, depth extends Depth =...

FILE: sources/List/AtLeast.ts
  type AtLeast (line 26) | type AtLeast<L extends List, K extends Key = Keys<L>> =

FILE: sources/List/Compulsory.ts
  type Compulsory (line 21) | type Compulsory<L extends List, depth extends Depth = 'flat'> =

FILE: sources/List/CompulsoryKeys.ts
  type CompulsoryKeys (line 18) | type CompulsoryKeys<L extends List> =

FILE: sources/List/Concat.ts
  type Concat (line 18) | type Concat<L extends List, L1 extends List> =

FILE: sources/List/Diff.ts
  type Diff (line 19) | type Diff<L extends List, L1 extends List, match extends Match = 'defaul...

FILE: sources/List/Drop.ts
  type DropForth (line 16) | type DropForth<L extends List, N extends Iteration> = {
  type DropBack (line 24) | type DropBack<L extends List, N extends Iteration, I extends Iteration =...
  type __Drop (line 32) | type __Drop<L extends List, N extends Iteration, way extends Way> = {
  type _Drop (line 40) | type _Drop<L extends List, N extends number, way extends Way = '->'> =
  type Drop (line 55) | type Drop<L extends List, N extends number, way extends Way = '->'> =

FILE: sources/List/Either.ts
  type Either (line 19) | type Either<L extends List, K extends Key, strict extends Boolean = 1> =

FILE: sources/List/Exclude.ts
  type Exclude (line 18) | type Exclude<L extends List, L1 extends List, match extends Match = 'def...

FILE: sources/List/ExcludeKeys.ts
  type ExcludeKeys (line 17) | type ExcludeKeys<L extends List, L1 extends List, match extends Match = ...

FILE: sources/List/Extract.ts
  type Extract (line 15) | type Extract<L extends List, From extends number, To extends number> =

FILE: sources/List/Filter.ts
  type Filter (line 17) | type Filter<L extends List, M extends any, match extends Match = 'defaul...

FILE: sources/List/FilterKeys.ts
  type FilterKeys (line 16) | type FilterKeys<L extends List, M extends any, match extends Match = 'de...

FILE: sources/List/Flatten.ts
  type __Flatten (line 15) | type __Flatten<L extends List, LO extends List, strict extends Boolean, ...
  type _Flatten (line 23) | type _Flatten<L extends List, strict extends Boolean, limit extends numb...
  type Flatten (line 38) | type Flatten<L extends List, strict extends Boolean = 1, limit extends n...

FILE: sources/List/Group.ts
  type __Group (line 11) | type __Group<L extends List, N extends number, LN extends List = []> = {
  type _Group (line 19) | type _Group<L extends List, N extends number> =
  type Group (line 33) | type Group<L extends List, N extends number> =

FILE: sources/List/Has.ts
  type Has (line 18) | type Has<L extends List, K extends Key, M extends any = any, match exten...

FILE: sources/List/HasPath.ts
  type HasPath (line 18) | type HasPath<L extends List, Path extends List<Key>, M extends any = any...

FILE: sources/List/Head.ts
  type Head (line 12) | type Head<L extends List> =

FILE: sources/List/Includes.ts
  type Includes (line 16) | type Includes<L extends List, M extends any, match extends Match = 'defa...

FILE: sources/List/Intersect.ts
  type Intersect (line 17) | type Intersect<L extends List, L1 extends List, match extends Match = 'd...

FILE: sources/List/IntersectKeys.ts
  type IntersectKeys (line 16) | type IntersectKeys<L extends List, L1 extends List, match extends Match ...

FILE: sources/List/KeySet.ts
  type KeySet (line 13) | type KeySet<From extends number, To extends number> =

FILE: sources/List/Last.ts
  type Last (line 13) | type Last<L extends List> =

FILE: sources/List/LastKey.ts
  type LastKey (line 13) | type LastKey<L extends List> =

FILE: sources/List/Length.ts
  type Length (line 11) | type Length<L extends List> =

FILE: sources/List/List.ts
  type List (line 11) | type List<A = any> = ReadonlyArray<A>

FILE: sources/List/Longest.ts
  type Longest (line 14) | type Longest<L extends List, L1 extends List> =

FILE: sources/List/Merge.ts
  type Merge (line 23) | type Merge<L extends List, L1 extends List, depth extends Depth = 'flat'...

FILE: sources/List/MergeAll.ts
  type MergeAll (line 20) | type MergeAll<L extends List, Ls extends List<List>, depth extends Depth...

FILE: sources/List/Modify.ts
  type Modify (line 16) | type Modify<L extends List, LMod extends List> = Cast<{

FILE: sources/List/NonNullable.ts
  type NonNullableFlat (line 12) | type NonNullableFlat<O, K extends Key = Key> = {
  type _NonNullableDeep (line 21) | type _NonNullableDeep<O> = {
  type NonNullableDeep (line 30) | type NonNullableDeep<O, K extends Key = Key> =
  type NonNullablePart (line 36) | type NonNullablePart<O extends object, K extends Key, depth extends Dept...
  type NonNullable (line 51) | type NonNullable<L extends List, K extends Key = Key, depth extends Dept...

FILE: sources/List/NonNullableKeys.ts
  type NonNullableKeys (line 13) | type NonNullableKeys<L extends List> =

FILE: sources/List/Nullable.ts
  type Nullable (line 17) | type Nullable<L extends List, K extends Key = Key> =

FILE: sources/List/NullableKeys.ts
  type NullableKeys (line 13) | type NullableKeys<L extends List> =

FILE: sources/List/ObjectOf.ts
  type ObjectOf (line 14) | type ObjectOf<O extends List> =

FILE: sources/List/Omit.ts
  type _Omit (line 10) | type _Omit<L extends List, K extends Key> =
  type Omit (line 22) | type Omit<L extends List, K extends Key> =

FILE: sources/List/Optional.ts
  type Optional (line 15) | type Optional<L extends List, depth extends Depth = 'flat'> =

FILE: sources/List/OptionalKeys.ts
  type OptionalKeys (line 13) | type OptionalKeys<L extends List> =

FILE: sources/List/Overwrite.ts
  type Overwrite (line 14) | type Overwrite<L extends List, L1 extends object> =

FILE: sources/List/Partial.ts
  type Partial (line 21) | type Partial<L extends List, depth extends Depth = 'flat'> =

FILE: sources/List/Patch.ts
  type Patch (line 23) | type Patch<L extends List, L1 extends List, depth extends Depth = 'flat'...

FILE: sources/List/PatchAll.ts
  type PatchAll (line 20) | type PatchAll<O extends List, Ls extends List<List>, depth extends Depth...

FILE: sources/List/Path.ts
  type Path (line 14) | type Path<L extends List, Path extends List<Key>> =

FILE: sources/List/Paths.ts
  type Paths (line 14) | type Paths<L extends List> =

FILE: sources/List/Pick.ts
  type _Pick (line 10) | type _Pick<L extends List, K extends Key> =
  type Pick (line 22) | type Pick<L extends List, K extends Key> =

FILE: sources/List/Pop.ts
  type Pop (line 12) | type Pop<L extends List> =

FILE: sources/List/Prepend.ts
  type Prepend (line 12) | type Prepend<L extends List, A extends any> =

FILE: sources/List/Readonly.ts
  type Readonly (line 15) | type Readonly<L extends List, depth extends Depth = 'flat'> =

FILE: sources/List/ReadonlyKeys.ts
  type ReadonlyKeys (line 13) | type ReadonlyKeys<L extends List> =

FILE: sources/List/Remove.ts
  type Remove (line 15) | type Remove<L extends List, From extends number, To extends number> =

FILE: sources/List/Repeat.ts
  type __Repeat (line 13) | type __Repeat<N extends number, A, L extends List = [], I extends Iterat...
  type _Repeat (line 21) | type _Repeat<A extends any, N extends number, L extends List = []> =
  type Repeat (line 36) | type Repeat<A extends any, N extends number, L extends List = []> =

FILE: sources/List/Replace.ts
  type Replace (line 17) | type Replace<L extends List, M extends any, A extends any, match extends...

FILE: sources/List/Required.ts
  type Required (line 15) | type Required<L extends List, depth extends Depth = 'flat'> =

FILE: sources/List/RequiredKeys.ts
  type RequiredKeys (line 13) | type RequiredKeys<L extends List> =

FILE: sources/List/Reverse.ts
  type __Reverse (line 15) | type __Reverse<L extends List, LO extends List, I extends Iteration = It...
  type _Reverse (line 23) | type _Reverse<L extends List, LO extends List = []> =
  type Reverse (line 37) | type Reverse<L extends List> =

FILE: sources/List/Select.ts
  type Select (line 17) | type Select<L extends List, M extends any, match extends Match = 'defaul...

FILE: sources/List/SelectKeys.ts
  type SelectKeys (line 16) | type SelectKeys<L extends List, M extends any, match extends Match = 'de...

FILE: sources/List/Shortest.ts
  type Shortest (line 14) | type Shortest<L extends List, L1 extends List> =

FILE: sources/List/Tail.ts
  type Tail (line 11) | type Tail<L extends List> =

FILE: sources/List/Take.ts
  type TakeForth (line 16) | type TakeForth<L extends List, N extends Iteration, I extends Iteration ...
  type TakeBack (line 25) | type TakeBack<L extends List, N extends Iteration> = {
  type __Take (line 33) | type __Take<L extends List, N extends Iteration, way extends Way> = {
  type _Take (line 41) | type _Take<L extends List, N extends number, way extends Way = '->'> =
  type Take (line 56) | type Take<L extends List, N extends number, way extends Way = '->'> =

FILE: sources/List/UnNest.ts
  type UnNestLoose (line 20) | type UnNestLoose<L extends List> =
  type Flatter (line 33) | type Flatter<L extends List, LN extends List, I extends Iteration> =
  type UnNestStrict (line 43) | type UnNestStrict<L extends List, LN extends List = [], I extends Iterat...
  type __UnNest (line 51) | type __UnNest<L extends List, strict extends Boolean> = {
  type _UnNest (line 59) | type _UnNest<L extends List, strict extends Boolean> =
  type UnNest (line 73) | type UnNest<L extends List, strict extends Boolean = 1> =

FILE: sources/List/Undefinable.ts
  type Undefinable (line 16) | type Undefinable<L extends List, K extends Key = Key> =

FILE: sources/List/UndefinableKeys.ts
  type UndefinableKeys (line 13) | type UndefinableKeys<L extends List> =

FILE: sources/List/UnionOf.ts
  type UnionOf (line 11) | type UnionOf<L extends List> =

FILE: sources/List/Unionize.ts
  type Unionize (line 15) | type Unionize<L extends List, L1 extends List, K extends Key = Key> = {

FILE: sources/List/Update.ts
  type Update (line 17) | type Update<L extends List, K extends Key, A extends any> =

FILE: sources/List/Writable.ts
  type Writable (line 15) | type Writable<L extends List, depth extends Depth = 'flat'> =

FILE: sources/List/WritableKeys.ts
  type WritableKeys (line 13) | type WritableKeys<L extends List> =

FILE: sources/List/Zip.ts
  type __Zip (line 15) | type __Zip<L extends List, L1 extends List, LN extends List = [], I exte...
  type _Zip (line 23) | type _Zip<L extends List, L1 extends List> =
  type Zip (line 37) | type Zip<L extends List, L1 extends List> =

FILE: sources/List/ZipObj.ts
  type __ZipObj (line 17) | type __ZipObj<LKeys extends List<Key>, LFields extends List, O extends o...
  type _ZipObj (line 25) | type _ZipObj<LKeys extends List<Key>, LFields extends List> =
  type ZipObj (line 39) | type ZipObj<LKeys extends List<Key>, LFields extends List> =

FILE: sources/List/_Internal.ts
  type Naked (line 9) | type Naked<L extends List> =
  type Key (line 12) | type Key = string | number | symbol

FILE: sources/Misc/BuiltIn.ts
  type BuiltIn (line 76) | type BuiltIn =

FILE: sources/Misc/JSON/Array.ts
  type List (line 6) | interface List extends Array<Value> {}

FILE: sources/Misc/JSON/Object.ts
  type Object (line 6) | interface Object {

FILE: sources/Misc/JSON/Primitive.ts
  type Primitive (line 4) | type Primitive = string | number | boolean | null;

FILE: sources/Misc/JSON/Value.ts
  type Value (line 8) | type Value = Primitive | Object | List

FILE: sources/Misc/Primitive.ts
  type Primitive (line 4) | type Primitive =

FILE: sources/Number/Absolute.ts
  type _Absolute (line 9) | type _Absolute<N extends Iteration> = {
  type Absolute (line 28) | type Absolute<N extends number> =

FILE: sources/Number/Add.ts
  type _AddPositive (line 12) | type _AddPositive<N1 extends Iteration, N2 extends Iteration> = {
  type AddPositive (line 27) | type AddPositive<N1 extends Iteration, N2 extends Iteration> =
  type _AddNegative (line 35) | type _AddNegative<N1 extends Iteration, N2 extends Iteration> = {
  type AddNegative (line 50) | type AddNegative<N1 extends Iteration, N2 extends Iteration> =
  type _Add (line 58) | type _Add<N1 extends Iteration, N2 extends Iteration> = {
  type Add (line 80) | type Add<N1 extends number, N2 extends number> =

FILE: sources/Number/Greater.ts
  type _Greater (line 9) | type _Greater<N1 extends Iteration, N2 extends Iteration> =
  type Greater (line 26) | type Greater<N1 extends number, N2 extends number> =

FILE: sources/Number/GreaterEq.ts
  type _GreaterEq (line 10) | type _GreaterEq<N1 extends Iteration, N2 extends Iteration> =
  type GreaterEq (line 27) | type GreaterEq<N1 extends number, N2 extends number> =

FILE: sources/Number/IsNegative.ts
  type _IsNegative (line 7) | type _IsNegative<N extends Iteration> = {
  type IsNegative (line 26) | type IsNegative<N extends number> =

FILE: sources/Number/IsPositive.ts
  type _IsPositive (line 8) | type _IsPositive<N extends Iteration> = {
  type IsPositive (line 27) | type IsPositive<N extends number> =

FILE: sources/Number/IsZero.ts
  type _IsZero (line 7) | type _IsZero<N extends Iteration> = {
  type IsZero (line 26) | type IsZero<N extends number> =

FILE: sources/Number/Lower.ts
  type _Lower (line 8) | type _Lower<N1 extends Iteration, N2 extends Iteration> =
  type Lower (line 25) | type Lower<N1 extends number, N2 extends number> =

FILE: sources/Number/LowerEq.ts
  type LowerEq (line 17) | type LowerEq<N1 extends number, N2 extends number> =

FILE: sources/Number/Negate.ts
  type _Negate (line 8) | type _Negate<N extends Iteration> =
  type Negate (line 26) | type Negate<N extends number> =

FILE: sources/Number/Range.ts
  type RangeForth (line 15) | type RangeForth<From extends Iteration, To extends Iteration, L extends ...
  type RangeBack (line 23) | type RangeBack<From extends Iteration, To extends Iteration, L extends L...
  type __Range (line 31) | type __Range<From extends Iteration, To extends Iteration, way extends W...
  type _Range (line 39) | type _Range<From extends number, To extends number, way extends Way> =
  type Range (line 59) | type Range<From extends number, To extends number, way extends Way = '->...

FILE: sources/Number/Sub.ts
  type _SubPositive (line 12) | type _SubPositive<N1 extends Iteration, N2 extends Iteration> = {
  type SubPositive (line 27) | type SubPositive<N1 extends Iteration, N2 extends Iteration> =
  type _SubNegative (line 35) | type _SubNegative<N1 extends Iteration, N2 extends Iteration> = {
  type SubNegative (line 50) | type SubNegative<N1 extends Iteration, N2 extends Iteration> =
  type _Sub (line 58) | type _Sub<N1 extends Iteration, N2 extends Iteration> = {
  type Sub (line 80) | type Sub<N1 extends number, N2 extends number> =

FILE: sources/Object/Assign.ts
  type __Assign (line 16) | type __Assign<O extends object, Os extends List<object>, depth extends D...
  type _Assign (line 24) | type _Assign<O extends object, Os extends List<object>, depth extends De...
  type Assign (line 42) | type Assign<O extends object, Os extends List<object>, depth extends Dep...

FILE: sources/Object/AtLeast.ts
  type RequiredIfKeys (line 13) | type RequiredIfKeys<O extends object, K extends Key> =
  type __AtLeast (line 21) | type __AtLeast<O extends object, K extends Key> =
  type _AtLeast (line 29) | type _AtLeast<O extends object, K extends Key> =
  type AtLeast (line 41) | type AtLeast<O extends object, K extends Key = Keys<O>> =

FILE: sources/Object/Compulsory.ts
  type CompulsoryFlat (line 11) | type CompulsoryFlat<O> = {
  type CompulsoryDeep (line 18) | type CompulsoryDeep<O> = {
  type CompulsoryPart (line 27) | type CompulsoryPart<O extends object, depth extends Depth> = {
  type _Compulsory (line 35) | type _Compulsory<O extends object, K extends Key, depth extends Depth> =
  type Compulsory (line 49) | type Compulsory<O extends object, K extends Key = Key, depth extends Dep...

FILE: sources/Object/CompulsoryKeys.ts
  type _CompulsoryKeys (line 4) | type _CompulsoryKeys<O extends object> = {
  type CompulsoryKeys (line 20) | type CompulsoryKeys<O extends object> =

FILE: sources/Object/Diff.ts
  type Diff (line 34) | type Diff<O extends object, O1 extends object, match extends Match = 'de...

FILE: sources/Object/Either.ts
  type __Either (line 11) | type __Either<O extends object, K extends Key> =
  type EitherStrict (line 19) | type EitherStrict<O extends object, K extends Key> =
  type EitherLoose (line 25) | type EitherLoose<O extends object, K extends Key> =
  type _Either (line 31) | type _Either<O extends object, K extends Key, strict extends Boolean> = {
  type Either (line 47) | type Either<O extends object, K extends Key, strict extends Boolean = 1> =

FILE: sources/Object/Exclude.ts
  type Exclude (line 16) | type Exclude<O extends object, O1 extends object, match extends Match = ...

FILE: sources/Object/ExcludeKeys.ts
  type _ExcludeMatch (line 10) | type _ExcludeMatch<O extends object, O1 extends object, match extends Ma...
  type ExcludeMatch (line 20) | type ExcludeMatch<O extends object, O1 extends object, match extends Mat...
  type ExcludeKeys (line 36) | type ExcludeKeys<O extends object, O1 extends object, match extends Matc...

FILE: sources/Object/Filter.ts
  type Filter (line 15) | type Filter<O extends object, M extends any, match extends Match = 'defa...

FILE: sources/Object/FilterKeys.ts
  type _FilterKeys (line 7) | type _FilterKeys<O extends object, M extends any, match extends Match> = {
  type FilterKeys (line 24) | type FilterKeys<O extends object, M extends any, match extends Match = '...

FILE: sources/Object/Has.ts
  type Has (line 17) | type Has<O extends object, K extends Key, M extends any = any, match ext...

FILE: sources/Object/HasPath.ts
  type HasPath (line 18) | type HasPath<O extends object, Path extends List<Key>, M extends any = a...

FILE: sources/Object/Includes.ts
  type Includes (line 14) | type Includes<O extends object, M extends any, match extends Match = 'de...

FILE: sources/Object/Intersect.ts
  type Intersect (line 15) | type Intersect<O extends object, O1 extends object, match extends Match ...

FILE: sources/Object/IntersectKeys.ts
  type _IntersectMatch (line 9) | type _IntersectMatch<O extends object, O1 extends object, match extends ...
  type IntersectMatch (line 19) | type IntersectMatch<O extends object, O1 extends object, match extends M...
  type IntersectKeys (line 34) | type IntersectKeys<O extends object, O1 extends object, match extends Ma...

FILE: sources/Object/Invert.ts
  type _Invert (line 9) | type _Invert<O extends Record<Key, Key>> =
  type Invert (line 44) | type Invert<O extends Record<keyof O, Key>> =

FILE: sources/Object/ListOf.ts
  type AppendExists (line 16) | type AppendExists<O extends object, LN extends List, I extends Iteration> =
  type ___ListOf (line 24) | type ___ListOf<O extends object, K, LN extends List = [], I extends Iter...
  type __ListOf (line 32) | type __ListOf<O extends object> =
  type _ListOf (line 41) | type _ListOf<O extends object> =
  type ListOf (line 55) | type ListOf<O extends object> =

FILE: sources/Object/Merge.ts
  type Longer (line 15) | type Longer<L extends List, L1 extends List> =
  type MergeProp (line 23) | type MergeProp<OK, O1K, fill, OOKeys extends Key, K extends Key> =
  type MergeFlatObject (line 32) | type MergeFlatObject<O extends object, O1 extends object, fill, OOKeys e...
  type MergeFlatList (line 39) | type MergeFlatList<L extends List, L1 extends List, ignore extends objec...
  type MergeFlatChoice (line 49) | type MergeFlatChoice<O extends object, O1 extends object, ignore extends...
  type MergeFlat (line 61) | type MergeFlat<O extends object, O1 extends object, ignore extends objec...
  type MergeDeepList (line 69) | type MergeDeepList<L extends List, L1 extends List, ignore extends objec...
  type MergeDeepObject (line 79) | type MergeDeepObject<O extends object, O1 extends object, ignore extends...
  type MergeDeepChoice (line 86) | type MergeDeepChoice<OK, O1K, ignore extends object, fill, OOKeys extend...
  type MergeDeep (line 104) | type MergeDeep<O extends object, O1 extends object, ignore extends objec...
  type Merge (line 157) | type Merge<O extends object, O1 extends object, depth extends Depth = 'f...

FILE: sources/Object/MergeAll.ts
  type __MergeAll (line 16) | type __MergeAll<O extends object, Os extends List<object>, depth extends...
  type _MergeAll (line 24) | type _MergeAll<O extends object, Os extends List<object>, depth extends ...
  type MergeAll (line 42) | type MergeAll<O extends object, Os extends List<object>, depth extends D...

FILE: sources/Object/Modify.ts
  type Modify (line 15) | type Modify<O extends object, OMod extends object> = {

FILE: sources/Object/NonNullable.ts
  type NonNullableFlat (line 11) | type NonNullableFlat<O> = {
  type NonNullableDeep (line 18) | type NonNullableDeep<O> = {
  type NonNullablePart (line 27) | type NonNullablePart<O extends object, depth extends Depth> = {
  type _NonNullable (line 35) | type _NonNullable<O extends object, K extends Key, depth extends Depth> =
  type NonNullable (line 49) | type NonNullable<O extends object, K extends Key = Key, depth extends De...

FILE: sources/Object/NonNullableKeys.ts
  type _NonNullableKeys (line 4) | type _NonNullableKeys<O extends object> = {
  type NonNullableKeys (line 20) | type NonNullableKeys<O extends object> =

FILE: sources/Object/Nullable.ts
  type NullableFlat (line 10) | type NullableFlat<O> = {
  type NullableDeep (line 17) | type NullableDeep<O> = {
  type NullablePart (line 24) | type NullablePart<O extends object, depth extends Depth> = {
  type _Nullable (line 32) | type _Nullable<O extends object, K extends Key, depth extends Depth> =
  type Nullable (line 45) | type Nullable<O extends object, K extends Key = Key, depth extends Depth...

FILE: sources/Object/NullableKeys.ts
  type _NullableKeys (line 4) | type _NullableKeys<O extends object> = {
  type NullableKeys (line 20) | type NullableKeys<O extends object> =

FILE: sources/Object/Object.ts
  type Object (line 12) | type Object =

FILE: sources/Object/Omit.ts
  type _Omit (line 8) | type _Omit<O extends object, K extends Key> =
  type Omit (line 20) | type Omit<O extends object, K extends Key> =

FILE: sources/Object/Optional.ts
  type OptionalFlat (line 10) | type OptionalFlat<O> = {
  type OptionalDeep (line 17) | type OptionalDeep<O> = {
  type OptionalPart (line 24) | type OptionalPart<O extends object, depth extends Depth> = {
  type Optional (line 39) | type Optional<O extends object, K extends Key = Key, depth extends Depth...

FILE: sources/Object/OptionalKeys.ts
  type _OptionalKeys (line 4) | type _OptionalKeys<O extends object> = {
  type OptionalKeys (line 18) | type OptionalKeys<O extends object> =

FILE: sources/Object/Overwrite.ts
  type Overwrite (line 11) | type Overwrite<O extends object, O1 extends object> = {

FILE: sources/Object/P/Merge.ts
  type MergeAt (line 12) | type MergeAt<O, Path extends List<Key>, O1, depth extends Depth> =
  type Merge (line 35) | type Merge<O extends object, Path extends List<Key>, O1 extends object, ...

FILE: sources/Object/P/Omit.ts
  type OmitAt (line 12) | type OmitAt<O, Path extends List<Key>> =
  type Omit (line 33) | type Omit<O extends object, Path extends List<Key>> =

FILE: sources/Object/P/Pick.ts
  type PickAt (line 12) | type PickAt<O, Path extends List<Key>> =
  type Pick (line 33) | type Pick<O extends object, Path extends List<Key>> =

FILE: sources/Object/P/Readonly.ts
  type ReadonlyAt (line 12) | type ReadonlyAt<O, Path extends List<Key>, depth extends Depth> =
  type Readonly (line 34) | type Readonly<O extends object, Path extends List<Key>, depth extends De...

FILE: sources/Object/P/Record.ts
  type Record_RR (line 13) | type Record_RR<Path extends List<Key>, A, I extends Iteration = Iteratio...
  type Record_RW (line 22) | type Record_RW<Path extends List<Key>, A, I extends Iteration = Iteratio...
  type Record_OR (line 31) | type Record_OR<Path extends List<Key>, A, I extends Iteration = Iteratio...
  type Record_OW (line 40) | type Record_OW<Path extends List<Key>, A, I extends Iteration = Iteratio...
  type Record (line 56) | type Record<Path extends List<Key>, A, modx extends Modx = ['!', 'W']> = {

FILE: sources/Object/P/Update.ts
  type UpdateAt (line 13) | type UpdateAt<O, Path extends List<Key>, A> =
  type Update (line 35) | type Update<O extends object, Path extends List<Key>, A extends any> =

FILE: sources/Object/Partial.ts
  type Partial (line 19) | type Partial<O extends object, depth extends Depth = 'flat'> =

FILE: sources/Object/Patch.ts
  type Longer (line 14) | type Longer<L extends List, L1 extends List> =
  type PatchProp (line 22) | type PatchProp<OK, O1K, fill, OKeys extends Key, K extends Key> =
  type PatchFlatObject (line 30) | type PatchFlatObject<O extends object, O1 extends object, fill, OKeys ex...
  type PatchFlatList (line 37) | type PatchFlatList<L extends List, L1 extends List, ignore extends objec...
  type PatchFlatChoice (line 47) | type PatchFlatChoice<O extends object, O1 extends object, ignore extends...
  type PatchFlat (line 59) | type PatchFlat<O extends object, O1 extends object, ignore extends objec...
  type PatchDeepList (line 67) | type PatchDeepList<L extends List, L1 extends List, ignore extends objec...
  type PatchDeepObject (line 77) | type PatchDeepObject<O extends object, O1 extends object, ignore extends...
  type PatchDeepChoice (line 84) | type PatchDeepChoice<OK, O1K, ignore extends object, fill, OKeys extends...
  type PatchDeep (line 102) | type PatchDeep<O extends object, O1 extends object, ignore extends objec...
  type Patch (line 153) | type Patch<O extends object, O1 extends object, depth extends Depth = 'f...

FILE: sources/Object/PatchAll.ts
  type __PatchAll (line 16) | type __PatchAll<O extends object, Os extends List<object>, depth extends...
  type _PatchAll (line 24) | type _PatchAll<O extends object, Os extends List<object>, depth extends ...
  type PatchAll (line 42) | type PatchAll<O extends object, Os extends List<object>, depth extends D...

FILE: sources/Object/Path.ts
  type _Path (line 15) | type _Path<O, P extends List<Key>,  I extends Iteration = IterationOf<0>...
  type Path (line 29) | type Path<O extends any, P extends List<Key>> =

FILE: sources/Object/Paths.ts
  type UnionOf (line 13) | type UnionOf<A> =
  type _Paths (line 21) | type _Paths<O, P extends List = []> = UnionOf<{
  type Paths (line 38) | type Paths<O, P extends List = []> =

FILE: sources/Object/Pick.ts
  type __Pick (line 6) | type __Pick<O extends object, K extends keyof O> = {
  type _Pick (line 13) | type _Pick<O extends object, K extends Key> =
  type Pick (line 25) | type Pick<O extends object, K extends Key> =

FILE: sources/Object/Readonly.ts
  type ReadonlyFlat (line 10) | type ReadonlyFlat<O> = {
  type ReadonlyDeep (line 17) | type ReadonlyDeep<O> = {
  type ReadonlyPart (line 26) | type ReadonlyPart<O extends object, depth extends Depth> = {
  type _Readonly (line 34) | type _Readonly<O extends object, K extends Key, depth extends Depth> =
  type Readonly (line 47) | type Readonly<O extends object, K extends Key = Key, depth extends Depth...

FILE: sources/Object/ReadonlyKeys.ts
  type _ReadonlyKeys (line 8) | type _ReadonlyKeys<O extends object> = {
  type ReadonlyKeys (line 24) | type ReadonlyKeys<O extends object> =

FILE: sources/Object/Record.ts
  type Record (line 14) | type Record<K extends Key, A extends any = unknown, modx extends Modx = ...

FILE: sources/Object/Replace.ts
  type _Replace (line 7) | type _Replace<O extends object, M extends any, A extends any, match exte...
  type Replace (line 25) | type Replace<O extends object, M extends any, A extends any, match exten...

FILE: sources/Object/Required.ts
  type RequiredFlat (line 10) | type RequiredFlat<O> = {
  type RequiredDeep (line 17) | type RequiredDeep<O> = {
  type RequiredPart (line 26) | type RequiredPart<O extends object, depth extends Depth> = {
  type _Required (line 34) | type _Required<O extends object, K extends Key, depth extends Depth> =
  type Required (line 47) | type Required<O extends object, K extends Key = Key, depth extends Depth...

FILE: sources/Object/RequiredKeys.ts
  type _RequiredKeys (line 4) | type _RequiredKeys<O extends object> = {
  type RequiredKeys (line 16) | type RequiredKeys<O extends object> =

FILE: sources/Object/Select.ts
  type Select (line 15) | type Select<O extends object, M extends any, match extends Match = 'defa...

FILE: sources/Object/SelectKeys.ts
  type _SelectKeys (line 7) | type _SelectKeys<O extends object, M extends any, match extends Match> = {
  type SelectKeys (line 24) | type SelectKeys<O extends object, M extends any, match extends Match = '...

FILE: sources/Object/Undefinable.ts
  type UndefinableFlat (line 10) | type UndefinableFlat<O> = {
  type UndefinableDeep (line 17) | type UndefinableDeep<O> = {
  type UndefinablePart (line 26) | type UndefinablePart<O extends object, depth extends Depth> = {
  type _Undefinable (line 34) | type _Undefinable<O extends object, K extends Key, depth extends Depth> =
  type Undefinable (line 47) | type Undefinable<O extends object, K extends Key = Key, depth extends De...

FILE: sources/Object/UndefinableKeys.ts
  type _UndefinableKeys (line 4) | type _UndefinableKeys<O extends object> = {
  type UndefinableKeys (line 19) | type UndefinableKeys<O extends object> =

FILE: sources/Object/UnionOf.ts
  type _UnionOf (line 4) | type _UnionOf<O extends object> =
  type UnionOf (line 15) | type UnionOf<O extends object> =

FILE: sources/Object/Unionize.ts
  type Unionize (line 14) | type Unionize<O extends object, O1 extends object, K extends Key = Key> = {

FILE: sources/Object/Update.ts
  type Update (line 36) | type Update<O extends object, K extends Key, A extends any> = {

FILE: sources/Object/Writable.ts
  type WritableFlat (line 10) | type WritableFlat<O> = {
  type WritableDeep (line 17) | type WritableDeep<O> = {
  type WritablePart (line 26) | type WritablePart<O extends object, depth extends Depth> = {
  type _Writable (line 34) | type _Writable<O extends object, K extends Key, depth extends Depth> =
  type Writable (line 47) | type Writable<O extends object, K extends Key = Key, depth extends Depth...

FILE: sources/Object/WritableKeys.ts
  type _WritableKeys (line 8) | type _WritableKeys<O extends object> = {
  type WritableKeys (line 23) | type WritableKeys<O extends object> =

FILE: sources/Object/_Internal.ts
  type Modx (line 8) | type Modx = ['?' | '!', 'W' | 'R']
  type Depth (line 13) | type Depth = 'flat' | 'deep'
  type MergeStyle (line 22) | type MergeStyle = 0 | 1 | 2
  type Anyfy (line 28) | type Anyfy<O extends object> = {

FILE: sources/String/At.ts
  type At (line 10) | type At<S extends string, K extends number> =

FILE: sources/String/Join.ts
  type _Join (line 8) | type _Join<T extends List, D extends string> =
  type Join (line 19) | type Join<T extends List<Literal>, D extends string = ''> =

FILE: sources/String/Length.ts
  type Length (line 8) | type Length<S extends string> =

FILE: sources/String/Replace.ts
  type _Replace (line 7) | type _Replace<S extends string, R extends Literal, W extends Literal> =
  type Replace (line 18) | type Replace<S extends string, R extends Literal, W extends Literal> =

FILE: sources/String/Split.ts
  type __Split (line 7) | type __Split<S extends string, D extends string, T extends string[] = []> =
  type _Split (line 15) | type _Split<S extends string, D extends string = ''> =
  type Split (line 23) | type Split<S extends string, D extends string = ''> =

FILE: sources/String/_Internal.ts
  type Literal (line 1) | type Literal = string | number | bigint | boolean

FILE: sources/Test.ts
  type Pass (line 7) | type Pass = 1
  type Fail (line 12) | type Fail = 0

FILE: sources/Union/Diff.ts
  type Diff (line 12) | type Diff<U1 extends any, U2 extends any> =

FILE: sources/Union/Exclude.ts
  type Exclude (line 10) | type Exclude<U extends any, M extends any> =

FILE: sources/Union/Filter.ts
  type Filter (line 13) | type Filter<U extends any, M extends any, match extends Match = 'default...

FILE: sources/Union/Has.ts
  type Has (line 10) | type Has<U extends any, U1 extends any> =

FILE: sources/Union/Intersect.ts
  type Intersect (line 13) | type Intersect<U1 extends any, U2 extends any> =

FILE: sources/Union/IntersectOf.ts
  type IntersectOf (line 11) | type IntersectOf<U extends any> =

FILE: sources/Union/Last.ts
  type Last (line 12) | type Last<U extends any> =

FILE: sources/Union/ListOf.ts
  type _ListOf (line 11) | type _ListOf<U, LN extends List = [], LastU = Last<U>> = {
  type ListOf (line 25) | type ListOf<U extends any> =

FILE: sources/Union/Merge.ts
  type _Merge (line 10) | type _Merge<U extends object> = IntersectOf<Overwrite<U, {
  type Merge (line 22) | type Merge<U extends object> =

FILE: sources/Union/NonNullable.ts
  type NonNullable (line 12) | type NonNullable<U extends any> =

FILE: sources/Union/Nullable.ts
  type Nullable (line 9) | type Nullable<U extends any> =

FILE: sources/Union/Pop.ts
  type Pop (line 13) | type Pop<U extends any> =

FILE: sources/Union/Replace.ts
  type Replace (line 14) | type Replace<U extends any, M extends any, A extends any, match extends ...

FILE: sources/Union/Select.ts
  type Select (line 13) | type Select<U extends any, M extends any, match extends Match = 'default...

FILE: sources/Union/Strict.ts
  type _Strict (line 9) | type _Strict<U, _U = U> =
  type Strict (line 22) | type Strict<U extends object> =

FILE: tests/Any.ts
  type O (line 8) | type O = {
  type T (line 22) | type T = [

FILE: tests/Class.ts
  class TestClass (line 8) | class TestClass {
    method constructor (line 10) | constructor(a: string, b: number) {}

FILE: tests/Community.ts
  type O (line 8) | type O = {
  type O1 (line 21) | type O1 = {
  type O_INCLUDESDEEP (line 38) | type O_INCLUDESDEEP = {

FILE: tests/Function.ts
  type O_AUTOPATH (line 107) | type O_AUTOPATH = {
  type O_VALIDPATH (line 134) | type O_VALIDPATH = {
  type Foo (line 178) | interface Foo {
  class Bar (line 182) | class Bar implements Foo {
  type Co (line 186) | type Co<V> = () => Narrow<V>;
  function covariance (line 187) | function covariance<U, T extends U>(t: Narrow<T>, u: Narrow<U>, coT: Co<...
  type Contra (line 197) | type Contra<V> = (v: Narrow<V>) => void;
  function contravariance (line 198) | function contravariance<U, T extends U>(t: Narrow<T>, u: Narrow<U>, cont...
  type In (line 208) | type In<V> = (v: Narrow<V>) => Narrow<V>;
  function invariance (line 209) | function invariance<U, T extends U>(t: Narrow<T>, u: Narrow<U>, inT: In<...
  type Bi (line 220) | type Bi<V> = { foo(v: Narrow<V>): void };
  function bivariance (line 221) | function bivariance<U, T extends U>(t: Narrow<T>, u: Narrow<U>, biT: Bi<...

FILE: tests/List.ts
  type T (line 8) | type T = [
  type T1 (line 21) | type T1 = [
  type T_ATLEAST (line 53) | type T_ATLEAST = [
  type ATLEAST_T_013 (line 64) | type ATLEAST_T_013 =
  type T_EITHER (line 116) | type T_EITHER = [
  type EITHER_T_01 (line 122) | type EITHER_T_01 = [0, undefined, 2] | [undefined, 1, 2];
  type FILTER_T_NUMBER_EXTENDS (line 159) | type FILTER_T_NUMBER_EXTENDS = [
  type FILTER_T_NUMBER_EQUALS (line 173) | type FILTER_T_NUMBER_EQUALS = [
  type T_FLATTEN (line 199) | type T_FLATTEN = [1, 12, [2, [3, [4, [5, [6, [7, [8, [9, 92?]]]]]]]]];
  type FLATTEN_T (line 200) | type FLATTEN_T = [1, 12, 2, 3, 4, 5, 6, 7, 8, 9, 92] | [1, 12, 2, 3, 4, ...
  type T_GROUP (line 214) | type T_GROUP = [1, 2, 3, 4, 5, 6, 7, 8];
  type GROUP_T_1 (line 216) | type GROUP_T_1 = [[1], [2], [3], [4], [5], [6], [7], [8]];
  type GROUP_T_2 (line 217) | type GROUP_T_2 = [[1, 2], [3, 4], [5, 6], [7, 8]];
  type GROUP_T_3 (line 218) | type GROUP_T_3 = [[1, 2, 3], [4, 5, 6], [7, 8, undefined]];
  type t (line 254) | type t = T.Intersect<T, T1, 'default'>
  type INTERSECT_T_T1_NUMBER_DEFAULT (line 256) | type INTERSECT_T_T1_NUMBER_DEFAULT = [
  type INTERSECT_T_T1_NUMBER_EXTENDS (line 269) | type INTERSECT_T_T1_NUMBER_EXTENDS = [
  type INTERSECT_T_T1_NUMBER_EQUALS (line 280) | type INTERSECT_T_T1_NUMBER_EQUALS = [
  type SELECT_T_NUMBER_EXTENDS (line 562) | type SELECT_T_NUMBER_EXTENDS = [
  type SELECT_T_NUMBER_EQUALS (line 569) | type SELECT_T_NUMBER_EQUALS = [
  type WRITABLE_W_T_ARR (line 675) | type WRITABLE_W_T_ARR = ['a', 'b'];
  type WRITABLE_R_T_ARR (line 676) | type WRITABLE_R_T_ARR = readonly ['a', 'b'];

FILE: tests/Object.ts
  type O (line 10) | type O = {
  type O1 (line 24) | type O1 = {
  type O_ASSIGN (line 42) | type O_ASSIGN = {readonly a: 1, c: 2};
  type Os_ASSIGN (line 43) | type Os_ASSIGN = [{a: 2, readonly b: 1}, {a: 3, c?: 1}];
  type ASSIGN_O_Os (line 45) | type ASSIGN_O_Os = {readonly a: 3, readonly b: 1, c: 1 | 2};
  type O_ATLEAST (line 54) | type O_ATLEAST = {
  type ATLEAST_O_ABF (line 67) | type ATLEAST_O_ABF = {
  type COMPULSORY_O (line 100) | type COMPULSORY_O = {
  function COMPULSORY_GENERIC (line 118) | function COMPULSORY_GENERIC<O extends {n?: number}>(o: O) {
  type COMPULSORYKEYS_O (line 128) | type COMPULSORYKEYS_O = 'a' | 'b' | 'c' | 'f' | 'g' | 'k' | 'x';
  type DIFF_O_O1_DEFAULT (line 137) | type DIFF_O_O1_DEFAULT = {
  type DIFF_O_O1_EQUALS (line 143) | type DIFF_O_O1_EQUALS = {
  type DIFF_O1_O_DEFAULT (line 162) | type DIFF_O1_O_DEFAULT = {
  type DIFF_O1_O_EQUALS (line 168) | type DIFF_O1_O_EQUALS = {
  type O_EITHER (line 188) | type O_EITHER = {
  type EITHER_O_AB_TRUE (line 197) | type EITHER_O_AB_TRUE = {
  type EITHER_O_AB_FALSE (line 213) | type EITHER_O_AB_FALSE = {
  type EXCLUDE_O_O1_DEFAULT (line 233) | type EXCLUDE_O_O1_DEFAULT = {
  type EXCLUDE_O_O1_EQUALS (line 237) | type EXCLUDE_O_O1_EQUALS = {
  type EXCLUDE_O1_O_DEFAULT (line 254) | type EXCLUDE_O1_O_DEFAULT = {
  type EXCLUDE_O1_O_EQUALS (line 259) | type EXCLUDE_O1_O_EQUALS = {
  type EXCLUDEKEYS_O_DEFAULT (line 278) | type EXCLUDEKEYS_O_DEFAULT = 'x';
  type EXCLUDEKEYS_O_EQUALS (line 280) | type EXCLUDEKEYS_O_EQUALS = 'a' | 'b' | 'd' | 'g' | 'h' | 'k' | 'x';
  type EXCLUDEKEYS_O1_DEFAULT (line 289) | type EXCLUDEKEYS_O1_DEFAULT = 'i' | 'l';
  type EXCLUDEKEYS_O1_EQUALS (line 291) | type EXCLUDEKEYS_O1_EQUALS = 'a' | 'b' | 'd' | 'g' | 'h' | 'i' | 'k' | 'l';
  type FILTER_O_DEFAULT (line 301) | type FILTER_O_DEFAULT = {
  type FILTER_O_EQUALS (line 314) | type FILTER_O_EQUALS = {
  type FILTERKEYS_O_DEFAULT (line 335) | type FILTERKEYS_O_DEFAULT = 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'j...
  type FILTERKEYS_O_EQUALS (line 337) | type FILTERKEYS_O_EQUALS = 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'j'...
  type INTERSECT_O_O1_DEFAULT (line 399) | type INTERSECT_O_O1_DEFAULT = O.Omit<O, 'x'>;
  type INTERSECT_O_O1_EQUALS (line 401) | type INTERSECT_O_O1_EQUALS = {
  type INTERSECTKEYS_O_DEFAULT (line 416) | type INTERSECTKEYS_O_DEFAULT = U.Exclude<keyof O, 'x'>;
  type INTERSECTKEYS_O_EQUALS (line 418) | type INTERSECTKEYS_O_EQUALS = 'c' | 'e' | 'f' | 'j';
  constant INVERT_SYM (line 428) | const INVERT_SYM = Symbol('')
  constant INVERT_SYM2 (line 429) | const INVERT_SYM2 = Symbol('')
  type O_INVERT_T1 (line 431) | type O_INVERT_T1 = {
  type O_INVERT_T2 (line 437) | type O_INVERT_T2 = O_INVERT_T1 | {
  type T1_INVERT_O (line 443) | type T1_INVERT_O = {
  type T2_INVERT_O (line 449) | type T2_INVERT_O = {
  type O_INVERT_I1 (line 459) | interface O_INVERT_I1 {
  type O_INVERT_I2 (line 465) | interface O_INVERT_I2 {
  type I1_INVERT_O (line 471) | interface I1_INVERT_O {
  type I2_INVERT_O (line 477) | interface I2_INVERT_O {
  type O_LISTOF_INDEX (line 495) | type O_LISTOF_INDEX = {
  type O_LISTOF_NUMBER (line 503) | type O_LISTOF_NUMBER = {
  type O_LISTOF_STRING (line 507) | type O_LISTOF_STRING = {
  type O_LISTOF_SYMBOL (line 511) | type O_LISTOF_SYMBOL = {
  type LISTOF_INDEX_O (line 515) | type LISTOF_INDEX_O = [1, 3, never, 5, 6];
  type LISTOF_NUMBER_O (line 516) | type LISTOF_NUMBER_O = 42[];
  type LISTOF_STRING_O (line 517) | type LISTOF_STRING_O = 42[];
  type LISTOF_SYMBOL_O (line 518) | type LISTOF_SYMBOL_O = unknown[];
  type O_MERGE (line 530) | type O_MERGE = {
  type O1_MERGE (line 563) | type O1_MERGE = {
  type MERGE_O_O1_LODASH (line 596) | type MERGE_O_O1_LODASH = {
  type MERGE_O_O1_DEEP_LODASH (line 639) | type MERGE_O_O1_DEEP_LODASH = {
  function MERGE_GENERIC (line 700) | function MERGE_GENERIC<O extends {n?: number}>(o: O) {
  type NONNULLABLE_O_FLAT (line 726) | type NONNULLABLE_O_FLAT = {
  type NONNULLABLE_O_J_FLAT (line 740) | type NONNULLABLE_O_J_FLAT = {
  function NONNULLABLE_GENERIC (line 760) | function NONNULLABLE_GENERIC<O extends {n: number[] | undefined}>(o: O) {
  type NULLABLE_O_FLAT (line 777) | type NULLABLE_O_FLAT = {
  type NULLABLE_O_A_FLAT (line 791) | type NULLABLE_O_A_FLAT = {
  function NULLABLE_GENERIC (line 811) | function NULLABLE_GENERIC<O extends {n: number[]}>(o: O) {
  type OMIT_O_DEH (line 833) | type OMIT_O_DEH = {
  type OPTIONAL_O_FLAT (line 852) | type OPTIONAL_O_FLAT = {
  type OPTIONAL_O_A_FLAT (line 866) | type OPTIONAL_O_A_FLAT = {
  function OPTIONAL_GENERIC (line 886) | function OPTIONAL_GENERIC<O extends {values: number[]}>(o: O) {
  type PARTIAL_O_FLAT (line 900) | type PARTIAL_O_FLAT = {
  type PATCH_O_O1 (line 936) | type PATCH_O_O1 = {
  type PATCH_O1_O (line 952) | type PATCH_O1_O = {
  type PATCH_O_O1_DEEP (line 968) | type PATCH_O_O1_DEEP = {
  function PATCH_GENERIC (line 990) | function PATCH_GENERIC<O extends {n: number}>(o: O) {
  type O_PATH_U (line 1018) | type O_PATH_U = {
  type O_PATHS (line 1046) | type O_PATHS = {
  type PICK_O_DEF (line 1069) | type PICK_O_DEF = {
  type READONLY_O_FLAT (line 1083) | type READONLY_O_FLAT = {
  type READONLY_O_A_FLAT (line 1097) | type READONLY_O_A_FLAT = {
  function READONLY_GENERIC (line 1117) | function READONLY_GENERIC<O extends {n?: number[]}>(o: O) {
  type RECORD_AB_A_OPTR (line 1139) | type RECORD_AB_A_OPTR = {
  type RECORD_AB_A_OPTW (line 1144) | type RECORD_AB_A_OPTW = {
  type RECORD_AB_A_REQR (line 1149) | type RECORD_AB_A_REQR = {
  type RECORD_AB_A_REQW (line 1154) | type RECORD_AB_A_REQW = {
  type REPLACE_STRING_NUMBER (line 1169) | type REPLACE_STRING_NUMBER = {
  type REQUIRED_O_FLAT (line 1194) | type REQUIRED_O_FLAT = {
  type REQUIRED_O_D_FLAT (line 1208) | type REQUIRED_O_D_FLAT = {
  function REQUIRED_GENERIC (line 1228) | function REQUIRED_GENERIC<O extends {n?: number[]}>(o: O) {
  type SELECT_O_DEFAULT (line 1245) | type SELECT_O_DEFAULT = {
  type SELECT_O_EQUALS (line 1252) | type SELECT_O_EQUALS = {
  type SELECTKEYS_O_DEFAULT (line 1264) | type SELECTKEYS_O_DEFAULT = 'a' | 'd' | 'e' | 'j';
  type SELECTKEYS_O_EQUALS (line 1266) | type SELECTKEYS_O_EQUALS = 'a';
  type UNDEFINABLE_O_FLAT (line 1276) | type UNDEFINABLE_O_FLAT = {
  type UNDEFINABLE_O_A_FLAT (line 1290) | type UNDEFINABLE_O_A_FLAT = {
  function UNDEFINABLE_GENERIC (line 1310) | function UNDEFINABLE_GENERIC<O extends {n: number}>(o: O) {
  type O_UNIONIZE (line 1327) | type O_UNIONIZE = {
  type O1_UNIONIZE (line 1334) | type O1_UNIONIZE = {
  type UNIONIZE_O_O1 (line 1341) | type UNIONIZE_O_O1 = {
  type O_UNIONOF (line 1355) | type O_UNIONOF = {
  type UNIONOF_O (line 1362) | type UNIONOF_O = 'a' | 'b' | 1;
  type O_UPDATE (line 1371) | type O_UPDATE = {
  type UPDATE_O (line 1375) | type UPDATE_O = {
  type UPDATE_O_X (line 1379) | type UPDATE_O_X = {
  type UPDATE_O_STRING_42 (line 1383) | type UPDATE_O_STRING_42 = {
  type WRITABLE_O_FLAT (line 1397) | type WRITABLE_O_FLAT = {
  type WRITABLE_O_E_FLAT (line 1411) | type WRITABLE_O_E_FLAT = {
  function WRITABLE_GENERIC (line 1431) | function WRITABLE_GENERIC<O extends {readonly n: number}>(o: O) {
  type OP (line 1451) | type OP = {// A binary tree
  type OP_UNIONS (line 1472) | type OP_UNIONS = {
  type OP_ARRAYS (line 1493) | type OP_ARRAYS = {
  type OP_ARRAYS_UNIONS (line 1514) | type OP_ARRAYS_UNIONS = {
  type O_PMERGE (line 1538) | type O_PMERGE = {
  type O_PMERGE_UNIONS (line 1561) | type O_PMERGE_UNIONS = {
  type O_POMIT (line 1592) | type O_POMIT = {
  type O_POMIT_UNIONS (line 1608) | type O_POMIT_UNIONS = {
  type O_PPICK (line 1632) | type O_PPICK = {
  type O_PPICK_UNIONS (line 1644) | type O_PPICK_UNIONS = {
  type O_PPICK_AUTOPATH (line 1656) | type O_PPICK_AUTOPATH = {
  type O_PREADONLY (line 1692) | type O_PREADONLY = {
  type O_PREADONLY_UNIONS (line 1713) | type O_PREADONLY_UNIONS = {
  type O_PUPDATE (line 1742) | type O_PUPDATE = {
  type O_PUPDATE_UNIONS (line 1760) | type O_PUPDATE_UNIONS = {
  type O_PUPDATE_VPATH (line 1778) | type O_PUPDATE_VPATH = {
  type RECORD_ABCD_STRING_OPTR (line 1808) | type RECORD_ABCD_STRING_OPTR = {
  type RECORD_ABCD_STRING_OPTW (line 1819) | type RECORD_ABCD_STRING_OPTW = {
  type RECORD_ABCD_STRING_REQR (line 1830) | type RECORD_ABCD_STRING_REQR = {
  type RECORD_ABCD_STRING_REQW (line 1841) | type RECORD_ABCD_STRING_REQW = {

FILE: tests/String.ts
  type S (line 8) | type S =

FILE: tests/Union.ts
  type U_MERGE (line 67) | type U_MERGE = {a: string, e: 22} | {b?: number, c: 42} | {b?: string, c...
  type MERGE_U (line 68) | type MERGE_U = {
Condensed preview — 293 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (422K chars).
[
  {
    "path": ".commitlintrc.json",
    "chars": 54,
    "preview": "{\n    \"extends\": [\"@commitlint/config-conventional\"]\n}"
  },
  {
    "path": ".eslintrc.json",
    "chars": 4443,
    "preview": "{ // https://github.com/Microsoft/vscode-eslint/issues/284\n    \"parser\": \"@typescript-eslint/parser\",\n    \"extends\": [\"e"
  },
  {
    "path": ".github/CODEOWNERS",
    "chars": 9,
    "preview": "* @millsp"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 75,
    "preview": "github: millsp\ncustom: https://www.buymeacoffee.com/millsp\npatreon: millsp\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/---bug-report.md",
    "chars": 679,
    "preview": "---\nname: \"🐞 Bug Report\"\nabout: \"Something isn't working well 💔\"\n\n---\n\n## 🐞 Bug Report\n\n#### Describe the bug\n<!-- A cle"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/---feature-request.md",
    "chars": 737,
    "preview": "---\nname: \"🍩 Feature Request\"\nabout: \"Suggest an idea for this project 💡\"\n\n---\n\n## 🍩 Feature Request\n\n#### Is your featu"
  },
  {
    "path": ".github/pull_request_template.md",
    "chars": 1142,
    "preview": "## 🎁 Pull Request\n\n<!-- Fill the following checklist. -->\n* [ ] Used a clear / meaningful title for this pull request\n* "
  },
  {
    "path": ".github/stale.yml",
    "chars": 690,
    "preview": "# Number of days of inactivity before an issue becomes stale\ndaysUntilStale: 60\n# Number of days of inactivity before a "
  },
  {
    "path": ".gitignore",
    "chars": 56,
    "preview": "package-lock.json\nnode_modules\n.vscode\n*.tgz\ndocs\nout\ndt"
  },
  {
    "path": ".huskyrc.json",
    "chars": 79,
    "preview": "{\n    \"hooks\": {\n        \"commit-msg\": \"commitlint -E HUSKY_GIT_PARAMS\"\n    }\n}"
  },
  {
    "path": ".travis.yml",
    "chars": 2361,
    "preview": "# https://docs.travis-ci.com/user/job-lifecycle\n\nlanguage: node_js\n\nnode_js:\n- '12.0'\n\ngit:\n  depth: 5\n\ninstall:\n- npm i"
  },
  {
    "path": ".versionrc.json",
    "chars": 551,
    "preview": "{\n    \"types\": [\n        {\"type\": \"feat\", \"section\": \"Features\"},\n        {\"type\": \"fix\", \"section\": \"Bug Fixes\"},\n     "
  },
  {
    "path": "CHANGELOG.md",
    "chars": 4186,
    "preview": "# Changelog\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github."
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3394,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 1202,
    "preview": "Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contribut"
  },
  {
    "path": "LICENSE",
    "chars": 11346,
    "preview": "                              Apache License\n                           Version 2.0, January 2004\n                      "
  },
  {
    "path": "README.md",
    "chars": 23274,
    "preview": "<p align=\"center\">\n  <a href=\"https://github.com/millsp/ts-toolbelt\">\n    <img alt=\"banner\" title=\"ts-toolbelt\" src=\"htt"
  },
  {
    "path": "SECURITY.md",
    "chars": 113,
    "preview": "If you have discovered a security vulnerability, please report it via [Tidelift](https://tidelift.com/security).\n"
  },
  {
    "path": "package.json",
    "chars": 1903,
    "preview": "{\n  \"name\": \"ts-toolbelt\",\n  \"version\": \"9.6.0\",\n  \"description\": \"TypeScript's largest utility library\",\n  \"keywords\": "
  },
  {
    "path": "scripts/build/clean.sh",
    "chars": 36,
    "preview": "#!/bin/bash\n\nrm -fr out\nrm -fr docs\n"
  },
  {
    "path": "scripts/build/code.sh",
    "chars": 46,
    "preview": "#!/bin/bash\n\nmkdir -p out\n\ntouch out/index.js\n"
  },
  {
    "path": "scripts/build/docs.sh",
    "chars": 522,
    "preview": "#!/bin/bash\n\n# creates folder if it doesn't exist yet\nmkdir -p docs\n\n# get the current version of the package\nDOCS_VERSI"
  },
  {
    "path": "scripts/build/types.sh",
    "chars": 90,
    "preview": "#!/bin/bash\n\nmkdir -p out\n\nnpx tsc sources/index.ts -d --emitDeclarationOnly --outDir out\n"
  },
  {
    "path": "scripts/ci/branch/ad.sh",
    "chars": 50,
    "preview": "#!/bin/bash\n\nbash ./scripts/tools/check-deploy.sh\n"
  },
  {
    "path": "scripts/ci/branch/bd.sh",
    "chars": 75,
    "preview": "#!/bin/bash\n\nnpm run build:clean\nnpm run build:code &&\nnpm run build:types\n"
  },
  {
    "path": "scripts/ci/master/ad.sh",
    "chars": 49,
    "preview": "#!/bin/bash\n\nbash ./scripts/tools/check-deploy.sh"
  },
  {
    "path": "scripts/ci/master/bd.sh",
    "chars": 75,
    "preview": "#!/bin/bash\n\nnpm run build:clean\nnpm run build:code &&\nnpm run build:types\n"
  },
  {
    "path": "scripts/ci/test/ad.sh",
    "chars": 240,
    "preview": "#!/bin/bash\n\n# rm -fr dt\n\n# git clone --depth=1 https://github.com/DefinitelyTyped/DefinitelyTyped.git dt &&\n\n# npx ts-n"
  },
  {
    "path": "scripts/ci/test/bd.sh",
    "chars": 128,
    "preview": "#!/bin/bash\n\nnpm run build:clean\n\nnpx ts-node scripts/tools/package-test-version.ts &&\nnpm run build:code &&\nnpm run bui"
  },
  {
    "path": "scripts/release.sh",
    "chars": 822,
    "preview": "#!/bin/bash\n\n# Make sure that we passed all tests\nnpm run test &&\n\n# Get the name of the current branch\nBRANCH=`git rev-"
  },
  {
    "path": "scripts/test/all.sh",
    "chars": 74,
    "preview": "#!/bin/bash\n\nnpm run test:code &&\nnpm run test:lint &&\nnpm run test:types\n"
  },
  {
    "path": "scripts/test/code.sh",
    "chars": 12,
    "preview": "#!/bin/bash\n"
  },
  {
    "path": "scripts/test/lint.sh",
    "chars": 37,
    "preview": "#!/bin/bash\n\nnpx eslint 'sources/**'\n"
  },
  {
    "path": "scripts/test/types.sh",
    "chars": 44,
    "preview": "#!/bin/bash\n\nnpx tsc --noEmit --diagnostics\n"
  },
  {
    "path": "scripts/tools/check-deploy.sh",
    "chars": 485,
    "preview": "#!/bin/bash\n\nsleep 60s # we'll just wait a little for it to get propagated\n\n# we replace the travis branch name with \"la"
  },
  {
    "path": "scripts/tools/dt-update-version.ts",
    "chars": 164,
    "preview": "import replace from './regex-update-file'\n\nreplace('./dt/types', '\"ts-toolbelt\": \".*\"', '\"ts-toolbelt\": \"test\"',\n    [\n "
  },
  {
    "path": "scripts/tools/package-test-version.ts",
    "chars": 179,
    "preview": "import replace from './regex-update-file'\n\nreplace('.', '\"version\": \"(?<version>.*)\"', `\"version\": \"<version>-test.${Dat"
  },
  {
    "path": "scripts/tools/regex-update-file.ts",
    "chars": 4632,
    "preview": "// @ts-ignore\nimport * as fs from 'fs'\n// @ts-ignore\nimport * as rl from 'readline'\n\n// regex-update-file\n// regex-find-"
  },
  {
    "path": "sources/Any/At.ts",
    "chars": 734,
    "preview": "import {Key} from './Key'\nimport {List} from '../List/List'\n\n/**\n * Get in `O` the type of a field of key `K`\n * @param "
  },
  {
    "path": "sources/Any/Await.ts",
    "chars": 402,
    "preview": "/**\n * Get the result type of a `Promise`\n * @param P A promise\n * @returns [[Any]]\n * @example\n * ```ts\n * import {C} f"
  },
  {
    "path": "sources/Any/Cast.ts",
    "chars": 477,
    "preview": "/**\n * Ask TS to re-check that `A1` extends `A2`.\n * And if it fails, `A2` will be enforced anyway.\n * Can also be used "
  },
  {
    "path": "sources/Any/Compute.ts",
    "chars": 1750,
    "preview": "import {Depth} from '../Object/_Internal'\nimport {BuiltIn} from '../Misc/BuiltIn'\nimport {Has} from '../Union/Has'\nimpor"
  },
  {
    "path": "sources/Any/Contains.ts",
    "chars": 706,
    "preview": "import {Extends} from './Extends'\n\n/**\n * Check whether `A1` is part of `A2` or not. It works like\n * [[Extends]] but [["
  },
  {
    "path": "sources/Any/Equals.ts",
    "chars": 576,
    "preview": "/**\n * Check whether `A1` is equal to `A2` or not.\n * @param A1\n * @param A2\n * @returns [[Boolean]]\n * @example\n * ```t"
  },
  {
    "path": "sources/Any/Extends.ts",
    "chars": 860,
    "preview": "/**\n * Check whether `A1` is part of `A2` or not. The difference with\n * `extends` is that it forces a [[Boolean]] retur"
  },
  {
    "path": "sources/Any/If.ts",
    "chars": 140,
    "preview": "import {Boolean} from '../Boolean/_Internal'\n\nexport type If<B extends Boolean, Then, Else = never> =\n    B extends 1\n  "
  },
  {
    "path": "sources/Any/Is.ts",
    "chars": 1405,
    "preview": "import {Match} from './_Internal'\nimport {Extends} from './Extends'\nimport {Equals} from './Equals'\nimport {Contains} fr"
  },
  {
    "path": "sources/Any/Key.ts",
    "chars": 88,
    "preview": "/**\n * Describes index keys for any type\n */\nexport type Key = string | number | symbol\n"
  },
  {
    "path": "sources/Any/Keys.ts",
    "chars": 238,
    "preview": "import {List} from '../List/List'\n\n/**\n * Get the keys of `A`\n * @param A\n * @returns [[Key]]\n * @example\n * ```ts\n * ``"
  },
  {
    "path": "sources/Any/KnownKeys.ts",
    "chars": 333,
    "preview": "import {Keys} from './Keys'\n\n/**\n * Get the known keys of an [[Object]]\n * @param O\n * @returns [[Key]]\n * @example\n * `"
  },
  {
    "path": "sources/Any/Promise.ts",
    "chars": 506,
    "preview": "/**\n * Create an asynchronous operation like the original `Promise` type but this\n * one prevents promises to be wrapped"
  },
  {
    "path": "sources/Any/Try.ts",
    "chars": 590,
    "preview": "/**\n * Similar to [[Cast]] but with a custom fallback `Catch`. If it fails,\n * it will enforce `Catch` instead of `A2`.\n"
  },
  {
    "path": "sources/Any/Type.ts",
    "chars": 526,
    "preview": "import {Key} from './Key'\n\ndeclare const id: unique symbol\n\n/**\n * Create your own opaque sub-type from a type `A`\n * @p"
  },
  {
    "path": "sources/Any/_Internal.ts",
    "chars": 577,
    "preview": "/**\n * Describes the match strategy when matching types\n * * `default`     : `extends->`\n * * `contains->`  : X contains"
  },
  {
    "path": "sources/Any/_api.ts",
    "chars": 466,
    "preview": "/** @ignore *//** */\n\nexport {Await} from './Await'\nexport {At} from './At'\nexport {Cast} from './Cast'\nexport {Compute}"
  },
  {
    "path": "sources/Any/x.ts",
    "chars": 107,
    "preview": "const _ = Symbol('x')\n\n/**\n * A placeholder that is used in various ways\n */\nexport type x = typeof _ & {}\n"
  },
  {
    "path": "sources/Boolean/And.ts",
    "chars": 558,
    "preview": "import {Boolean} from './_Internal'\n\n/**\n * Logical `&&` operator (behaves like the JS one)\n * @param B1 Left-hand side\n"
  },
  {
    "path": "sources/Boolean/Not.ts",
    "chars": 346,
    "preview": "import {Boolean} from './_Internal'\n\n/**\n * Logical `!` operator (behaves like the JS one)\n * @param B to negate\n * @ret"
  },
  {
    "path": "sources/Boolean/Or.ts",
    "chars": 542,
    "preview": "import {Boolean} from './_Internal'\n\n/**\n * Logical `||` operator (behaves like the JS one)\n * @param B1 Left-hand side\n"
  },
  {
    "path": "sources/Boolean/Xor.ts",
    "chars": 543,
    "preview": "import {Boolean} from './_Internal'\n\n/**\n * Logical `^` operator (behaves like the JS one)\n * @param B1 Left-hand side\n "
  },
  {
    "path": "sources/Boolean/_Internal.ts",
    "chars": 28,
    "preview": "export type Boolean = 0 | 1\n"
  },
  {
    "path": "sources/Boolean/_api.ts",
    "chars": 124,
    "preview": "/** @ignore *//** */\n\nexport {And} from './And'\nexport {Not} from './Not'\nexport {Or} from './Or'\nexport {Xor} from './X"
  },
  {
    "path": "sources/Class/Class.ts",
    "chars": 512,
    "preview": "import {List} from '../List/List'\n\n/**\n * Alias to create/describe a `class`\n * @param P its constructor parameters\n * @"
  },
  {
    "path": "sources/Class/Instance.ts",
    "chars": 561,
    "preview": "import {Class} from './Class'\n\n/**\n * Get the instance type of a `class` from a class object\n * @param C * *typeof** cla"
  },
  {
    "path": "sources/Class/Parameters.ts",
    "chars": 432,
    "preview": "import {Class} from './Class'\n\n/**\n * Get the parameters of a class constructor\n * @param C **typeof** class\n * @returns"
  },
  {
    "path": "sources/Class/_api.ts",
    "chars": 128,
    "preview": "/** @ignore *//** */\n\nexport {Class} from './Class'\nexport {Instance} from './Instance'\nexport {Parameters} from './Para"
  },
  {
    "path": "sources/Community/IncludesDeep.ts",
    "chars": 1417,
    "preview": "import {Match} from '../Any/_Internal'\nimport {UnionOf} from '../Object/UnionOf'\nimport {Next} from '../Iteration/Next'\n"
  },
  {
    "path": "sources/Community/IsLiteral.ts",
    "chars": 969,
    "preview": "import {And} from '../Boolean/And'\nimport {Or} from '../Boolean/Or'\nimport {Extends} from '../Any/Extends'\n\n/**\n * @hidd"
  },
  {
    "path": "sources/Community/_api.ts",
    "chars": 104,
    "preview": "/** @ignore *//** */\n\nexport {IncludesDeep} from './IncludesDeep'\nexport {IsLiteral} from './IsLiteral'\n"
  },
  {
    "path": "sources/Function/AutoPath.ts",
    "chars": 2828,
    "preview": "import {Key} from '../Any/Key'\nimport {Head} from '../List/Head'\nimport {List} from '../List/List'\nimport {Pop} from '.."
  },
  {
    "path": "sources/Function/Compose/List/Async.ts",
    "chars": 5770,
    "preview": "/** @ignore *//** */\n\nimport {Function} from '../../Function'\nimport {Await} from '../../../Any/Await'\nimport {Curry} fr"
  },
  {
    "path": "sources/Function/Compose/List/Sync.ts",
    "chars": 4608,
    "preview": "/** @ignore *//** */\n\nimport {Curry} from '../../Curry'\nimport {Function} from '../../Function'\n\n/**\n *@hidden\n */\nexpor"
  },
  {
    "path": "sources/Function/Compose/Multi/Async.ts",
    "chars": 5801,
    "preview": "/** @ignore *//** */\n\nimport {Function} from '../../Function'\nimport {Await} from '../../../Any/Await'\nimport {Curry} fr"
  },
  {
    "path": "sources/Function/Compose/Multi/Sync.ts",
    "chars": 4640,
    "preview": "\n/** @ignore *//** */\n\nimport {Curry} from '../../Curry'\nimport {Function} from '../../Function'\n\n/**\n *@hidden\n */\nexpo"
  },
  {
    "path": "sources/Function/Compose.ts",
    "chars": 1452,
    "preview": "import {IntersectOf} from '../Union/IntersectOf'\nimport {ComposeListAsync} from './Compose/List/Async'\nimport {ComposeLi"
  },
  {
    "path": "sources/Function/Curry.ts",
    "chars": 2945,
    "preview": "import {Pos} from '../Iteration/Pos'\nimport {Concat} from '../List/Concat'\nimport {Length} from '../List/Length'\nimport "
  },
  {
    "path": "sources/Function/Exact.ts",
    "chars": 496,
    "preview": "import {Narrowable} from './_Internal'\n\n/**\n * Force `A` to comply with `W`. `A` must be a shape of `W`. In other words,"
  },
  {
    "path": "sources/Function/Function.ts",
    "chars": 406,
    "preview": "import {List} from '../List/List'\n\n/**\n * Alias to create a [[Function]]\n * @param P parameters\n * @param R return type\n"
  },
  {
    "path": "sources/Function/Length.ts",
    "chars": 608,
    "preview": "import {Function} from './Function'\nimport {Parameters} from './Parameters'\nimport {Length as LLength} from '../List/Len"
  },
  {
    "path": "sources/Function/Narrow.ts",
    "chars": 897,
    "preview": "import {Try} from '../Any/Try'\nimport {Narrowable} from './_Internal'\n\n/**\n * @hidden\n */\ntype NarrowRaw<A> =\n| (A exten"
  },
  {
    "path": "sources/Function/NoInfer.ts",
    "chars": 1044,
    "preview": "/**\n * Explain to TS which function parameter has priority for generic inference\n * @param A to de-prioritize\n * @return"
  },
  {
    "path": "sources/Function/Parameters.ts",
    "chars": 525,
    "preview": "import {Function} from './Function'\n\n/**\n * Extract parameters from a [[Function]]\n * @param F to extract from\n * @retur"
  },
  {
    "path": "sources/Function/Pipe/List/Async.ts",
    "chars": 5896,
    "preview": "/** @ignore *//** */\nimport {Function} from '../../Function'\nimport {Await} from '../../../Any/Await'\nimport {Curry} fro"
  },
  {
    "path": "sources/Function/Pipe/List/Sync.ts",
    "chars": 4605,
    "preview": "/** @ignore *//** */\n\nimport {Curry} from '../../Curry'\nimport {Function} from '../../Function'\n\n/**\n *@hidden\n */\nexpor"
  },
  {
    "path": "sources/Function/Pipe/Multi/Async.ts",
    "chars": 5928,
    "preview": "/** @ignore *//** */\n\nimport {Function} from '../../Function'\nimport {Await} from '../../../Any/Await'\nimport {Curry} fr"
  },
  {
    "path": "sources/Function/Pipe/Multi/Sync.ts",
    "chars": 4636,
    "preview": "/** @ignore *//** */\n\nimport {Curry} from '../../Curry'\nimport {Function} from '../../Function'\n\n/**\n *@hidden\n */\nexpor"
  },
  {
    "path": "sources/Function/Pipe.ts",
    "chars": 1358,
    "preview": "import {IntersectOf} from '../Union/IntersectOf'\nimport {PipeListAsync} from './Pipe/List/Async'\nimport {PipeListSync} f"
  },
  {
    "path": "sources/Function/Promisify.ts",
    "chars": 498,
    "preview": "import {Function} from './Function'\nimport {Parameters} from './Parameters'\nimport {Return} from './Return'\nimport {Prom"
  },
  {
    "path": "sources/Function/Return.ts",
    "chars": 468,
    "preview": "import {Function} from './Function'\nimport {List} from '../List/List'\n\n/**\n * Extract the return type of a [[Function]]\n"
  },
  {
    "path": "sources/Function/UnCurry.ts",
    "chars": 647,
    "preview": "import {Curry} from './Curry'\n\n/**\n * Undoes the work that was done by [[Curry]]\n * @param F to uncurry\n * @returns [[Fu"
  },
  {
    "path": "sources/Function/ValidPath.ts",
    "chars": 2172,
    "preview": "import {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration} from '../Iteration/Iteration'\nimport {Next} from"
  },
  {
    "path": "sources/Function/_Internal.ts",
    "chars": 393,
    "preview": "/**\n * Describes function modes\n * `sync` : Normal function\n * `async`: Promised result\n */\nexport type Mode = 'sync' | "
  },
  {
    "path": "sources/Function/_api.ts",
    "chars": 496,
    "preview": "/** @ignore *//** */\n\nexport {AutoPath} from './AutoPath'\nexport {Compose} from './Compose'\nexport {Exact} from './Exact"
  },
  {
    "path": "sources/Iteration/Iteration.ts",
    "chars": 8540,
    "preview": "/**\n * An entry of `IterationMap`\n */\nexport type Iteration = [\n    value: number,\n    sign: '-' | '0' | '+',\n    prev: "
  },
  {
    "path": "sources/Iteration/IterationOf.ts",
    "chars": 641,
    "preview": "import {IterationMap} from './Iteration'\n\n/**\n * Transform a number into an [[Iteration]]\n * (to use [[Prev]], [[Next]],"
  },
  {
    "path": "sources/Iteration/Key.ts",
    "chars": 365,
    "preview": "import {Iteration} from './Iteration'\n\n/**\n * Get the position of `I` (**string**)\n * @param I to query\n * @returns [[St"
  },
  {
    "path": "sources/Iteration/Next.ts",
    "chars": 378,
    "preview": "import {Iteration, IterationMap} from './Iteration'\n\n/**\n * Move `I`'s position forward\n * @param I to move\n * @returns "
  },
  {
    "path": "sources/Iteration/Pos.ts",
    "chars": 354,
    "preview": "import {Iteration} from './Iteration'\n\n/**\n * Get the position of `I` (**number**)\n * @param I to query\n * @returns `num"
  },
  {
    "path": "sources/Iteration/Prev.ts",
    "chars": 403,
    "preview": "\nimport {Iteration, IterationMap} from './Iteration'\n/**\n * Move `I`'s position backwards\n * @param I to move\n * @return"
  },
  {
    "path": "sources/Iteration/_Internal.ts",
    "chars": 900,
    "preview": "/**\n * Describes how to perform iterations\n */\nexport type Way = '->' | '<-'\n\n// ---------------------------------------"
  },
  {
    "path": "sources/Iteration/_api.ts",
    "chars": 210,
    "preview": "/** @ignore *//** */\n\nexport {Iteration} from './Iteration'\nexport {IterationOf} from './IterationOf'\nexport {Key} from "
  },
  {
    "path": "sources/List/Append.ts",
    "chars": 508,
    "preview": "import {List} from './List'\n\n/**\n * Add an element `A` at the end of `L`.\n * @param L to append to\n * @param A to be add"
  },
  {
    "path": "sources/List/Assign.ts",
    "chars": 1082,
    "preview": "import {Assign as OAssign} from '../Object/Assign'\nimport {List} from './List'\nimport {Depth} from '../Object/_Internal'"
  },
  {
    "path": "sources/List/AtLeast.ts",
    "chars": 1145,
    "preview": "import {Key} from './_Internal'\nimport {AtLeast as OAtLeast} from '../Object/AtLeast'\nimport {ObjectOf} from './ObjectOf"
  },
  {
    "path": "sources/List/Compulsory.ts",
    "chars": 769,
    "preview": "import {Depth} from '../Object/_Internal'\nimport {CompulsoryPart} from '../Object/Compulsory'\nimport {List} from './List"
  },
  {
    "path": "sources/List/CompulsoryKeys.ts",
    "chars": 481,
    "preview": "import {CompulsoryKeys as OCompulsoryKeys} from '../Object/CompulsoryKeys'\nimport {ObjectOf} from './ObjectOf'\nimport {L"
  },
  {
    "path": "sources/List/Concat.ts",
    "chars": 535,
    "preview": "import {List} from './List'\n\n/**\n * Attach `L1` at the end of `L`\n * @param L to concat with\n * @param L1 to be attached"
  },
  {
    "path": "sources/List/Diff.ts",
    "chars": 696,
    "preview": "import {Diff as ODiff} from '../Object/Diff'\nimport {ListOf} from '../Object/ListOf'\nimport {Match} from '../Any/_Intern"
  },
  {
    "path": "sources/List/Drop.ts",
    "chars": 1487,
    "preview": "import {Tail} from './Tail'\nimport {Cast} from '../Any/Cast'\nimport {IterationOf} from '../Iteration/IterationOf'\nimport"
  },
  {
    "path": "sources/List/Either.ts",
    "chars": 831,
    "preview": "import {Key} from './_Internal'\nimport {Either as OEither} from '../Object/Either'\nimport {ObjectOf} from './ObjectOf'\ni"
  },
  {
    "path": "sources/List/Exclude.ts",
    "chars": 599,
    "preview": "import {Match} from '../Any/_Internal'\nimport {ListOf} from '../Object/ListOf'\nimport {Exclude as OExclude} from '../Obj"
  },
  {
    "path": "sources/List/ExcludeKeys.ts",
    "chars": 597,
    "preview": "import {ExcludeKeys as OExcludeKeys} from '../Object/ExcludeKeys'\nimport {Match} from '../Any/_Internal'\nimport {ObjectO"
  },
  {
    "path": "sources/List/Extract.ts",
    "chars": 379,
    "preview": "import {KeySet} from './KeySet'\nimport {Pick} from './Pick'\nimport {List} from './List'\n\n/**\n * Pick a range of entries "
  },
  {
    "path": "sources/List/Filter.ts",
    "chars": 537,
    "preview": "import {Filter as OFilter} from '../Object/Filter'\nimport {ListOf} from '../Object/ListOf'\nimport {Match} from '../Any/_"
  },
  {
    "path": "sources/List/FilterKeys.ts",
    "chars": 514,
    "preview": "import {FilterKeys as OFilterKeys} from '../Object/FilterKeys'\nimport {Match} from '../Any/_Internal'\nimport {ObjectOf} "
  },
  {
    "path": "sources/List/Flatten.ts",
    "chars": 1261,
    "preview": "import {List} from './List'\nimport {_UnNest} from './UnNest'\nimport {Cast} from '../Any/Cast'\nimport {Equals} from '../A"
  },
  {
    "path": "sources/List/Group.ts",
    "chars": 809,
    "preview": "import {_Drop} from './Drop'\nimport {_Take} from './Take'\nimport {Cast} from '../Any/Cast'\nimport {Append} from './Appen"
  },
  {
    "path": "sources/List/Has.ts",
    "chars": 605,
    "preview": "import {Match} from '../Any/_Internal'\nimport {Has as OHas} from '../Object/Has'\nimport {Key} from './_Internal'\nimport "
  },
  {
    "path": "sources/List/HasPath.ts",
    "chars": 614,
    "preview": "import {HasPath as OHasPath} from '../Object/HasPath'\nimport {Match} from '../Any/_Internal'\nimport {Key} from '../Any/K"
  },
  {
    "path": "sources/List/Head.ts",
    "chars": 257,
    "preview": "import {Length} from './Length'\nimport {List} from './List'\n\n/**\n * Get the first entry of `L`\n * @param L to extract fr"
  },
  {
    "path": "sources/List/Includes.ts",
    "chars": 505,
    "preview": "import {Match} from '../Any/_Internal'\nimport {Includes as OIncludes} from '../Object/Includes'\nimport {ObjectOf} from '"
  },
  {
    "path": "sources/List/Intersect.ts",
    "chars": 589,
    "preview": "import {Intersect as OIntersect} from '../Object/Intersect'\nimport {Match} from '../Any/_Internal'\nimport {ListOf} from "
  },
  {
    "path": "sources/List/IntersectKeys.ts",
    "chars": 550,
    "preview": "import {Match} from '../Any/_Internal'\nimport {IntersectKeys as OIntersectKeys} from '../Object/IntersectKeys'\nimport {O"
  },
  {
    "path": "sources/List/KeySet.ts",
    "chars": 303,
    "preview": "import {Range} from '../Number/Range'\nimport {UnionOf} from './UnionOf'\n\n/**\n * Create a set of keys\n * @param From to s"
  },
  {
    "path": "sources/List/Last.ts",
    "chars": 260,
    "preview": "import {Tail} from './Tail'\nimport {Length} from './Length'\nimport {List} from './List'\n\n/**\n * Get the last entry of `L"
  },
  {
    "path": "sources/List/LastKey.ts",
    "chars": 257,
    "preview": "import {Length} from './Length'\nimport {Tail} from './Tail'\nimport {List} from './List'\n\n/**\n * Get the last index of `L"
  },
  {
    "path": "sources/List/Length.ts",
    "chars": 204,
    "preview": "import {List} from './List'\n\n/**\n * Get the length of `L`\n * @param L to get length\n * @returns [[String]] or `number`\n "
  },
  {
    "path": "sources/List/List.ts",
    "chars": 188,
    "preview": "/**\n * A [[List]]\n * @param A its type\n * @returns [[List]]\n * @example\n * ```ts\n * type list0 = [1, 2, 3]\n * type list1"
  },
  {
    "path": "sources/List/Longest.ts",
    "chars": 432,
    "preview": "import {Has} from '../Union/Has'\nimport {List} from './List'\n\n/**\n * Get the longest [[List]] of `L` & `L1`\n * (`L` has "
  },
  {
    "path": "sources/List/Merge.ts",
    "chars": 906,
    "preview": "import {Merge as OMerge} from '../Object/Merge'\nimport {List} from './List'\nimport {Depth} from '../Object/_Internal'\nim"
  },
  {
    "path": "sources/List/MergeAll.ts",
    "chars": 837,
    "preview": "import {MergeAll as OMergeAll} from '../Object/MergeAll'\nimport {List} from '../List/List'\nimport {Depth} from '../Objec"
  },
  {
    "path": "sources/List/Modify.ts",
    "chars": 462,
    "preview": "import {Replace} from '../Union/Replace'\nimport {x} from '../Any/x'\nimport {List} from './List'\nimport {Cast} from '../A"
  },
  {
    "path": "sources/List/NonNullable.ts",
    "chars": 1324,
    "preview": "import {_Pick} from '../Object/Pick'\nimport {Key} from './_Internal'\nimport {NonNullable as UNonNullable} from '../Union"
  },
  {
    "path": "sources/List/NonNullableKeys.ts",
    "chars": 336,
    "preview": "import {NonNullableKeys as ONonNullableKeys} from '../Object/NonNullableKeys'\nimport {ObjectOf} from './ObjectOf'\nimport"
  },
  {
    "path": "sources/List/Nullable.ts",
    "chars": 520,
    "preview": "import {Key} from './_Internal'\nimport {List} from './List'\nimport {Update} from '../Object/Update'\nimport {x} from '../"
  },
  {
    "path": "sources/List/NullableKeys.ts",
    "chars": 317,
    "preview": "import {NullableKeys as ONullableKeys} from '../Object/NullableKeys'\nimport {ObjectOf} from './ObjectOf'\nimport {List} f"
  },
  {
    "path": "sources/List/ObjectOf.ts",
    "chars": 497,
    "preview": "import {_Omit} from '../Object/Omit'\nimport {_Pick} from '../Object/Pick'\nimport {Length} from './Length'\nimport {List} "
  },
  {
    "path": "sources/List/Omit.ts",
    "chars": 569,
    "preview": "import {_Omit as _OOmit} from '../Object/Omit'\nimport {_ListOf} from '../Object/ListOf'\nimport {Key} from './_Internal'\n"
  },
  {
    "path": "sources/List/Optional.ts",
    "chars": 435,
    "preview": "import {Cast} from '../Any/Cast'\nimport {OptionalPart} from '../Object/Optional'\nimport {Depth} from '../Object/_Interna"
  },
  {
    "path": "sources/List/OptionalKeys.ts",
    "chars": 317,
    "preview": "import {OptionalKeys as OOptionalKeys} from '../Object/OptionalKeys'\nimport {ObjectOf} from './ObjectOf'\nimport {List} f"
  },
  {
    "path": "sources/List/Overwrite.ts",
    "chars": 375,
    "preview": "import {Overwrite as OOverwrite} from '../Object/Overwrite'\nimport {Cast} from '../Any/Cast'\nimport {List} from './List'"
  },
  {
    "path": "sources/List/Partial.ts",
    "chars": 587,
    "preview": "import {Partial as OPartial} from '../Object/Partial'\nimport {Depth} from '../Object/_Internal'\nimport {Cast} from '../A"
  },
  {
    "path": "sources/List/Patch.ts",
    "chars": 916,
    "preview": "import {Patch as OPatch} from '../Object/Patch'\nimport {List} from './List'\nimport {Depth} from '../Object/_Internal'\nim"
  },
  {
    "path": "sources/List/PatchAll.ts",
    "chars": 830,
    "preview": "import {PatchAll as OPatchAll} from '../Object/PatchAll'\nimport {List} from '../List/List'\nimport {Depth} from '../Objec"
  },
  {
    "path": "sources/List/Path.ts",
    "chars": 341,
    "preview": "import {Path as OPath} from '../Object/Path'\nimport {Key} from '../Any/Key'\nimport {List} from './List'\n\n/**\n * Get in `"
  },
  {
    "path": "sources/List/Paths.ts",
    "chars": 342,
    "preview": "import {Paths as OPaths} from '../Object/Paths'\nimport {ObjectOf} from './ObjectOf'\nimport {List} from './List'\n\n/**\n * "
  },
  {
    "path": "sources/List/Pick.ts",
    "chars": 571,
    "preview": "import {_Pick as _OPick} from '../Object/Pick'\nimport {_ListOf} from '../Object/ListOf'\nimport {Key} from './_Internal'\n"
  },
  {
    "path": "sources/List/Pop.ts",
    "chars": 315,
    "preview": "import {_Omit} from './Omit'\nimport {List} from './List'\n\n/**\n * Remove the last element out of `L`\n * @param L to remov"
  },
  {
    "path": "sources/List/Prepend.ts",
    "chars": 251,
    "preview": "import {List} from './List'\n\n/**\n * Add an element `A` at the beginning of `L`\n * @param L to append to\n * @param A to b"
  },
  {
    "path": "sources/List/Readonly.ts",
    "chars": 435,
    "preview": "import {Depth} from '../Object/_Internal'\nimport {ReadonlyPart} from '../Object/Readonly'\nimport {List} from './List'\nim"
  },
  {
    "path": "sources/List/ReadonlyKeys.ts",
    "chars": 317,
    "preview": "import {ReadonlyKeys as OReadonlyKeys} from '../Object/ReadonlyKeys'\nimport {ObjectOf} from './ObjectOf'\nimport {List} f"
  },
  {
    "path": "sources/List/Remove.ts",
    "chars": 374,
    "preview": "import {KeySet} from './KeySet'\nimport {Omit} from './Omit'\nimport {List} from './List'\n\n/**\n * Remove out of `L` a rang"
  },
  {
    "path": "sources/List/Repeat.ts",
    "chars": 1025,
    "preview": "import {Next} from '../Iteration/Next'\nimport {Prepend} from './Prepend'\nimport {IterationOf} from '../Iteration/Iterati"
  },
  {
    "path": "sources/List/Replace.ts",
    "chars": 537,
    "preview": "import {Replace as OReplace} from '../Object/Replace'\nimport {Match} from '../Any/_Internal'\nimport {Cast} from '../Any/"
  },
  {
    "path": "sources/List/Required.ts",
    "chars": 435,
    "preview": "import {Depth} from '../Object/_Internal'\nimport {RequiredPart} from '../Object/Required'\nimport {List} from './List'\nim"
  },
  {
    "path": "sources/List/RequiredKeys.ts",
    "chars": 317,
    "preview": "import {RequiredKeys as ORequiredKeys} from '../Object/RequiredKeys'\nimport {ObjectOf} from './ObjectOf'\nimport {List} f"
  },
  {
    "path": "sources/List/Reverse.ts",
    "chars": 985,
    "preview": "import {Prepend} from './Prepend'\nimport {Pos} from '../Iteration/Pos'\nimport {Next} from '../Iteration/Next'\nimport {Le"
  },
  {
    "path": "sources/List/Select.ts",
    "chars": 535,
    "preview": "import {Match} from '../Any/_Internal'\nimport {Select as OSelect} from '../Object/Select'\nimport {ListOf} from '../Objec"
  },
  {
    "path": "sources/List/SelectKeys.ts",
    "chars": 508,
    "preview": "import {Match} from '../Any/_Internal'\nimport {SelectKeys as OSelectKeys} from '../Object/SelectKeys'\nimport {ObjectOf} "
  },
  {
    "path": "sources/List/Shortest.ts",
    "chars": 434,
    "preview": "import {Has} from '../Union/Has'\nimport {List} from './List'\n\n/**\n * Get the shortest [[List]] of `L` & `L1`\n * (`L` has"
  },
  {
    "path": "sources/List/Tail.ts",
    "chars": 282,
    "preview": "import {List} from './List'\n\n/**\n * Remove the first item out of a [[List]]\n * @param L\n * @returns [[List]]\n * @example"
  },
  {
    "path": "sources/List/Take.ts",
    "chars": 1619,
    "preview": "import {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration} from '../Iteration/Iteration'\nimport {Pos} from "
  },
  {
    "path": "sources/List/UnNest.ts",
    "chars": 2077,
    "preview": "import {Concat} from './Concat'\nimport {Append} from './Append'\nimport {Cast} from '../Any/Cast'\nimport {Length} from '."
  },
  {
    "path": "sources/List/Undefinable.ts",
    "chars": 475,
    "preview": "import {Key} from './_Internal'\nimport {List} from './List'\nimport {Update} from '../Object/Update'\nimport {x} from '../"
  },
  {
    "path": "sources/List/UndefinableKeys.ts",
    "chars": 335,
    "preview": "import {UndefinableKeys as OUndefinableKeys} from '../Object/UndefinableKeys'\nimport {ObjectOf} from './ObjectOf'\nimport"
  },
  {
    "path": "sources/List/UnionOf.ts",
    "chars": 204,
    "preview": "import {List} from './List'\n\n/**\n * Transform a [[List]] into an [[Union]]\n * @param L to transform\n * @returns [[Any]]\n"
  },
  {
    "path": "sources/List/Unionize.ts",
    "chars": 469,
    "preview": "import {Key} from '../Any/Key'\nimport {List} from './List'\nimport {At} from '../Any/At'\n\n/**\n * Make the fields of `L` u"
  },
  {
    "path": "sources/List/Update.ts",
    "chars": 507,
    "preview": "import {Key} from './_Internal'\nimport {List} from './List'\nimport {Update as OUpdate} from '../Object/Update'\nimport {C"
  },
  {
    "path": "sources/List/Writable.ts",
    "chars": 435,
    "preview": "import {Depth} from '../Object/_Internal'\nimport {WritablePart} from '../Object/Writable'\nimport {List} from './List'\nim"
  },
  {
    "path": "sources/List/WritableKeys.ts",
    "chars": 317,
    "preview": "import {WritableKeys as OWritableKeys} from '../Object/WritableKeys'\nimport {ObjectOf} from './ObjectOf'\nimport {List} f"
  },
  {
    "path": "sources/List/Zip.ts",
    "chars": 1048,
    "preview": "import {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration} from '../Iteration/Iteration'\nimport {Next} from"
  },
  {
    "path": "sources/List/ZipObj.ts",
    "chars": 1268,
    "preview": "import {Length} from './Length'\nimport {Pos} from '../Iteration/Pos'\nimport {Next} from '../Iteration/Next'\nimport {Iter"
  },
  {
    "path": "sources/List/_Internal.ts",
    "chars": 258,
    "preview": "/** @ignore *//** */\n\nimport {Overwrite} from '../Object/Overwrite'\nimport {List} from './List'\n\n/**\n * Remove `?` & `re"
  },
  {
    "path": "sources/List/_api.ts",
    "chars": 2488,
    "preview": "/** @ignore *//** */\n\nexport {Append} from './Append'\nexport {Assign} from './Assign'\nexport {AtLeast} from './AtLeast'\n"
  },
  {
    "path": "sources/Misc/BuiltIn.ts",
    "chars": 1110,
    "preview": "/*\n * type Errors =\n * | Error\n * | EvalError\n * | RangeError\n * | ReferenceError\n * | SyntaxError\n * | TypeError\n * | U"
  },
  {
    "path": "sources/Misc/JSON/Array.ts",
    "chars": 114,
    "preview": "import {Value} from './Value'\n\n/**\n * A list of JSON [[Value]]s\n */\nexport interface List extends Array<Value> {}\n"
  },
  {
    "path": "sources/Misc/JSON/Object.ts",
    "chars": 120,
    "preview": "import {Value} from './Value'\n\n/**\n * An object of JSON [[Value]]s\n */\nexport interface Object {\n\t[k: string]: Value;\n}\n"
  },
  {
    "path": "sources/Misc/JSON/Primitive.ts",
    "chars": 86,
    "preview": "/**\n * Basic JSON Value\n */\nexport type Primitive = string | number | boolean | null;\n"
  },
  {
    "path": "sources/Misc/JSON/Value.ts",
    "chars": 177,
    "preview": "import {Primitive} from './Primitive'\nimport {List} from './Array'\nimport {Object} from './Object'\n\n/**\n * Any JSON data"
  },
  {
    "path": "sources/Misc/JSON/_api.ts",
    "chars": 160,
    "preview": "/** @ignore *//** */\n\nexport {List as Array} from './Array'\nexport {Object} from './Object'\nexport {Primitive} from './P"
  },
  {
    "path": "sources/Misc/Primitive.ts",
    "chars": 148,
    "preview": "/**\n * All primitive types\n */\nexport type Primitive =\n    | boolean\n    | string\n    | number\n    | bigint\n    | symbol"
  },
  {
    "path": "sources/Misc/_api.ts",
    "chars": 145,
    "preview": "/** @ignore *//** */\n\nimport * as JSON from './JSON/_api'\n\nexport {JSON}\nexport {BuiltIn} from './BuiltIn'\nexport {Primi"
  },
  {
    "path": "sources/Number/Absolute.ts",
    "chars": 720,
    "preview": "import {_Negate} from './Negate'\nimport {_IsNegative} from './IsNegative'\nimport {IterationOf} from '../Iteration/Iterat"
  },
  {
    "path": "sources/Number/Add.ts",
    "chars": 2113,
    "preview": "import {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration} from '../Iteration/Iteration'\nimport {Pos} from "
  },
  {
    "path": "sources/Number/Greater.ts",
    "chars": 806,
    "preview": "import {_Sub} from './Sub'\nimport {_IsPositive} from './IsPositive'\nimport {IterationOf} from '../Iteration/IterationOf'"
  },
  {
    "path": "sources/Number/GreaterEq.ts",
    "chars": 873,
    "preview": "import {Equals} from '../Any/Equals'\nimport {_Greater} from './Greater'\nimport {IterationOf} from '../Iteration/Iteratio"
  },
  {
    "path": "sources/Number/IsNegative.ts",
    "chars": 585,
    "preview": "import {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration} from '../Iteration/Iteration'\n\n/**\n * @hidden\n *"
  },
  {
    "path": "sources/Number/IsPositive.ts",
    "chars": 626,
    "preview": "import {_IsNegative} from './IsNegative'\nimport {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration} from '."
  },
  {
    "path": "sources/Number/IsZero.ts",
    "chars": 557,
    "preview": "import {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration} from '../Iteration/Iteration'\n\n/**\n * @hidden\n *"
  },
  {
    "path": "sources/Number/Lower.ts",
    "chars": 751,
    "preview": "import {_Greater} from './Greater'\nimport {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration} from '../Iter"
  },
  {
    "path": "sources/Number/LowerEq.ts",
    "chars": 459,
    "preview": "import {GreaterEq} from './GreaterEq'\n\n/**\n * Check if a [[Number]] is lower or equal to another one\n * @param N1 to com"
  },
  {
    "path": "sources/Number/Negate.ts",
    "chars": 718,
    "preview": "import {_Sub} from './Sub'\nimport {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration, IterationMap} from '."
  },
  {
    "path": "sources/Number/Range.ts",
    "chars": 1931,
    "preview": "import {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration} from '../Iteration/Iteration'\nimport {Prepend} f"
  },
  {
    "path": "sources/Number/Sub.ts",
    "chars": 2115,
    "preview": "import {IterationOf} from '../Iteration/IterationOf'\nimport {Iteration} from '../Iteration/Iteration'\nimport {Pos} from "
  },
  {
    "path": "sources/Number/_api.ts",
    "chars": 420,
    "preview": "/** @ignore *//** */\n\nexport {Absolute} from './Absolute'\nexport {Add} from './Add'\nexport {Greater} from './Greater'\nex"
  },
  {
    "path": "sources/Object/Assign.ts",
    "chars": 1690,
    "preview": "import {Iteration} from '../Iteration/Iteration'\nimport {IterationOf} from '../Iteration/IterationOf'\nimport {Merge} fro"
  },
  {
    "path": "sources/Object/AtLeast.ts",
    "chars": 1093,
    "preview": "import {_Omit} from './Omit'\nimport {_Pick} from './Pick'\nimport {Key} from '../Any/Key'\nimport {Keys} from '../Any/Keys"
  },
  {
    "path": "sources/Object/Compulsory.ts",
    "chars": 1279,
    "preview": "import {_Pick} from './Pick'\nimport {Depth} from './_Internal'\nimport {Key} from '../Any/Key'\nimport {NonNullable} from "
  },
  {
    "path": "sources/Object/CompulsoryKeys.ts",
    "chars": 470,
    "preview": "/**\n * @hidden\n */\nexport type _CompulsoryKeys<O extends object> = {\n    [K in keyof O]-?: [O[K] & (undefined | null)] e"
  },
  {
    "path": "sources/Object/Diff.ts",
    "chars": 1151,
    "preview": "import {Exclude} from './Exclude'\nimport {Match} from '../Any/_Internal'\nimport {PatchFlat} from './Patch'\n\n/**\n * Get a"
  }
]

// ... and 93 more files (download for full content)

About this extraction

This page contains the full source code of the millsp/ts-toolbelt GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 293 files (382.9 KB), approximately 121.0k tokens, and a symbol index with 588 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!