diff --git a/jsconfig.json b/jsconfig.json index 8a0a3cf..612700f 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -6,9 +6,10 @@ "lib": ["ESNext", "DOM"], "moduleResolution": "nodenext", "resolveJsonModule": false, - "esModuleInterop": false, + "esModuleInterop": true, "checkJs": true, "skipLibCheck": false, + "skipDefaultLibCheck": false, "allowJs": true, "traceResolution": false, "allowSyntheticDefaultImports": true @@ -22,5 +23,12 @@ "StringLiteralList.js", "stringListFunction.js" ], - "exclude": ["node_modules", "*.cjs", "**/*.cjs", "*.min.js", "**/*.min.js"] + "exclude": [ + "node_modules/punycode/punycode.js", + "node_modules", + "*.cjs", + "**/*.cjs", + "*.min.js", + "**/*.min.js" + ] } diff --git a/jsconfig.tsbuildinfo b/jsconfig.tsbuildinfo new file mode 100644 index 0000000..7709f51 --- /dev/null +++ b/jsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.es2021.d.ts","./node_modules/typescript/lib/lib.es2022.d.ts","./node_modules/typescript/lib/lib.es2023.d.ts","./node_modules/typescript/lib/lib.esnext.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2016.intl.d.ts","./node_modules/typescript/lib/lib.es2017.date.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.es2021.promise.d.ts","./node_modules/typescript/lib/lib.es2021.string.d.ts","./node_modules/typescript/lib/lib.es2021.weakref.d.ts","./node_modules/typescript/lib/lib.es2021.intl.d.ts","./node_modules/typescript/lib/lib.es2022.array.d.ts","./node_modules/typescript/lib/lib.es2022.error.d.ts","./node_modules/typescript/lib/lib.es2022.intl.d.ts","./node_modules/typescript/lib/lib.es2022.object.d.ts","./node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2022.string.d.ts","./node_modules/typescript/lib/lib.es2022.regexp.d.ts","./node_modules/typescript/lib/lib.es2023.array.d.ts","./node_modules/typescript/lib/lib.es2023.collection.d.ts","./node_modules/typescript/lib/lib.es2023.intl.d.ts","./node_modules/typescript/lib/lib.esnext.array.d.ts","./node_modules/typescript/lib/lib.esnext.collection.d.ts","./node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/typescript/lib/lib.esnext.disposable.d.ts","./node_modules/typescript/lib/lib.esnext.string.d.ts","./node_modules/typescript/lib/lib.esnext.promise.d.ts","./node_modules/typescript/lib/lib.esnext.decorators.d.ts","./node_modules/typescript/lib/lib.esnext.object.d.ts","./node_modules/typescript/lib/lib.esnext.regexp.d.ts","./node_modules/typescript/lib/lib.decorators.d.ts","./node_modules/typescript/lib/lib.decorators.legacy.d.ts","./types/generic.d.ts","./types/string.d.ts","./types/tuple.d.ts","./types/record.d.ts","./types/list.d.ts","./types/index.d.ts","./stringliterallist.d.ts","./strict.d.ts","./stringlist.d.ts","./stringlistfunction.d.ts","./types.test.ts","./strict.js","./stringlist.js","./stringliterallist.js","./stringlistfunction.js","./node_modules/@types/istanbul-lib-coverage/index.d.ts","./node_modules/@types/json5/index.d.ts","./node_modules/@types/node/assert.d.ts","./node_modules/@types/node/assert/strict.d.ts","./node_modules/undici-types/header.d.ts","./node_modules/undici-types/readable.d.ts","./node_modules/undici-types/file.d.ts","./node_modules/undici-types/fetch.d.ts","./node_modules/undici-types/formdata.d.ts","./node_modules/undici-types/connector.d.ts","./node_modules/undici-types/client.d.ts","./node_modules/undici-types/errors.d.ts","./node_modules/undici-types/dispatcher.d.ts","./node_modules/undici-types/global-dispatcher.d.ts","./node_modules/undici-types/global-origin.d.ts","./node_modules/undici-types/pool-stats.d.ts","./node_modules/undici-types/pool.d.ts","./node_modules/undici-types/handlers.d.ts","./node_modules/undici-types/balanced-pool.d.ts","./node_modules/undici-types/agent.d.ts","./node_modules/undici-types/mock-interceptor.d.ts","./node_modules/undici-types/mock-agent.d.ts","./node_modules/undici-types/mock-client.d.ts","./node_modules/undici-types/mock-pool.d.ts","./node_modules/undici-types/mock-errors.d.ts","./node_modules/undici-types/proxy-agent.d.ts","./node_modules/undici-types/api.d.ts","./node_modules/undici-types/cookies.d.ts","./node_modules/undici-types/patch.d.ts","./node_modules/undici-types/filereader.d.ts","./node_modules/undici-types/diagnostics-channel.d.ts","./node_modules/undici-types/websocket.d.ts","./node_modules/undici-types/content-type.d.ts","./node_modules/undici-types/cache.d.ts","./node_modules/undici-types/interceptors.d.ts","./node_modules/undici-types/index.d.ts","./node_modules/@types/node/globals.d.ts","./node_modules/@types/node/async_hooks.d.ts","./node_modules/@types/node/buffer.d.ts","./node_modules/@types/node/child_process.d.ts","./node_modules/@types/node/cluster.d.ts","./node_modules/@types/node/console.d.ts","./node_modules/@types/node/constants.d.ts","./node_modules/@types/node/crypto.d.ts","./node_modules/@types/node/dgram.d.ts","./node_modules/@types/node/diagnostics_channel.d.ts","./node_modules/@types/node/dns.d.ts","./node_modules/@types/node/dns/promises.d.ts","./node_modules/@types/node/domain.d.ts","./node_modules/@types/node/dom-events.d.ts","./node_modules/@types/node/events.d.ts","./node_modules/@types/node/fs.d.ts","./node_modules/@types/node/fs/promises.d.ts","./node_modules/@types/node/http.d.ts","./node_modules/@types/node/http2.d.ts","./node_modules/@types/node/https.d.ts","./node_modules/@types/node/inspector.d.ts","./node_modules/@types/node/module.d.ts","./node_modules/@types/node/net.d.ts","./node_modules/@types/node/os.d.ts","./node_modules/@types/node/path.d.ts","./node_modules/@types/node/perf_hooks.d.ts","./node_modules/@types/node/process.d.ts","./node_modules/@types/node/punycode.d.ts","./node_modules/@types/node/querystring.d.ts","./node_modules/@types/node/readline.d.ts","./node_modules/@types/node/readline/promises.d.ts","./node_modules/@types/node/repl.d.ts","./node_modules/@types/node/stream.d.ts","./node_modules/@types/node/stream/promises.d.ts","./node_modules/@types/node/stream/consumers.d.ts","./node_modules/@types/node/stream/web.d.ts","./node_modules/@types/node/string_decoder.d.ts","./node_modules/@types/node/test.d.ts","./node_modules/@types/node/timers.d.ts","./node_modules/@types/node/timers/promises.d.ts","./node_modules/@types/node/tls.d.ts","./node_modules/@types/node/trace_events.d.ts","./node_modules/@types/node/tty.d.ts","./node_modules/@types/node/url.d.ts","./node_modules/@types/node/util.d.ts","./node_modules/@types/node/v8.d.ts","./node_modules/@types/node/vm.d.ts","./node_modules/@types/node/wasi.d.ts","./node_modules/@types/node/worker_threads.d.ts","./node_modules/@types/node/zlib.d.ts","./node_modules/@types/node/globals.global.d.ts","./node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5","impliedFormat":1},{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d540251809289a05349b70ab5f4b7b99f922af66ab3c39ba56a475dcf95d5ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"4f838e956c7900799f842b2e55473df4ee4a4685ca06a8d71795bc56fc74b376","affectsGlobalScope":true,"impliedFormat":99},{"version":"9ae963ed2c14eda641e7b967b60a99caa6f2523405047957647e92e238b6c10f","affectsGlobalScope":true,"impliedFormat":99},{"version":"589d016747565d2222c7b793028adbce8270b2cdc489a5bb6c61d9161fd32e87","affectsGlobalScope":true,"impliedFormat":99},{"version":"50ed899e87899e343502a5182bbddfaf07c382506536b874f18a898030a08cd1","affectsGlobalScope":true,"impliedFormat":99},{"version":"d5ec8490fb47c939bc70b01edf4aafd794230af8ed44e42e95bee6a7e5eae813","affectsGlobalScope":true,"impliedFormat":99},{"version":"f08bdfe38959c7084f1b5da189788fc7f4ec7a3029fd00f179bfa1012eff5932","affectsGlobalScope":true,"impliedFormat":99},{"version":"3353f3a39e171912e7726e84407bde3ef7faecc1c19170157d391a9b3acfdee9","impliedFormat":99},{"version":"f61920826c1eeadd523aad864d6afdbaf6ea3e4b6b137e46690d25580d71f8e4","impliedFormat":99},{"version":"7753aee722c636c8cc1cf346944f4a84cefadc710535800a669b388c1f659714","impliedFormat":99},{"version":"5da7d6b8f5ce58d40972f5c5891b1607a0851b5e4d1e8facfc8f68a0f26fb613","impliedFormat":99},{"version":"367b7268529057918ee49266bbbca81e4ba159af7993d202b9bcd3f48491916b","signature":"f8f33fd5e032dc8462ccb641fade3d866bded367284c6b7981acbec9735454d7","impliedFormat":99},{"version":"8186faf846370f28fcae6c00658e35615d0758a4c2610fd5380e0172a8fe7771","signature":"c120a78c333ced3e270797e59941f5c23942d147cb46959180a92625162648ee","impliedFormat":99},{"version":"b009b82d69b4e0522f7ba2f28c695866da92a4efc4be2a54ffe7dc5778df97a8","signature":"d9e7950a50f2deed29209bc127c4003191d6c9d41ad2b61d49e24329b365d406","impliedFormat":99},{"version":"c1904bfc8f05f53fc52abbc2849510e994c2c483fd5f9ae16ea595fa02627add","signature":"0b76535d27429cdabbcc51d9c5e231348239bbf0ac5c071c59408d60894150e1","impliedFormat":99},{"version":"9b0e23f252f18cf281adaa99253e67aeef8c649a588da977131cf76b00880228","signature":"23aa484fe52d60cc28b300fd7e34c6faed4584a8174e7fe19537ef39ed3b52d6","impliedFormat":99},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","impliedFormat":1},{"version":"efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","impliedFormat":1},{"version":"3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","impliedFormat":1},{"version":"e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","impliedFormat":1},{"version":"471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","impliedFormat":1},{"version":"c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","impliedFormat":1},{"version":"40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","impliedFormat":1},{"version":"8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","impliedFormat":1},{"version":"4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1","impliedFormat":1},{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true,"impliedFormat":1},{"version":"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c","impliedFormat":1},{"version":"7fd7fcbf021a5845bdd9397d4649fcf2fe17152d2098140fc723099a215d19ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df3389f71a71a38bc931aaf1ef97a65fada98f0a27f19dd12f8b8de2b0f4e461","impliedFormat":1},{"version":"7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba","impliedFormat":1},{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"a1d2988ad9d2aef7b9915a22b5e52c165c83a878f2851c35621409046bbe3c05","affectsGlobalScope":true,"impliedFormat":1},{"version":"bd3f5d05b6b5e4bfcea7739a45f3ffb4a7f4a3442ba7baf93e0200799285b8f1","impliedFormat":1},{"version":"4c775c2fccabf49483c03cd5e3673f87c1ffb6079d98e7b81089c3def79e29c6","impliedFormat":1},{"version":"8806ae97308ef26363bd7ec8071bca4d07fb575f905ee3d8a91aff226df6d618","impliedFormat":1},{"version":"af5bf1db6f1804fb0069039ae77a05d60133c77a2158d9635ea27b6bb2828a8f","impliedFormat":1},{"version":"b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e","impliedFormat":1},{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"674168aa3db414ea0a19b2a31d901b2d49705c7a495e43ffdc96928543010f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"fe1fd6afdfe77976d4c702f3746c05fb05a7e566845c890e0e970fe9376d6a90","impliedFormat":1},{"version":"313a0b063f5188037db113509de1b934a0e286f14e9479af24fada241435e707","impliedFormat":1},{"version":"afb1701fd4be413a8a5a88df6befdd4510c30a31372c07a4138facf61594c66d","impliedFormat":1},{"version":"87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","impliedFormat":1},{"version":"396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","impliedFormat":1},{"version":"21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac","impliedFormat":1},{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true,"impliedFormat":1},{"version":"c07146dbbbd8b347241b5df250a51e48f2d7bef19b1e187b1a3f20c849988ff1","impliedFormat":1},{"version":"45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","impliedFormat":1},{"version":"0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7","impliedFormat":1},{"version":"ae5507fc333d637dec9f37c6b3f4d423105421ea2820a64818de55db85214d66","affectsGlobalScope":true,"impliedFormat":1},{"version":"0666f4c99b8688c7be5956df8fecf5d1779d3b22f8f2a88258ae7072c7b6026f","affectsGlobalScope":true,"impliedFormat":1},{"version":"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","impliedFormat":1},{"version":"54e854615c4eafbdd3fd7688bd02a3aafd0ccf0e87c98f79d3e9109f047ce6b8","impliedFormat":1},{"version":"d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","impliedFormat":1},{"version":"8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","impliedFormat":1},{"version":"01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","impliedFormat":1},{"version":"8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","impliedFormat":1},{"version":"269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"7424817d5eb498771e6d1808d726ec38f75d2eaf3fa359edd5c0c540c52725c1","impliedFormat":1},{"version":"9a9634296cca836c3308923ba7aa094fa6ed76bb1e366d8ddcf5c65888ab1024","impliedFormat":1},{"version":"bddce945d552a963c9733db106b17a25474eefcab7fc990157a2134ef55d4954","affectsGlobalScope":true,"impliedFormat":1},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true,"impliedFormat":1},{"version":"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","impliedFormat":1},{"version":"4b55240c2a03b2c71e98a7fc528b16136faa762211c92e781a01c37821915ea6","impliedFormat":1},{"version":"7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","impliedFormat":1},{"version":"7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df","impliedFormat":1},{"version":"94c086dff8dbc5998749326bc69b520e8e4273fb5b7b58b50e0210e0885dfcde","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebe5facd12fd7745cda5f4bc3319f91fb29dc1f96e57e9c6f8b260a7cc5b67ee","impliedFormat":1},{"version":"79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","impliedFormat":1},{"version":"37dc027f781c75f0f546e329cfac7cf92a6b289f42458f47a9adc25e516b6839","impliedFormat":1},{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","impliedFormat":1}],"root":[[73,87]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"esModuleInterop":true,"module":199,"rootDir":"./","skipDefaultLibCheck":false,"skipLibCheck":false,"target":99},"fileIdsList":[[90],[125],[126,131,159],[127,138,139,146,156,167],[127,128,138,146],[129,168],[130,131,139,147],[131,156,164],[132,134,138,146],[125,133],[134,135],[138],[136,138],[125,138],[138,139,140,156,167],[138,139,140,153,156,159],[123,126,172],[134,138,141,146,156,167],[138,139,141,142,146,156,164,167],[141,143,156,164,167],[90,91,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174],[138,144],[145,167,172],[134,138,146,156],[147],[148],[125,149],[150,166,172],[151],[152],[138,153,154],[153,155,168,170],[126,138,156,157,158,159],[126,156,158],[156,157],[159],[160],[125,156],[138,162,163],[162,163],[131,146,156,164],[165],[146,166],[126,141,152,167],[131,168],[156,169],[145,170],[171],[126,131,138,140,149,156,167,170,172],[156,173],[100,104,167],[100,156,167],[95],[97,100,164,167],[146,164],[175],[95,175],[97,100,146,167],[92,93,96,99,126,138,156,167],[92,98],[96,100,126,159,167,175],[126,175],[116,126,175],[94,95,175],[100],[94,95,96,97,98,99,100,101,102,104,105,106,107,108,109,110,111,112,113,114,115,117,118,119,120,121,122],[100,107,108],[98,100,108,109],[99],[92,95,100],[100,104,108,109],[104],[98,100,103,167],[92,97,98,100,104,107],[126,156],[95,100,116,126,172,175],[78,82],[77,78],[77,78,79],[78],[73,74,75,76,77,79],[73,74,75,76,78],[73,78],[73,74,78]],"referencedMap":[[90,1],[91,1],[125,2],[126,3],[127,4],[128,5],[129,6],[130,7],[131,8],[132,9],[133,10],[134,11],[135,11],[137,12],[136,13],[138,14],[139,15],[140,16],[124,17],[141,18],[142,19],[143,20],[175,21],[144,22],[145,23],[146,24],[147,25],[148,26],[149,27],[150,28],[151,29],[152,30],[153,31],[154,31],[155,32],[156,33],[158,34],[157,35],[159,36],[160,37],[161,38],[162,39],[163,40],[164,41],[165,42],[166,43],[167,44],[168,45],[169,46],[170,47],[171,48],[172,49],[173,50],[107,51],[114,52],[106,51],[121,53],[98,54],[97,55],[120,56],[115,57],[118,58],[100,59],[99,60],[95,61],[94,62],[117,63],[96,64],[101,65],[105,65],[123,66],[122,65],[109,67],[110,68],[112,69],[108,70],[111,71],[116,56],[103,72],[104,73],[113,74],[93,75],[119,76],[84,77],[85,77],[82,78],[87,79],[79,78],[73,80],[78,81],[77,82],[76,80],[74,83],[75,84]],"affectedFilesPendingEmit":[84,85,87,86,83],"emitSignatures":[83,84,85,86,87]},"version":"5.5.4"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8b421d4..febd90f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "husky": "latest", "prettier": "latest", "tap": "latest", - "typescript": "latest" + "typescript": "5.5.4" }, "engines": { "node": ">=18" @@ -6329,6 +6329,20 @@ "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1" } }, + "node_modules/tshy/node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", @@ -6447,10 +6461,11 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index f95d776..9e5ae11 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "scripts": { "test": "npm run lint:ci && npm run test:checkJs && npm run test:unit", "test:unit": "NODE_ENV=test tap run", - "test:checkJs": "tsc --checkJs --project ./jsconfig.json", + "test:checkJs": "./node_modules/.bin/tsc --checkJs --project jsconfig.json", "prettier": "prettier --write \"**/*.{js,ts}\"", "lint": "eslint --fix \"./*.js\"", "lint:ci": "eslint . --ext .js", @@ -72,6 +72,6 @@ "husky": "latest", "prettier": "latest", "tap": "latest", - "typescript": "latest" + "typescript": "5.5.4" } } diff --git a/types.test.ts b/types.test.ts index db1c13f..7aa03af 100644 --- a/types.test.ts +++ b/types.test.ts @@ -1,27 +1,7 @@ +// @ts-check /** * Describe: SubSet */ -let tupleFromUnion: StringLiteralList.tuple.UnionToTuple<'id' | 'name'>; -// @ts-expect-error -tupleFromUnion = ['name', 'id']; -// @ts-expect-no-error -tupleFromUnion = ['id', 'name']; -// @ts-expect-error -tupleFromUnion = ['id']; -// @ts-expect-error -tupleFromUnion = ['name']; -// @ts-expect-error -tupleFromUnion = 'id'; - -let tupleFromUnionJoined: StringLiteralList.tuple.Join< - StringLiteralList.tuple.UnionToTuple<'id' | 'name'> ->; -// @ts-expect-error -tupleFromUnionJoined = 'id name'; -// @ts-expect-no-error -tupleFromUnionJoined = 'idname'; -// @ts-expect-error -tupleFromUnionJoined = 'nameid'; let withoutSuffix: StringLiteralList.string.DropSuffix<'name.json', '.json'>; // @ts-expect-error @@ -219,3 +199,315 @@ tupleReversed = ['e', 'd', 'c', 'b']; tupleReversed = ['e', 'd', 'c', 'a']; // @ts-expect-error tupleReversed = []; + +// let tupleFromUnion: StringLiteralList.tuple.UnionToTuple<'id' | 'name'>; +// // @ts-expect-error +// tupleFromUnion = ['name', 'id']; +// // @ts-expect-no-error +// tupleFromUnion = ['id', 'name']; +// // @ts-expect-error +// tupleFromUnion = ['id']; +// // @ts-expect-error +// tupleFromUnion = ['name']; +// // @ts-expect-error +// tupleFromUnion = 'id'; + +// let tupleFromUnion1: StringLiteralList.tuple.UnionToTuple<'id'>; +// // @ts-expect-no-error +// tupleFromUnion1 = ['id']; + +// let tupleFromUnion3: StringLiteralList.tuple.UnionToTuple< +// 'id' | 'name' | 'age' +// >; +// // @ts-expect-no-error +// tupleFromUnion3 = ['id', 'name', 'age']; + +// let tupleFromUnion4: StringLiteralList.tuple.UnionToTuple< +// 'id' | 'name' | 'age' | 'height' +// >; +// // @ts-expect-no-error +// tupleFromUnion4 = ['id', 'name', 'age', 'height']; + +// let tupleFromUnion5: StringLiteralList.tuple.UnionToTuple< +// 'id' | 'name' | 'age' | 'height' | 'weight' +// >; +// // @ts-expect-no-error +// tupleFromUnion5 = ['id', 'name', 'age', 'height', 'weight']; + +// let tupleFromUnion6: StringLiteralList.tuple.UnionToTuple< +// 'id' | 'name' | 'age' | 'height' | 'weight' | 'sight' +// >; +// // @ts-expect-no-error +// tupleFromUnion6 = ['id', 'name', 'age', 'height', 'weight', 'sight']; +// // @ts-expect-error +// tupleFromUnion6 = ['id', 'name', 'height', 'age', 'weight', 'sight']; +// // @ts-expect-error +// tupleFromUnion6 = ['id', 'age', 'name', 'height', 'weight', 'sight']; + +// let longTupleUnion: StringLiteralList.tuple.UnionToTuple< +// | '1' +// | '2' +// | '3' +// | '4' +// | '5' +// | '6' +// | '7' +// | '8' +// | '9' +// | '10' +// | '11' +// | '12' +// | '13' +// | '14' +// | '15' +// | '16' +// | '17' +// | '18' +// | '19' +// | '20' +// | '21' +// | '22' +// | '23' +// | '24' +// | '25' +// | '26' +// | '27' +// | '28' +// | '29' +// | '30' +// | '31' +// | '32' +// | '33' +// | '34' +// | '35' +// | '36' +// | '37' +// | '38' +// | '39' +// | '40' +// | '41' +// | '42' +// | '43' +// | '44' +// | '45' +// | '46' +// | '47' +// | '48' +// | '49' +// | '50' +// | '51' +// | '52' +// | '53' +// | '54' +// | '55' +// | '56' +// | '57' +// | '58' +// | '59' +// | '60' +// | '61' +// | '62' +// | '63' +// | '64' +// | '65' +// | '66' +// | '67' +// | '68' +// | '69' +// | '70' +// | '71' +// | '72' +// | '73' +// | '74' +// | '75' +// | '76' +// | '77' +// | '78' +// | '79' +// | '80' +// | '81' +// | '82' +// | '83' +// | '84' +// | '85' +// | '86' +// | '87' +// | '88' +// | '89' +// | '90' +// | '91' +// | '92' +// | '93' +// | '94' +// | '95' +// | '96' +// | '97' +// | '98' +// | '99' +// | '100' +// | 'a' +// | 'b' +// | 'c' +// | 'd' +// | 'e' +// | 'f' +// | 'g' +// | 'h' +// | 'i' +// | 'j' +// | 'k' +// | 'l' +// | 'm' +// | 'n' +// | 'o' +// | 'p' +// | 'q' +// | 'r' +// | 's' +// | 't' +// | 'u' +// | 'v' +// | 'w' +// | 'x' +// | 'y' +// | 'z' +// >; +// // @ts-expect-no-error +// longTupleUnion = [ +// '1', +// '2', +// '3', +// '4', +// '5', +// '6', +// '7', +// '8', +// '9', +// '10', +// '11', +// '12', +// '13', +// '14', +// '15', +// '16', +// '17', +// '18', +// '19', +// '20', +// '21', +// '22', +// '23', +// '24', +// '25', +// '26', +// '27', +// '28', +// '29', +// '30', +// '31', +// '32', +// '33', +// '34', +// '35', +// '36', +// '37', +// '38', +// '39', +// '40', +// '41', +// '42', +// '43', +// '44', +// '45', +// '46', +// '47', +// '48', +// '49', +// '50', +// '51', +// '52', +// '53', +// '54', +// '55', +// '56', +// '57', +// '58', +// '59', +// '60', +// '61', +// '62', +// '63', +// '64', +// '65', +// '66', +// '67', +// '68', +// '69', +// '70', +// '71', +// '72', +// '73', +// '74', +// '75', +// '76', +// '77', +// '78', +// '79', +// '80', +// '81', +// '82', +// '83', +// '84', +// '85', +// '86', +// '87', +// '88', +// '89', +// '90', +// '91', +// '92', +// '93', +// '94', +// '95', +// '96', +// '97', +// '98', +// '99', +// '100', +// 'a', +// 'b', +// 'c', +// 'd', +// 'e', +// 'f', +// 'g', +// 'h', +// 'i', +// 'j', +// 'k', +// 'l', +// 'm', +// 'n', +// 'o', +// 'p', +// 'q', +// 'r', +// 's', +// 't', +// 'u', +// 'v', +// 'w', +// 'x', +// 'y', +// 'z', +// ]; + +// let tupleFromUnionJoined: StringLiteralList.tuple.Join< +// StringLiteralList.tuple.UnionToTuple<'id' | 'name'> +// >; +// // @ts-expect-error +// tupleFromUnionJoined = 'id name'; +// // @ts-expect-no-error +// tupleFromUnionJoined = 'idname'; +// // @ts-expect-error +// tupleFromUnionJoined = 'nameid'; diff --git a/types/list.d.ts b/types/list.d.ts index 9d9a76e..c3e883e 100644 --- a/types/list.d.ts +++ b/types/list.d.ts @@ -76,19 +76,6 @@ declare global { ? MaybeReadonly> : never; - withMapPrefix( - map: Map, - ): keyof Map extends Tuple[number] - ? { - [K in keyof Map]: `${Map[K]}${K}`; - }[keyof Map] extends infer W extends string - ? StringLiteralList.tuple.UnionToTuple extends infer W extends - readonly string[] - ? MaybeReadonly> - : never - : never - : never; - withSuffix

