From 009434e652eede7a8732fba6615ad18bbafca984 Mon Sep 17 00:00:00 2001 From: khai96_ Date: Sat, 22 Aug 2020 15:36:18 +0700 Subject: [PATCH 1/2] Update dependencies --- .vscode/settings.json | 3 + package.json | 12 +- pnpm-lock.yaml | 218 ++++++++++++++++++----------------- spec/all-indexes-equal.ts | 3 +- spec/all-indexes-subset.ts | 3 +- spec/all-indexes-superset.ts | 3 +- spec/append.ts | 3 +- spec/compare-length.ts | 3 +- spec/concat-multiple.ts | 3 +- spec/concat.ts | 3 +- spec/drop.ts | 3 +- spec/fill-tuple.ts | 3 +- spec/filter.ts | 3 +- spec/first-index-equal.ts | 3 +- spec/first-index-subset.ts | 3 +- spec/first-index-superset.ts | 3 +- spec/first.ts | 3 +- spec/is-finite.ts | 3 +- spec/last-index-equal.ts | 3 +- spec/last-index-subset.ts | 3 +- spec/last-index-superset.ts | 3 +- spec/last.ts | 3 +- spec/longest-tuple.ts | 3 +- spec/prepend.ts | 3 +- spec/repeat.ts | 3 +- spec/reverse.ts | 3 +- spec/shortest-tuple.ts | 3 +- spec/single-tuple-set.ts | 3 +- spec/slice-start-quantity.ts | 3 +- spec/sort-two-tuple.ts | 3 +- spec/split-infinite-tuple.ts | 3 +- spec/tail.ts | 3 +- 32 files changed, 149 insertions(+), 171 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3662b37 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib" +} \ No newline at end of file diff --git a/package.json b/package.json index 8edad65..a89adb0 100644 --- a/package.json +++ b/package.json @@ -32,11 +32,11 @@ "typescript-compare": "^0.0.2" }, "devDependencies": { - "typescript": "~3.1.1", - "tslint": "^6.0.0", - "tslint-config-standard": "^8.0.1", - "static-type-assert": "^3.0.0", - "toolcheck": "^0.0.5", - "clean-typescript-build": "^0.1.0" + "typescript": "^4.0.2", + "tslint": "^6.1.3", + "tslint-config-standard": "^9.0.0", + "static-type-assert": "^4.0.0", + "toolcheck": "^0.1.4", + "clean-typescript-build": "^0.1.5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2922d62..80ffd6e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2,11 +2,11 @@ dependencies: typescript-compare: 0.0.2 devDependencies: clean-typescript-build: 0.1.5 - static-type-assert: 3.0.1_typescript@3.1.6 - toolcheck: 0.0.5 - tslint: 6.1.0_typescript@3.1.6 - tslint-config-standard: 8.0.1_tslint@6.1.0+typescript@3.1.6 - typescript: 3.1.6 + static-type-assert: 4.0.0_typescript@4.0.2 + toolcheck: 0.1.4 + tslint: 6.1.3_typescript@4.0.2 + tslint-config-standard: 9.0.0_tslint@6.1.3+typescript@4.0.2 + typescript: 4.0.2 lockfileVersion: 5.1 packages: /@babel/code-frame/7.8.3: @@ -26,7 +26,7 @@ packages: /@tsfun/array/0.0.0: dependencies: '@types/node': 13.9.1 - tslib: 1.11.1 + tslib: 1.13.0 dev: true resolution: integrity: sha512-y18KD65Ba1a7jXJ8PBIGjfkCtR32wd0XOPaV5D8z9uBiNE+pIF0PCnHKVHZ4+GcaRa/Y7HkTWJxmcjs283ggmw== @@ -46,18 +46,18 @@ packages: dev: true resolution: integrity: sha512-UoOfVEzAUpeSPmjm7h1uk5MH6KZma2z2O7a75onTGjnNvAvMVrPzPL/vBbT65iIGHWj6rokwfmYcmxmlSf2uwg== - /@types/node/10.17.17: + /@types/node/12.12.54: dev: true resolution: - integrity: sha512-gpNnRnZP3VWzzj5k3qrpRC6Rk3H/uclhAVo1aIvwzK5p5cOrs9yEyQ8H/HBsBY0u5rrWxXEiVPQ0dEB6pkjE8Q== + integrity: sha512-ge4xZ3vSBornVYlDnk7yZ0gK6ChHf/CHB7Gl1I0Jhah8DDnEQqBzgohYG4FX4p81TNirSETOiSyn+y1r9/IR6w== /@types/node/13.9.1: dev: true resolution: integrity: sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ== - /@types/which/1.3.2: + /@types/parse-json/4.0.0: dev: true resolution: - integrity: sha512-8oDqyLC7eD4HM307boe2QWKyuzdzWBj56xI/imSl2cpL+U3tCMaTAkMJ4ee5JBZ/FsOJlvRGeIShiZDAl1qERA== + integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== /@types/yargs-parser/15.0.0: dev: true resolution: @@ -114,28 +114,12 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= - /caller-callsite/2.0.0: - dependencies: - callsites: 2.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= - /caller-path/2.0.0: - dependencies: - caller-callsite: 2.0.0 + /callsites/3.1.0: dev: true engines: - node: '>=4' - resolution: - integrity: sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= - /callsites/2.0.0: - dev: true - engines: - node: '>=4' + node: '>=6' resolution: - integrity: sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== /camelcase/5.3.1: dev: true engines: @@ -206,17 +190,18 @@ packages: dev: true resolution: integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - /cosmiconfig/5.2.1: + /cosmiconfig/6.0.0: dependencies: - import-fresh: 2.0.0 - is-directory: 0.3.1 - js-yaml: 3.13.1 - parse-json: 4.0.0 + '@types/parse-json': 4.0.0 + import-fresh: 3.2.1 + parse-json: 5.0.1 + path-type: 4.0.0 + yaml: 1.10.0 dev: true engines: - node: '>=4' + node: '>=8' resolution: - integrity: sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== + integrity: sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== /decamelize/1.2.0: dev: true engines: @@ -299,7 +284,7 @@ packages: '@types/node': 13.9.1 fs-extra: 8.1.0 monorepo-shared-assets: 0.0.19 - tslib: 1.11.1 + tslib: 1.13.0 dev: true engines: node: '>= 8.9.0' @@ -340,15 +325,15 @@ packages: dev: true resolution: integrity: sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A== - /import-fresh/2.0.0: + /import-fresh/3.2.1: dependencies: - caller-path: 2.0.0 - resolve-from: 3.0.0 + parent-module: 1.0.1 + resolve-from: 4.0.0 dev: true engines: - node: '>=4' + node: '>=6' resolution: - integrity: sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + integrity: sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== /inflight/1.0.6: dependencies: once: 1.4.0 @@ -364,12 +349,6 @@ packages: dev: true resolution: integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - /is-directory/0.3.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= /is-fullwidth-code-point/3.0.0: dev: true engines: @@ -380,10 +359,6 @@ packages: dev: true resolution: integrity: sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - /isexe/2.0.0: - dev: true - resolution: - integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= /js-tokens/4.0.0: dev: true resolution: @@ -406,6 +381,10 @@ packages: graceful-fs: 4.2.3 resolution: integrity: sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + /lines-and-columns/1.1.6: + dev: true + resolution: + integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= /locate-path/5.0.0: dependencies: p-locate: 4.1.0 @@ -414,29 +393,36 @@ packages: node: '>=8' resolution: integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + /lookpath/1.1.0: + dev: true + engines: + npm: '>=6.13.4' + hasBin: true + resolution: + integrity: sha512-B9NM7XpVfkyWqfOBI/UW0kVhGw7pJztsduch+1wkbYDi90mYK6/InFul3lG0hYko/VEcVMARVBJ5daFRc5aKCw== /minimatch/3.0.4: dependencies: brace-expansion: 1.1.11 dev: true resolution: integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - /minimist/0.0.8: + /minimist/1.2.5: dev: true resolution: - integrity: sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - /mkdirp/0.5.1: + integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + /mkdirp/0.5.5: dependencies: - minimist: 0.0.8 + minimist: 1.2.5 dev: true hasBin: true resolution: - integrity: sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== /monorepo-shared-assets/0.0.19: dependencies: '@tsfun/array': 0.0.0 '@types/node': 13.9.1 immutable: 4.0.0-rc.12 - tslib: 1.11.1 + tslib: 1.13.0 dev: true engines: node: '>= 8.9.0' @@ -470,15 +456,25 @@ packages: node: '>=6' resolution: integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - /parse-json/4.0.0: + /parent-module/1.0.1: + dependencies: + callsites: 3.1.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + /parse-json/5.0.1: dependencies: + '@babel/code-frame': 7.8.3 error-ex: 1.3.2 json-parse-better-errors: 1.0.2 + lines-and-columns: 1.1.6 dev: true engines: - node: '>=4' + node: '>=8' resolution: - integrity: sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + integrity: sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ== /path-exists/4.0.0: dev: true engines: @@ -495,6 +491,12 @@ packages: dev: true resolution: integrity: sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + /path-type/4.0.0: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== /require-directory/2.1.1: dev: true engines: @@ -505,12 +507,12 @@ packages: dev: true resolution: integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - /resolve-from/3.0.0: + /resolve-from/4.0.0: dev: true engines: node: '>=4' resolution: - integrity: sha1-six699nWiBvItuZTM17rywoYh0g= + integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== /resolve/1.15.1: dependencies: path-parse: 1.0.6 @@ -530,15 +532,15 @@ packages: dev: true resolution: integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - /static-type-assert/3.0.1_typescript@3.1.6: + /static-type-assert/4.0.0_typescript@4.0.2: dependencies: - typescript: 3.1.6 + typescript: 4.0.2 typescript-compare: 0.0.2 dev: true peerDependencies: typescript: ^3.0.3 resolution: - integrity: sha512-zMKAbDEqRbysJdAmO6fcylkbTa1GQ285xZZvTxbjxNficxF+zVdkwsozJqbVntKds0oZ40kLFkPYTi2JO3zOBA== + integrity: sha512-Ss1RVV8Hp+DVaAQsGgssl2+xuLqyJQOJzrz/6GJG8wfObU7t8tFbQddquX+U//pwU1tSLghUgTQ4JQPaOxfsww== /string-width/4.2.0: dependencies: emoji-regex: 8.0.0 @@ -565,49 +567,52 @@ packages: node: '>=4' resolution: integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - /toolcheck/0.0.5: + /toolcheck/0.1.4: dependencies: '@types/cosmiconfig': 5.0.3 - '@types/node': 10.17.17 - '@types/which': 1.3.2 - cosmiconfig: 5.2.1 - which: 1.3.1 + '@types/node': 12.12.54 + cosmiconfig: 6.0.0 + lookpath: 1.1.0 dev: true hasBin: true requiresBuild: true resolution: - integrity: sha512-1fM5D26PNRLIrrZ1xOTXeNfnoxK8Z+FYxL8Jt//lkInV84HgNdVPr1QjetbsU48QaFKwiQZXiCbatQgF+qeTog== + integrity: sha512-MAZ8TOCRkz2KIWB1UKVj+eETc/emDV/8eXK1P5/UHA5L7LjLhdmEwy2RM0S2P2OzILLfF1exeOzy0eaLmxVJBA== /tslib/1.11.1: dev: true resolution: integrity: sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== + /tslib/1.13.0: + dev: true + resolution: + integrity: sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== /tslib/1.9.0: dev: true resolution: integrity: sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ== - /tslint-config-standard/8.0.1_tslint@6.1.0+typescript@3.1.6: + /tslint-config-standard/9.0.0_tslint@6.1.3+typescript@4.0.2: dependencies: - tslint-eslint-rules: 5.4.0_tslint@6.1.0+typescript@3.1.6 + tslint-eslint-rules: 5.4.0_tslint@6.1.3+typescript@4.0.2 dev: true peerDependencies: tslint: '*' typescript: '*' resolution: - integrity: sha512-OWG+NblgjQlVuUS/Dmq3ax2v5QDZwRx4L0kEuDi7qFY9UI6RJhhNfoCV1qI4el8Fw1c5a5BTrjQJP0/jhGXY/Q== - /tslint-eslint-rules/5.4.0_tslint@6.1.0+typescript@3.1.6: + integrity: sha512-CAw9J743RnPMemQV/XQ4YyNreC+A1NItACfkm+cBedrOkz6CQfwlnbKn8anUXBfoa4Zo4tjAhblRbsMNcSLfSw== + /tslint-eslint-rules/5.4.0_tslint@6.1.3+typescript@4.0.2: dependencies: doctrine: 0.7.2 tslib: 1.9.0 - tslint: 6.1.0_typescript@3.1.6 - tsutils: 3.17.1_typescript@3.1.6 - typescript: 3.1.6 + tslint: 6.1.3_typescript@4.0.2 + tsutils: 3.17.1_typescript@4.0.2 + typescript: 4.0.2 dev: true peerDependencies: tslint: ^5.0.0 typescript: ^2.2.0 || ^3.0.0 resolution: integrity: sha512-WlSXE+J2vY/VPgIcqQuijMQiel+UtmXS+4nvK4ZzlDiqBfXse8FAvkNnTcYhnQyOTW5KFM+uRRGXxYhFpuBc6w== - /tslint/6.1.0_typescript@3.1.6: + /tslint/6.1.3_typescript@4.0.2: dependencies: '@babel/code-frame': 7.8.3 builtin-modules: 1.1.1 @@ -617,33 +622,33 @@ packages: glob: 7.1.6 js-yaml: 3.13.1 minimatch: 3.0.4 - mkdirp: 0.5.1 + mkdirp: 0.5.5 resolve: 1.15.1 semver: 5.7.1 - tslib: 1.11.1 - tsutils: 2.29.0_typescript@3.1.6 - typescript: 3.1.6 + tslib: 1.13.0 + tsutils: 2.29.0_typescript@4.0.2 + typescript: 4.0.2 dev: true engines: node: '>=4.8.0' hasBin: true peerDependencies: - typescript: '>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev' + typescript: '>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev' resolution: - integrity: sha512-fXjYd/61vU6da04E505OZQGb2VCN2Mq3doeWcOIryuG+eqdmFUXTYVwdhnbEu2k46LNLgUYt9bI5icQze/j0bQ== - /tsutils/2.29.0_typescript@3.1.6: + integrity: sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg== + /tsutils/2.29.0_typescript@4.0.2: dependencies: - tslib: 1.11.1 - typescript: 3.1.6 + tslib: 1.13.0 + typescript: 4.0.2 dev: true peerDependencies: typescript: '>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev' resolution: integrity: sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== - /tsutils/3.17.1_typescript@3.1.6: + /tsutils/3.17.1_typescript@4.0.2: dependencies: - tslib: 1.11.1 - typescript: 3.1.6 + tslib: 1.13.0 + typescript: 4.0.2 dev: true engines: node: '>= 6' @@ -659,13 +664,13 @@ packages: /typescript-logic/0.0.0: resolution: integrity: sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q== - /typescript/3.1.6: + /typescript/4.0.2: dev: true engines: node: '>=4.2.0' hasBin: true resolution: - integrity: sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA== + integrity: sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ== /universalify/0.1.2: dev: true engines: @@ -676,13 +681,6 @@ packages: dev: true resolution: integrity: sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - /which/1.3.1: - dependencies: - isexe: 2.0.0 - dev: true - hasBin: true - resolution: - integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== /wrap-ansi/6.2.0: dependencies: ansi-styles: 4.2.1 @@ -701,6 +699,12 @@ packages: dev: true resolution: integrity: sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + /yaml/1.10.0: + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== /yargs-parser/18.1.0: dependencies: camelcase: 5.3.1 @@ -729,10 +733,10 @@ packages: resolution: integrity: sha512-g/QCnmjgOl1YJjGsnUg2SatC7NUYEiLXJqxNOQU9qSpjzGtGXda9b+OKccr1kLTy8BN9yqEyqfq5lxlwdc13TA== specifiers: - clean-typescript-build: ^0.1.0 - static-type-assert: ^3.0.0 - toolcheck: ^0.0.5 - tslint: ^6.0.0 - tslint-config-standard: ^8.0.1 - typescript: ~3.1.1 + clean-typescript-build: ^0.1.5 + static-type-assert: ^4.0.0 + toolcheck: ^0.1.4 + tslint: ^6.1.3 + tslint-config-standard: ^9.0.0 + typescript: ^4.0.2 typescript-compare: ^0.0.2 diff --git a/spec/all-indexes-equal.ts b/spec/all-indexes-equal.ts index 5703691..25ad402 100644 --- a/spec/all-indexes-equal.ts +++ b/spec/all-indexes-equal.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { AllIndexesEqual } from '..' compare< diff --git a/spec/all-indexes-subset.ts b/spec/all-indexes-subset.ts index 8259c8b..8bab758 100644 --- a/spec/all-indexes-subset.ts +++ b/spec/all-indexes-subset.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { AllIndexesSubset } from '..' compare< diff --git a/spec/all-indexes-superset.ts b/spec/all-indexes-superset.ts index 32ced84..a14c026 100644 --- a/spec/all-indexes-superset.ts +++ b/spec/all-indexes-superset.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { AllIndexesSuperset } from '..' compare< diff --git a/spec/append.ts b/spec/append.ts index 7224563..25dd70a 100644 --- a/spec/append.ts +++ b/spec/append.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { Append } from '..' compare, ['new']>('equal') diff --git a/spec/compare-length.ts b/spec/compare-length.ts index e04497c..65101f4 100644 --- a/spec/compare-length.ts +++ b/spec/compare-length.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { CompareLength } from '..' compare, 'equal'>('equal') diff --git a/spec/concat-multiple.ts b/spec/concat-multiple.ts index 13c3bc9..2114db5 100644 --- a/spec/concat-multiple.ts +++ b/spec/concat-multiple.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { ConcatMultiple } from '..' compare, []>('equal') diff --git a/spec/concat.ts b/spec/concat.ts index 9a4d8a2..a782fa9 100644 --- a/spec/concat.ts +++ b/spec/concat.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { Concat } from '..' compare, []>('equal') diff --git a/spec/drop.ts b/spec/drop.ts index 8d00ae6..eb5973c 100644 --- a/spec/drop.ts +++ b/spec/drop.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { Drop } from '..' compare< diff --git a/spec/fill-tuple.ts b/spec/fill-tuple.ts index 4ddbdb6..0107ce0 100644 --- a/spec/fill-tuple.ts +++ b/spec/fill-tuple.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { FillTuple } from '..' compare, []>('equal') diff --git a/spec/filter.ts b/spec/filter.ts index 6fa9772..d45a5df 100644 --- a/spec/filter.ts +++ b/spec/filter.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { FilterTuple } from '..' compare, [1]>('equal') diff --git a/spec/first-index-equal.ts b/spec/first-index-equal.ts index c0c2f09..d72a4c0 100644 --- a/spec/first-index-equal.ts +++ b/spec/first-index-equal.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { FirstIndexEqual } from '..' compare< diff --git a/spec/first-index-subset.ts b/spec/first-index-subset.ts index 21d5d59..2d8d33e 100644 --- a/spec/first-index-subset.ts +++ b/spec/first-index-subset.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { FirstIndexSubset } from '..' compare< diff --git a/spec/first-index-superset.ts b/spec/first-index-superset.ts index 3d6ef11..f2acafb 100644 --- a/spec/first-index-superset.ts +++ b/spec/first-index-superset.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { FirstIndexSuperset } from '..' compare< diff --git a/spec/first.ts b/spec/first.ts index 7c2efe6..1f68df3 100644 --- a/spec/first.ts +++ b/spec/first.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { First } from '..' compare, 'sole'>('equal') diff --git a/spec/is-finite.ts b/spec/is-finite.ts index 02d3b10..70238ce 100644 --- a/spec/is-finite.ts +++ b/spec/is-finite.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { IsFinite } from '..' compare, true>('equal') diff --git a/spec/last-index-equal.ts b/spec/last-index-equal.ts index 533f75e..e66b954 100644 --- a/spec/last-index-equal.ts +++ b/spec/last-index-equal.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { LastIndexEqual } from '..' compare< diff --git a/spec/last-index-subset.ts b/spec/last-index-subset.ts index af08bb5..03e841d 100644 --- a/spec/last-index-subset.ts +++ b/spec/last-index-subset.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { LastIndexSubset } from '..' compare< diff --git a/spec/last-index-superset.ts b/spec/last-index-superset.ts index e4cb6b2..af4f0d7 100644 --- a/spec/last-index-superset.ts +++ b/spec/last-index-superset.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { LastIndexSuperset } from '..' compare< diff --git a/spec/last.ts b/spec/last.ts index c41b343..558ba71 100644 --- a/spec/last.ts +++ b/spec/last.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { Last } from '..' compare, 'last'>('equal') diff --git a/spec/longest-tuple.ts b/spec/longest-tuple.ts index b0bffca..06385b1 100644 --- a/spec/longest-tuple.ts +++ b/spec/longest-tuple.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { LongestTuple } from '..' compare, [0, 1, 2, 3]>('equal') diff --git a/spec/prepend.ts b/spec/prepend.ts index 1396216..9d24340 100644 --- a/spec/prepend.ts +++ b/spec/prepend.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { Prepend } from '..' compare, ['new']>('equal') diff --git a/spec/repeat.ts b/spec/repeat.ts index 441fd9a..82a7f63 100644 --- a/spec/repeat.ts +++ b/spec/repeat.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { Repeat } from '..' compare, []>('equal') diff --git a/spec/reverse.ts b/spec/reverse.ts index 7a1a167..a1ebb29 100644 --- a/spec/reverse.ts +++ b/spec/reverse.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { Reverse } from '..' compare, []>('equal') diff --git a/spec/shortest-tuple.ts b/spec/shortest-tuple.ts index 5b36ea5..10003c5 100644 --- a/spec/shortest-tuple.ts +++ b/spec/shortest-tuple.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { ShortestTuple } from '..' compare, [0, 1, 2, 3]>('equal') diff --git a/spec/single-tuple-set.ts b/spec/single-tuple-set.ts index 0eb354b..fd7fb89 100644 --- a/spec/single-tuple-set.ts +++ b/spec/single-tuple-set.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { SingleTupleSet } from '..' compare, []>('equal') diff --git a/spec/slice-start-quantity.ts b/spec/slice-start-quantity.ts index e4d4853..e81a433 100644 --- a/spec/slice-start-quantity.ts +++ b/spec/slice-start-quantity.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { SliceStartQuantity } from '..' compare< diff --git a/spec/sort-two-tuple.ts b/spec/sort-two-tuple.ts index 5ba1703..d07282e 100644 --- a/spec/sort-two-tuple.ts +++ b/spec/sort-two-tuple.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { SortTwoTuple } from '..' compare, [['a', 'b'], [0, 1, 2, 3]]>('equal') diff --git a/spec/split-infinite-tuple.ts b/spec/split-infinite-tuple.ts index 757802e..98847bd 100644 --- a/spec/split-infinite-tuple.ts +++ b/spec/split-infinite-tuple.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { SplitInfiniteTuple } from '..' compare, [[], 'x'[]]>('equal') diff --git a/spec/tail.ts b/spec/tail.ts index d523332..172a9a3 100644 --- a/spec/tail.ts +++ b/spec/tail.ts @@ -1,5 +1,4 @@ -import assert from 'static-type-assert' -import compare = assert.compare +import { compare } from 'static-type-assert' import { Tail } from '..' compare, [1, 2, 3]>('equal') From 3c82097e9e12bec2ba6d3c497732bb79a1eb5262 Mon Sep 17 00:00:00 2001 From: khai96_ Date: Sat, 22 Aug 2020 15:49:11 +0700 Subject: [PATCH 2/2] Use TypeScript 4's variadic tuple types --- lib/utils.ts | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/lib/utils.ts b/lib/utils.ts index 26de094..0b8af26 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -266,8 +266,7 @@ export type _AllIndexesSuperset< Tuple extends [] ? 'empty' : IsFinite ] -export type Prepend = - ((_: Addend, ..._1: Tuple) => any) extends ((..._: infer Result) => any) ? Result : never +export type Prepend = [Addend, ...Tuple] export type Reverse = { empty: Prefix, @@ -284,23 +283,7 @@ export type Reverse = { : 'empty' ] -export type Concat = { - emptyLeft: Right - singleLeft: Left extends [infer SoleElement] - ? Prepend - : never - multiLeft: ((..._: Reverse) => any) extends ((_: infer LeftLast, ..._1: infer ReversedLeftRest) => any) - ? Concat, Prepend> - : never - infiniteLeft: { - ERROR: 'Left is not finite', - CODENAME: 'InfiniteLeft' & 'Infinite' - } -}[ - Left extends [] ? 'emptyLeft' : - Left extends [any] ? 'singleLeft' : - IsFinite -] +export type Concat = [...Left, ...Right] export type Repeat = Count extends never ? never :