( suffix: P, ): P extends string @@ -101,18 +88,6 @@ declare global { : never : never; - withMapSuffix( - map: Map, - ): keyof Map extends Tuple[number] - ? { - [K in keyof Map]: `${K}${Map[K]}`; - }[keyof Map] extends infer W extends string - ? StringLiteralList.tuple.UnionToTuple extends infer W extends - readonly string[] - ? MaybeReadonly> - : never - : never - : never; // withDerivatedSuffix( // chars: S, // ): diff --git a/types/tuple.d.ts b/types/tuple.d.ts index 74d52a9..6b134a4 100644 --- a/types/tuple.d.ts +++ b/types/tuple.d.ts @@ -15,18 +15,76 @@ declare global { export type IsStringLiteralArray = string.IsStringLiteral extends true ? true : false; - /** + /* * Takes a union of strings and returns a tuple of them. - * @deprecated this doesn't infer the length and the position of the tuple. It will also drop duplicates. + * deprecated this doesn't infer the length and the position of the tuple. It will also drop duplicates. */ - export type UnionToTuple = - generic.UnionToIntersection< - T extends never ? never : T extends string ? (t: T) => T : never - > extends (_: never) => infer W - ? W extends string - ? readonly [...UnionToTuple>, W] - : never - : readonly []; + // export type UnionToTuple = + // generic.UnionToIntersection< + // T extends never ? never : T extends string ? (t: T) => T : never + // > extends (_: never) => infer W + // ? W extends string + // ? Exclude extends infer TW extends string + // ? generic.UnionToIntersection< + // TW extends never + // ? never + // : TW extends string + // ? (t: TW) => TW + // : never + // > extends (_: TW) => infer R + // ? R extends string + // ? Exclude extends infer TR extends string + // ? generic.UnionToIntersection< + // TR extends never + // ? never + // : TR extends string + // ? (t: TR) => TR + // : never + // > extends (_: TR) => infer RR + // ? RR extends string + // ? Exclude extends infer TTR extends string + // ? generic.UnionToIntersection< + // TTR extends never + // ? never + // : TTR extends string + // ? (t: TTR) => TTR + // : never + // > extends (_: TTR) => infer RRR + // ? RRR extends string + // ? Exclude extends infer TTTR extends + // string + // ? generic.UnionToIntersection< + // TTTR extends never + // ? never + // : TTTR extends string + // ? (t: TTTR) => TTTR + // : never + // > extends (_: TTTR) => infer RRRR + // ? RRRR extends string + // ? readonly [ + // ...UnionToTuple< + // Exclude + // >, + // RRRR, + // RRR, + // RR, + // R, + // W, + // ] + // : never + // : readonly [RRR, RR, R, W] + // : never + // : never + // : readonly [RR, R, W] + // : never + // : never + // : readonly [TW, W] + // : never + // : never + // : readonly [W] + // : never + // : readonly [T] + // : readonly []; export type TupleSplit< T,