ibm-cloud-sdk-core 4.3.2 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/es/lib/sdk-test-helpers.js +1 -2
- package/iamtest.env +3 -0
- package/lib/sdk-test-helpers.js +11 -9
- package/package.json +3 -2
- package/sdk-test-utilities/node_modules/.package-lock.json +508 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/lib/index.js +156 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/package.json +30 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/package.json +31 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/lib/index.js +119 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/index.js +165 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/package.json +56 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/readme.md +147 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/index.js +228 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/index.js.flow +93 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/package.json +71 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/readme.md +314 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/templates.js +128 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts +97 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/CHANGELOG.md +54 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/README.md +68 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/conversions.js +868 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/index.js +78 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/package.json +46 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/route.js +97 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/.eslintrc.json +43 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/LICENSE +8 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/README.md +11 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/index.js +152 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/package.json +25 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/test.js +7 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js +11 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/license +21 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json +41 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md +27 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/index.js +8 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/package.json +44 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/readme.md +70 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/browser.js +5 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/index.js +131 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/package.json +53 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/readme.md +66 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/package.json +30 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/README.md +5 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/immutableUtils.js +66 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/index.d.ts +94 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/index.js +34 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/jasmineUtils.js +218 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/utils.js +462 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/package.json +35 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/README.md +3 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/build/index.d.ts +63 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/build/index.js +60 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/package.json +29 -0
- package/sdk-test-utilities/node_modules/@jest/types/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/types/README.md +30 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Circus.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Config.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Global.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/TestResult.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/index.d.ts +1204 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/index.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/package.json +38 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/compiler.d.ts +35 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/compiler.js +577 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/index.d.ts +2 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/index.js +47 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/errors.d.ts +88 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/errors.js +609 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/index.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/index.js +44 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/license +23 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/package.json +47 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/readme.md +1424 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/index.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/index.js +44 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/system.d.ts +26 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/system.js +90 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/typebox.d.ts +723 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/typebox.js +2220 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/cast.d.ts +30 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/cast.js +372 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/check.d.ts +12 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/check.js +484 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/clone.d.ts +3 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/clone.js +71 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/convert.d.ts +13 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/convert.js +372 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/create.d.ts +26 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/create.js +480 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/delta.d.ts +43 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/delta.js +204 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/equal.d.ts +3 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/equal.js +80 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/hash.d.ts +8 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/hash.js +208 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/index.d.ts +6 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/index.js +56 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/is.d.ts +11 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/is.js +53 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/mutate.d.ts +13 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/mutate.js +121 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/pointer.d.ts +24 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/pointer.js +142 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/value.d.ts +39 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/value.js +99 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/index.d.ts +111 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/package.json +25 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/index.d.ts +184 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/package.json +32 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/README.md +86 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/index.d.ts +67 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/package.json +32 -0
- package/sdk-test-utilities/node_modules/@types/node/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/node/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/sdk-test-utilities/node_modules/@types/node/assert.d.ts +1040 -0
- package/sdk-test-utilities/node_modules/@types/node/async_hooks.d.ts +541 -0
- package/sdk-test-utilities/node_modules/@types/node/buffer.d.ts +2363 -0
- package/sdk-test-utilities/node_modules/@types/node/child_process.d.ts +1544 -0
- package/sdk-test-utilities/node_modules/@types/node/cluster.d.ts +578 -0
- package/sdk-test-utilities/node_modules/@types/node/console.d.ts +452 -0
- package/sdk-test-utilities/node_modules/@types/node/constants.d.ts +19 -0
- package/sdk-test-utilities/node_modules/@types/node/crypto.d.ts +4523 -0
- package/sdk-test-utilities/node_modules/@types/node/dgram.d.ts +596 -0
- package/sdk-test-utilities/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/sdk-test-utilities/node_modules/@types/node/dns/promises.d.ts +474 -0
- package/sdk-test-utilities/node_modules/@types/node/dns.d.ts +864 -0
- package/sdk-test-utilities/node_modules/@types/node/dom-events.d.ts +124 -0
- package/sdk-test-utilities/node_modules/@types/node/domain.d.ts +170 -0
- package/sdk-test-utilities/node_modules/@types/node/events.d.ts +909 -0
- package/sdk-test-utilities/node_modules/@types/node/fs/promises.d.ts +1245 -0
- package/sdk-test-utilities/node_modules/@types/node/fs.d.ts +4317 -0
- package/sdk-test-utilities/node_modules/@types/node/globals.d.ts +411 -0
- package/sdk-test-utilities/node_modules/@types/node/globals.global.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@types/node/http.d.ts +1908 -0
- package/sdk-test-utilities/node_modules/@types/node/http2.d.ts +2418 -0
- package/sdk-test-utilities/node_modules/@types/node/https.d.ts +550 -0
- package/sdk-test-utilities/node_modules/@types/node/index.d.ts +89 -0
- package/sdk-test-utilities/node_modules/@types/node/inspector.d.ts +2746 -0
- package/sdk-test-utilities/node_modules/@types/node/module.d.ts +315 -0
- package/sdk-test-utilities/node_modules/@types/node/net.d.ts +999 -0
- package/sdk-test-utilities/node_modules/@types/node/os.d.ts +495 -0
- package/sdk-test-utilities/node_modules/@types/node/package.json +217 -0
- package/sdk-test-utilities/node_modules/@types/node/path.d.ts +191 -0
- package/sdk-test-utilities/node_modules/@types/node/perf_hooks.d.ts +905 -0
- package/sdk-test-utilities/node_modules/@types/node/process.d.ts +1754 -0
- package/sdk-test-utilities/node_modules/@types/node/punycode.d.ts +117 -0
- package/sdk-test-utilities/node_modules/@types/node/querystring.d.ts +153 -0
- package/sdk-test-utilities/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/sdk-test-utilities/node_modules/@types/node/readline.d.ts +540 -0
- package/sdk-test-utilities/node_modules/@types/node/repl.d.ts +430 -0
- package/sdk-test-utilities/node_modules/@types/node/sea.d.ts +153 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/web.d.ts +367 -0
- package/sdk-test-utilities/node_modules/@types/node/stream.d.ts +1707 -0
- package/sdk-test-utilities/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/sdk-test-utilities/node_modules/@types/node/test.d.ts +1718 -0
- package/sdk-test-utilities/node_modules/@types/node/timers/promises.d.ts +97 -0
- package/sdk-test-utilities/node_modules/@types/node/timers.d.ts +240 -0
- package/sdk-test-utilities/node_modules/@types/node/tls.d.ts +1217 -0
- package/sdk-test-utilities/node_modules/@types/node/trace_events.d.ts +197 -0
- package/sdk-test-utilities/node_modules/@types/node/tty.d.ts +208 -0
- package/sdk-test-utilities/node_modules/@types/node/url.d.ts +952 -0
- package/sdk-test-utilities/node_modules/@types/node/util.d.ts +2292 -0
- package/sdk-test-utilities/node_modules/@types/node/v8.d.ts +808 -0
- package/sdk-test-utilities/node_modules/@types/node/vm.d.ts +924 -0
- package/sdk-test-utilities/node_modules/@types/node/wasi.d.ts +181 -0
- package/sdk-test-utilities/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/sdk-test-utilities/node_modules/@types/node/zlib.d.ts +530 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/README.md +78 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/index.d.ts +59 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/package.json +25 -0
- package/sdk-test-utilities/node_modules/@types/yargs/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/yargs/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/yargs/helpers.d.mts +1 -0
- package/sdk-test-utilities/node_modules/@types/yargs/helpers.d.ts +5 -0
- package/sdk-test-utilities/node_modules/@types/yargs/index.d.mts +46 -0
- package/sdk-test-utilities/node_modules/@types/yargs/index.d.ts +1031 -0
- package/sdk-test-utilities/node_modules/@types/yargs/package.json +87 -0
- package/sdk-test-utilities/node_modules/@types/yargs/yargs.d.ts +9 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/index.d.ts +112 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/package.json +25 -0
- package/sdk-test-utilities/node_modules/ansi-styles/index.d.ts +345 -0
- package/sdk-test-utilities/node_modules/ansi-styles/index.js +163 -0
- package/sdk-test-utilities/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/ansi-styles/package.json +56 -0
- package/sdk-test-utilities/node_modules/ansi-styles/readme.md +152 -0
- package/sdk-test-utilities/node_modules/braces/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/braces/README.md +586 -0
- package/sdk-test-utilities/node_modules/braces/index.js +170 -0
- package/sdk-test-utilities/node_modules/braces/lib/compile.js +60 -0
- package/sdk-test-utilities/node_modules/braces/lib/constants.js +57 -0
- package/sdk-test-utilities/node_modules/braces/lib/expand.js +113 -0
- package/sdk-test-utilities/node_modules/braces/lib/parse.js +331 -0
- package/sdk-test-utilities/node_modules/braces/lib/stringify.js +32 -0
- package/sdk-test-utilities/node_modules/braces/lib/utils.js +122 -0
- package/sdk-test-utilities/node_modules/braces/package.json +77 -0
- package/sdk-test-utilities/node_modules/chalk/index.d.ts +415 -0
- package/sdk-test-utilities/node_modules/chalk/license +9 -0
- package/sdk-test-utilities/node_modules/chalk/package.json +68 -0
- package/sdk-test-utilities/node_modules/chalk/readme.md +341 -0
- package/sdk-test-utilities/node_modules/chalk/source/index.js +229 -0
- package/sdk-test-utilities/node_modules/chalk/source/templates.js +134 -0
- package/sdk-test-utilities/node_modules/chalk/source/util.js +39 -0
- package/sdk-test-utilities/node_modules/ci-info/CHANGELOG.md +178 -0
- package/sdk-test-utilities/node_modules/ci-info/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/ci-info/README.md +135 -0
- package/sdk-test-utilities/node_modules/ci-info/index.d.ts +75 -0
- package/sdk-test-utilities/node_modules/ci-info/index.js +90 -0
- package/sdk-test-utilities/node_modules/ci-info/package.json +45 -0
- package/sdk-test-utilities/node_modules/ci-info/vendors.json +321 -0
- package/sdk-test-utilities/node_modules/color-convert/CHANGELOG.md +54 -0
- package/sdk-test-utilities/node_modules/color-convert/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/color-convert/README.md +68 -0
- package/sdk-test-utilities/node_modules/color-convert/conversions.js +839 -0
- package/sdk-test-utilities/node_modules/color-convert/index.js +81 -0
- package/sdk-test-utilities/node_modules/color-convert/package.json +48 -0
- package/sdk-test-utilities/node_modules/color-convert/route.js +97 -0
- package/sdk-test-utilities/node_modules/color-name/LICENSE +8 -0
- package/sdk-test-utilities/node_modules/color-name/README.md +11 -0
- package/sdk-test-utilities/node_modules/color-name/index.js +152 -0
- package/sdk-test-utilities/node_modules/color-name/package.json +28 -0
- package/sdk-test-utilities/node_modules/diff-sequences/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/diff-sequences/README.md +404 -0
- package/sdk-test-utilities/node_modules/diff-sequences/build/index.d.ts +38 -0
- package/sdk-test-utilities/node_modules/diff-sequences/build/index.js +798 -0
- package/sdk-test-utilities/node_modules/diff-sequences/package.json +39 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/index.js +11 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/license +9 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/package.json +43 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/readme.md +29 -0
- package/sdk-test-utilities/node_modules/expect/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/expect/README.md +3 -0
- package/sdk-test-utilities/node_modules/expect/build/asymmetricMatchers.js +375 -0
- package/sdk-test-utilities/node_modules/expect/build/extractExpectedAssertionsErrors.js +86 -0
- package/sdk-test-utilities/node_modules/expect/build/index.d.ts +370 -0
- package/sdk-test-utilities/node_modules/expect/build/index.js +410 -0
- package/sdk-test-utilities/node_modules/expect/build/jestMatchersObject.js +123 -0
- package/sdk-test-utilities/node_modules/expect/build/matchers.js +1292 -0
- package/sdk-test-utilities/node_modules/expect/build/print.js +122 -0
- package/sdk-test-utilities/node_modules/expect/build/spyMatchers.js +1254 -0
- package/sdk-test-utilities/node_modules/expect/build/toThrowMatchers.js +481 -0
- package/sdk-test-utilities/node_modules/expect/build/types.js +3 -0
- package/sdk-test-utilities/node_modules/expect/package.json +43 -0
- package/sdk-test-utilities/node_modules/fill-range/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/fill-range/README.md +237 -0
- package/sdk-test-utilities/node_modules/fill-range/index.js +248 -0
- package/sdk-test-utilities/node_modules/fill-range/package.json +74 -0
- package/sdk-test-utilities/node_modules/graceful-fs/LICENSE +15 -0
- package/sdk-test-utilities/node_modules/graceful-fs/README.md +143 -0
- package/sdk-test-utilities/node_modules/graceful-fs/clone.js +23 -0
- package/sdk-test-utilities/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/sdk-test-utilities/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/sdk-test-utilities/node_modules/graceful-fs/package.json +53 -0
- package/sdk-test-utilities/node_modules/graceful-fs/polyfills.js +355 -0
- package/sdk-test-utilities/node_modules/has-flag/index.d.ts +39 -0
- package/sdk-test-utilities/node_modules/has-flag/index.js +8 -0
- package/sdk-test-utilities/node_modules/has-flag/license +9 -0
- package/sdk-test-utilities/node_modules/has-flag/package.json +46 -0
- package/sdk-test-utilities/node_modules/has-flag/readme.md +89 -0
- package/sdk-test-utilities/node_modules/is-number/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/is-number/README.md +187 -0
- package/sdk-test-utilities/node_modules/is-number/index.js +18 -0
- package/sdk-test-utilities/node_modules/is-number/package.json +82 -0
- package/sdk-test-utilities/node_modules/jest-diff/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-diff/README.md +671 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/cleanupSemantic.js +599 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/constants.js +19 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/diffLines.js +193 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/diffStrings.js +66 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/getAlignedDiffs.js +223 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/index.d.ts +93 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/index.js +232 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/joinAlignedDiffs.js +271 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/normalizeDiffOptions.js +59 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/printDiffs.js +79 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/jest-diff/package.json +36 -0
- package/sdk-test-utilities/node_modules/jest-get-type/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-get-type/build/index.d.ts +27 -0
- package/sdk-test-utilities/node_modules/jest-get-type/build/index.js +53 -0
- package/sdk-test-utilities/node_modules/jest-get-type/package.json +27 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/README.md +24 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/Replaceable.js +64 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/deepCyclicCopyReplaceable.js +111 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/index.d.ts +138 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/index.js +542 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/package.json +37 -0
- package/sdk-test-utilities/node_modules/jest-message-util/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/index.d.ts +68 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/index.js +518 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/jest-message-util/package.json +43 -0
- package/sdk-test-utilities/node_modules/jest-util/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-util/Readme.md +87 -0
- package/sdk-test-utilities/node_modules/jest-util/build/ErrorWithStack.js +28 -0
- package/sdk-test-utilities/node_modules/jest-util/build/clearLine.js +18 -0
- package/sdk-test-utilities/node_modules/jest-util/build/convertDescriptorToString.js +30 -0
- package/sdk-test-utilities/node_modules/jest-util/build/createDirectory.js +71 -0
- package/sdk-test-utilities/node_modules/jest-util/build/createProcessObject.js +109 -0
- package/sdk-test-utilities/node_modules/jest-util/build/deepCyclicCopy.js +76 -0
- package/sdk-test-utilities/node_modules/jest-util/build/formatTime.js +24 -0
- package/sdk-test-utilities/node_modules/jest-util/build/globsToMatcher.js +98 -0
- package/sdk-test-utilities/node_modules/jest-util/build/index.d.ts +136 -0
- package/sdk-test-utilities/node_modules/jest-util/build/index.js +199 -0
- package/sdk-test-utilities/node_modules/jest-util/build/installCommonGlobals.js +115 -0
- package/sdk-test-utilities/node_modules/jest-util/build/interopRequireDefault.js +22 -0
- package/sdk-test-utilities/node_modules/jest-util/build/invariant.js +18 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isInteractive.js +22 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isNonNullable.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isPromise.js +20 -0
- package/sdk-test-utilities/node_modules/jest-util/build/pluralize.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/preRunMessage.js +38 -0
- package/sdk-test-utilities/node_modules/jest-util/build/replacePathSepForGlob.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/requireOrImportModule.js +77 -0
- package/sdk-test-utilities/node_modules/jest-util/build/setGlobal.js +17 -0
- package/sdk-test-utilities/node_modules/jest-util/build/specialChars.js +25 -0
- package/sdk-test-utilities/node_modules/jest-util/build/testPathPatternToRegExp.js +19 -0
- package/sdk-test-utilities/node_modules/jest-util/build/tryRealpath.js +30 -0
- package/sdk-test-utilities/node_modules/jest-util/package.json +38 -0
- package/sdk-test-utilities/node_modules/js-tokens/CHANGELOG.md +151 -0
- package/sdk-test-utilities/node_modules/js-tokens/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/js-tokens/README.md +240 -0
- package/sdk-test-utilities/node_modules/js-tokens/index.js +23 -0
- package/sdk-test-utilities/node_modules/js-tokens/package.json +30 -0
- package/sdk-test-utilities/node_modules/micromatch/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/micromatch/README.md +1017 -0
- package/sdk-test-utilities/node_modules/micromatch/index.js +467 -0
- package/sdk-test-utilities/node_modules/micromatch/package.json +101 -0
- package/sdk-test-utilities/node_modules/picocolors/LICENSE +15 -0
- package/sdk-test-utilities/node_modules/picocolors/README.md +21 -0
- package/sdk-test-utilities/node_modules/picocolors/package.json +25 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.browser.js +4 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.d.ts +5 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.js +65 -0
- package/sdk-test-utilities/node_modules/picomatch/CHANGELOG.md +136 -0
- package/sdk-test-utilities/node_modules/picomatch/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/picomatch/README.md +708 -0
- package/sdk-test-utilities/node_modules/picomatch/index.js +3 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/constants.js +179 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/parse.js +1091 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/picomatch.js +342 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/scan.js +391 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/utils.js +64 -0
- package/sdk-test-utilities/node_modules/picomatch/package.json +81 -0
- package/sdk-test-utilities/node_modules/pretty-format/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/pretty-format/README.md +463 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/collections.js +180 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/index.d.ts +163 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/index.js +478 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js +89 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/DOMCollection.js +67 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/DOMElement.js +101 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/Immutable.js +217 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/ReactElement.js +143 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/ReactTestComponent.js +66 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/lib/escapeHTML.js +16 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/lib/markup.js +113 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/index.d.ts +167 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/index.js +164 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/package.json +52 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/readme.md +144 -0
- package/sdk-test-utilities/node_modules/pretty-format/package.json +43 -0
- package/sdk-test-utilities/node_modules/react-is/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/react-is/README.md +104 -0
- package/sdk-test-utilities/node_modules/react-is/cjs/react-is.development.js +221 -0
- package/sdk-test-utilities/node_modules/react-is/cjs/react-is.production.min.js +14 -0
- package/sdk-test-utilities/node_modules/react-is/index.js +7 -0
- package/sdk-test-utilities/node_modules/react-is/package.json +26 -0
- package/sdk-test-utilities/node_modules/react-is/umd/react-is.development.js +220 -0
- package/sdk-test-utilities/node_modules/react-is/umd/react-is.production.min.js +15 -0
- package/sdk-test-utilities/node_modules/slash/index.d.ts +25 -0
- package/sdk-test-utilities/node_modules/slash/index.js +11 -0
- package/sdk-test-utilities/node_modules/slash/license +9 -0
- package/sdk-test-utilities/node_modules/slash/package.json +35 -0
- package/sdk-test-utilities/node_modules/slash/readme.md +44 -0
- package/sdk-test-utilities/node_modules/stack-utils/LICENSE.md +21 -0
- package/sdk-test-utilities/node_modules/stack-utils/index.js +344 -0
- package/sdk-test-utilities/node_modules/stack-utils/package.json +39 -0
- package/sdk-test-utilities/node_modules/stack-utils/readme.md +143 -0
- package/sdk-test-utilities/node_modules/supports-color/browser.js +5 -0
- package/sdk-test-utilities/node_modules/supports-color/index.js +135 -0
- package/sdk-test-utilities/node_modules/supports-color/license +9 -0
- package/sdk-test-utilities/node_modules/supports-color/package.json +53 -0
- package/sdk-test-utilities/node_modules/supports-color/readme.md +76 -0
- package/sdk-test-utilities/node_modules/to-regex-range/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/to-regex-range/README.md +305 -0
- package/sdk-test-utilities/node_modules/to-regex-range/index.js +288 -0
- package/sdk-test-utilities/node_modules/to-regex-range/package.json +88 -0
- package/sdk-test-utilities/node_modules/undici-types/README.md +6 -0
- package/sdk-test-utilities/node_modules/undici-types/agent.d.ts +31 -0
- package/sdk-test-utilities/node_modules/undici-types/api.d.ts +43 -0
- package/sdk-test-utilities/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/sdk-test-utilities/node_modules/undici-types/cache.d.ts +36 -0
- package/sdk-test-utilities/node_modules/undici-types/client.d.ts +97 -0
- package/sdk-test-utilities/node_modules/undici-types/connector.d.ts +34 -0
- package/sdk-test-utilities/node_modules/undici-types/content-type.d.ts +21 -0
- package/sdk-test-utilities/node_modules/undici-types/cookies.d.ts +28 -0
- package/sdk-test-utilities/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/sdk-test-utilities/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/sdk-test-utilities/node_modules/undici-types/errors.d.ts +128 -0
- package/sdk-test-utilities/node_modules/undici-types/fetch.d.ts +209 -0
- package/sdk-test-utilities/node_modules/undici-types/file.d.ts +39 -0
- package/sdk-test-utilities/node_modules/undici-types/filereader.d.ts +54 -0
- package/sdk-test-utilities/node_modules/undici-types/formdata.d.ts +108 -0
- package/sdk-test-utilities/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/sdk-test-utilities/node_modules/undici-types/global-origin.d.ts +7 -0
- package/sdk-test-utilities/node_modules/undici-types/handlers.d.ts +9 -0
- package/sdk-test-utilities/node_modules/undici-types/header.d.ts +4 -0
- package/sdk-test-utilities/node_modules/undici-types/index.d.ts +63 -0
- package/sdk-test-utilities/node_modules/undici-types/interceptors.d.ts +5 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-client.d.ts +25 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/sdk-test-utilities/node_modules/undici-types/package.json +55 -0
- package/sdk-test-utilities/node_modules/undici-types/patch.d.ts +71 -0
- package/sdk-test-utilities/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/sdk-test-utilities/node_modules/undici-types/pool.d.ts +28 -0
- package/sdk-test-utilities/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/sdk-test-utilities/node_modules/undici-types/readable.d.ts +61 -0
- package/sdk-test-utilities/node_modules/undici-types/webidl.d.ts +220 -0
- package/sdk-test-utilities/node_modules/undici-types/websocket.d.ts +131 -0
|
@@ -0,0 +1,723 @@
|
|
|
1
|
+
export declare const Modifier: unique symbol;
|
|
2
|
+
export declare const Hint: unique symbol;
|
|
3
|
+
export declare const Kind: unique symbol;
|
|
4
|
+
export declare const PatternBoolean = "(true|false)";
|
|
5
|
+
export declare const PatternNumber = "(0|[1-9][0-9]*)";
|
|
6
|
+
export declare const PatternString = "(.*)";
|
|
7
|
+
export declare const PatternBooleanExact: string;
|
|
8
|
+
export declare const PatternNumberExact: string;
|
|
9
|
+
export declare const PatternStringExact: string;
|
|
10
|
+
export type TupleToIntersect<T extends any[]> = T extends [infer I] ? I : T extends [infer I, ...infer R] ? I & TupleToIntersect<R> : never;
|
|
11
|
+
export type TupleToUnion<T extends any[]> = {
|
|
12
|
+
[K in keyof T]: T[K];
|
|
13
|
+
}[number];
|
|
14
|
+
export type UnionToIntersect<U> = (U extends unknown ? (arg: U) => 0 : never) extends (arg: infer I) => 0 ? I : never;
|
|
15
|
+
export type UnionLast<U> = UnionToIntersect<U extends unknown ? (x: U) => 0 : never> extends (x: infer L) => 0 ? L : never;
|
|
16
|
+
export type UnionToTuple<U, L = UnionLast<U>> = [U] extends [never] ? [] : [...UnionToTuple<Exclude<U, L>>, L];
|
|
17
|
+
export type Assert<T, E> = T extends E ? T : never;
|
|
18
|
+
export type Evaluate<T> = T extends infer O ? {
|
|
19
|
+
[K in keyof O]: O[K];
|
|
20
|
+
} : never;
|
|
21
|
+
export type Ensure<T> = T extends infer U ? U : never;
|
|
22
|
+
export type TModifier = TReadonlyOptional<TSchema> | TOptional<TSchema> | TReadonly<TSchema>;
|
|
23
|
+
export type TReadonly<T extends TSchema> = T & {
|
|
24
|
+
[Modifier]: 'Readonly';
|
|
25
|
+
};
|
|
26
|
+
export type TOptional<T extends TSchema> = T & {
|
|
27
|
+
[Modifier]: 'Optional';
|
|
28
|
+
};
|
|
29
|
+
export type TReadonlyOptional<T extends TSchema> = T & {
|
|
30
|
+
[Modifier]: 'ReadonlyOptional';
|
|
31
|
+
};
|
|
32
|
+
export interface SchemaOptions {
|
|
33
|
+
$schema?: string;
|
|
34
|
+
/** Id for this schema */
|
|
35
|
+
$id?: string;
|
|
36
|
+
/** Title of this schema */
|
|
37
|
+
title?: string;
|
|
38
|
+
/** Description of this schema */
|
|
39
|
+
description?: string;
|
|
40
|
+
/** Default value for this schema */
|
|
41
|
+
default?: any;
|
|
42
|
+
/** Example values matching this schema */
|
|
43
|
+
examples?: any;
|
|
44
|
+
[prop: string]: any;
|
|
45
|
+
}
|
|
46
|
+
export interface TKind {
|
|
47
|
+
[Kind]: string;
|
|
48
|
+
}
|
|
49
|
+
export interface TSchema extends SchemaOptions, TKind {
|
|
50
|
+
[Modifier]?: string;
|
|
51
|
+
[Hint]?: string;
|
|
52
|
+
params: unknown[];
|
|
53
|
+
static: unknown;
|
|
54
|
+
}
|
|
55
|
+
export type TAnySchema = TSchema | TAny | TArray | TBigInt | TBoolean | TConstructor | TDate | TEnum | TFunction | TInteger | TIntersect | TLiteral | TNot | TNull | TNumber | TObject | TPromise | TRecord | TRef | TString | TSymbol | TTemplateLiteral | TThis | TTuple | TUndefined | TUnion | TUint8Array | TUnknown | TVoid;
|
|
56
|
+
export type TNumeric = TInteger | TNumber;
|
|
57
|
+
export interface NumericOptions<N extends number | bigint> extends SchemaOptions {
|
|
58
|
+
exclusiveMaximum?: N;
|
|
59
|
+
exclusiveMinimum?: N;
|
|
60
|
+
maximum?: N;
|
|
61
|
+
minimum?: N;
|
|
62
|
+
multipleOf?: N;
|
|
63
|
+
}
|
|
64
|
+
export interface TAny extends TSchema {
|
|
65
|
+
[Kind]: 'Any';
|
|
66
|
+
static: any;
|
|
67
|
+
}
|
|
68
|
+
export interface ArrayOptions extends SchemaOptions {
|
|
69
|
+
uniqueItems?: boolean;
|
|
70
|
+
minItems?: number;
|
|
71
|
+
maxItems?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface TArray<T extends TSchema = TSchema> extends TSchema, ArrayOptions {
|
|
74
|
+
[Kind]: 'Array';
|
|
75
|
+
static: Static<T, this['params']>[];
|
|
76
|
+
type: 'array';
|
|
77
|
+
items: T;
|
|
78
|
+
}
|
|
79
|
+
export interface TBigInt extends TSchema, NumericOptions<bigint> {
|
|
80
|
+
[Kind]: 'BigInt';
|
|
81
|
+
static: bigint;
|
|
82
|
+
type: 'null';
|
|
83
|
+
typeOf: 'BigInt';
|
|
84
|
+
}
|
|
85
|
+
export interface TBoolean extends TSchema {
|
|
86
|
+
[Kind]: 'Boolean';
|
|
87
|
+
static: boolean;
|
|
88
|
+
type: 'boolean';
|
|
89
|
+
}
|
|
90
|
+
export type TConstructorParameters<T extends TConstructor<TSchema[], TSchema>> = TTuple<T['parameters']>;
|
|
91
|
+
export type TInstanceType<T extends TConstructor<TSchema[], TSchema>> = T['returns'];
|
|
92
|
+
export type TCompositeEvaluateArray<T extends readonly TSchema[], P extends unknown[]> = {
|
|
93
|
+
[K in keyof T]: T[K] extends TSchema ? Static<T[K], P> : never;
|
|
94
|
+
};
|
|
95
|
+
export type TCompositeArray<T extends readonly TObject[]> = {
|
|
96
|
+
[K in keyof T]: T[K] extends TObject<infer P> ? P : {};
|
|
97
|
+
};
|
|
98
|
+
export type TCompositeProperties<I extends unknown, T extends readonly any[]> = Evaluate<T extends [infer A, ...infer B] ? TCompositeProperties<I & A, B> : I extends object ? I : {}>;
|
|
99
|
+
export interface TComposite<T extends TObject[] = TObject[]> extends TObject {
|
|
100
|
+
[Hint]: 'Composite';
|
|
101
|
+
static: Evaluate<TCompositeProperties<unknown, TCompositeEvaluateArray<T, this['params']>>>;
|
|
102
|
+
properties: TCompositeProperties<unknown, TCompositeArray<T>>;
|
|
103
|
+
}
|
|
104
|
+
export type TConstructorParameterArray<T extends readonly TSchema[], P extends unknown[]> = [...{
|
|
105
|
+
[K in keyof T]: Static<Assert<T[K], TSchema>, P>;
|
|
106
|
+
}];
|
|
107
|
+
export interface TConstructor<T extends TSchema[] = TSchema[], U extends TSchema = TSchema> extends TSchema {
|
|
108
|
+
[Kind]: 'Constructor';
|
|
109
|
+
static: new (...param: TConstructorParameterArray<T, this['params']>) => Static<U, this['params']>;
|
|
110
|
+
type: 'object';
|
|
111
|
+
instanceOf: 'Constructor';
|
|
112
|
+
parameters: T;
|
|
113
|
+
returns: U;
|
|
114
|
+
}
|
|
115
|
+
export interface DateOptions extends SchemaOptions {
|
|
116
|
+
exclusiveMaximumTimestamp?: number;
|
|
117
|
+
exclusiveMinimumTimestamp?: number;
|
|
118
|
+
maximumTimestamp?: number;
|
|
119
|
+
minimumTimestamp?: number;
|
|
120
|
+
}
|
|
121
|
+
export interface TDate extends TSchema, DateOptions {
|
|
122
|
+
[Kind]: 'Date';
|
|
123
|
+
static: Date;
|
|
124
|
+
type: 'object';
|
|
125
|
+
instanceOf: 'Date';
|
|
126
|
+
}
|
|
127
|
+
export interface TEnumOption<T> {
|
|
128
|
+
type: 'number' | 'string';
|
|
129
|
+
const: T;
|
|
130
|
+
}
|
|
131
|
+
export interface TEnum<T extends Record<string, string | number> = Record<string, string | number>> extends TSchema {
|
|
132
|
+
[Kind]: 'Union';
|
|
133
|
+
static: T[keyof T];
|
|
134
|
+
anyOf: TLiteral<string | number>[];
|
|
135
|
+
}
|
|
136
|
+
export type TExtends<L extends TSchema, R extends TSchema, T extends TSchema, U extends TSchema> = (Static<L> extends Static<R> ? T : U) extends infer O ? UnionToTuple<O> extends [infer X, infer Y] ? TUnion<[Assert<X, TSchema>, Assert<Y, TSchema>]> : Assert<O, TSchema> : never;
|
|
137
|
+
export type TExcludeTemplateLiteralResult<T extends string> = TUnionResult<Assert<UnionToTuple<{
|
|
138
|
+
[K in T]: TLiteral<K>;
|
|
139
|
+
}[T]>, TSchema[]>>;
|
|
140
|
+
export type TExcludeTemplateLiteral<T extends TTemplateLiteral, U extends TSchema> = Exclude<Static<T>, Static<U>> extends infer S ? TExcludeTemplateLiteralResult<Assert<S, string>> : never;
|
|
141
|
+
export type TExcludeArray<T extends TSchema[], U extends TSchema> = Assert<UnionToTuple<{
|
|
142
|
+
[K in keyof T]: Static<Assert<T[K], TSchema>> extends Static<U> ? never : T[K];
|
|
143
|
+
}[number]>, TSchema[]> extends infer R ? TUnionResult<Assert<R, TSchema[]>> : never;
|
|
144
|
+
export type TExclude<T extends TSchema, U extends TSchema> = T extends TTemplateLiteral ? TExcludeTemplateLiteral<T, U> : T extends TUnion<infer S> ? TExcludeArray<S, U> : T extends U ? TNever : T;
|
|
145
|
+
export type TExtractTemplateLiteralResult<T extends string> = TUnionResult<Assert<UnionToTuple<{
|
|
146
|
+
[K in T]: TLiteral<K>;
|
|
147
|
+
}[T]>, TSchema[]>>;
|
|
148
|
+
export type TExtractTemplateLiteral<T extends TTemplateLiteral, U extends TSchema> = Extract<Static<T>, Static<U>> extends infer S ? TExtractTemplateLiteralResult<Assert<S, string>> : never;
|
|
149
|
+
export type TExtractArray<T extends TSchema[], U extends TSchema> = Assert<UnionToTuple<{
|
|
150
|
+
[K in keyof T]: Static<Assert<T[K], TSchema>> extends Static<U> ? T[K] : never;
|
|
151
|
+
}[number]>, TSchema[]> extends infer R ? TUnionResult<Assert<R, TSchema[]>> : never;
|
|
152
|
+
export type TExtract<T extends TSchema, U extends TSchema> = T extends TTemplateLiteral ? TExtractTemplateLiteral<T, U> : T extends TUnion<infer S> ? TExtractArray<S, U> : T extends U ? T : T;
|
|
153
|
+
export type TFunctionParameters<T extends readonly TSchema[], P extends unknown[]> = [...{
|
|
154
|
+
[K in keyof T]: Static<Assert<T[K], TSchema>, P>;
|
|
155
|
+
}];
|
|
156
|
+
export interface TFunction<T extends readonly TSchema[] = TSchema[], U extends TSchema = TSchema> extends TSchema {
|
|
157
|
+
[Kind]: 'Function';
|
|
158
|
+
static: (...param: TFunctionParameters<T, this['params']>) => Static<U, this['params']>;
|
|
159
|
+
type: 'object';
|
|
160
|
+
instanceOf: 'Function';
|
|
161
|
+
parameters: T;
|
|
162
|
+
returns: U;
|
|
163
|
+
}
|
|
164
|
+
export interface TInteger extends TSchema, NumericOptions<number> {
|
|
165
|
+
[Kind]: 'Integer';
|
|
166
|
+
static: number;
|
|
167
|
+
type: 'integer';
|
|
168
|
+
}
|
|
169
|
+
export type TUnevaluatedProperties = undefined | TSchema | boolean;
|
|
170
|
+
export interface IntersectOptions extends SchemaOptions {
|
|
171
|
+
unevaluatedProperties?: TUnevaluatedProperties;
|
|
172
|
+
}
|
|
173
|
+
export interface TIntersect<T extends TSchema[] = TSchema[]> extends TSchema, IntersectOptions {
|
|
174
|
+
[Kind]: 'Intersect';
|
|
175
|
+
static: TupleToIntersect<{
|
|
176
|
+
[K in keyof T]: Static<Assert<T[K], TSchema>, this['params']>;
|
|
177
|
+
}>;
|
|
178
|
+
type?: 'object';
|
|
179
|
+
allOf: [...T];
|
|
180
|
+
}
|
|
181
|
+
export type TKeyOfTuple<T extends TSchema> = {
|
|
182
|
+
[K in keyof Static<T>]: TLiteral<Assert<K, TLiteralValue>>;
|
|
183
|
+
} extends infer U ? UnionToTuple<Exclude<{
|
|
184
|
+
[K in keyof U]: U[K];
|
|
185
|
+
}[keyof U], undefined>> : never;
|
|
186
|
+
export type TKeyOf<T extends TSchema = TSchema> = (T extends TRecursive<infer S> ? TKeyOfTuple<S> : T extends TComposite ? TKeyOfTuple<T> : T extends TIntersect ? TKeyOfTuple<T> : T extends TUnion ? TKeyOfTuple<T> : T extends TObject ? TKeyOfTuple<T> : T extends TRecord<infer K> ? [K] : [
|
|
187
|
+
]) extends infer R ? TUnionResult<Assert<R, TSchema[]>> : never;
|
|
188
|
+
export type TLiteralValue = string | number | boolean;
|
|
189
|
+
export interface TLiteral<T extends TLiteralValue = TLiteralValue> extends TSchema {
|
|
190
|
+
[Kind]: 'Literal';
|
|
191
|
+
static: T;
|
|
192
|
+
const: T;
|
|
193
|
+
}
|
|
194
|
+
export interface TNever extends TSchema {
|
|
195
|
+
[Kind]: 'Never';
|
|
196
|
+
static: never;
|
|
197
|
+
not: {};
|
|
198
|
+
}
|
|
199
|
+
export interface TNot<Not extends TSchema = TSchema, T extends TSchema = TSchema> extends TSchema {
|
|
200
|
+
[Kind]: 'Not';
|
|
201
|
+
static: Static<T>;
|
|
202
|
+
allOf: [{
|
|
203
|
+
not: Not;
|
|
204
|
+
}, T];
|
|
205
|
+
}
|
|
206
|
+
export interface TNull extends TSchema {
|
|
207
|
+
[Kind]: 'Null';
|
|
208
|
+
static: null;
|
|
209
|
+
type: 'null';
|
|
210
|
+
}
|
|
211
|
+
export interface TNumber extends TSchema, NumericOptions<number> {
|
|
212
|
+
[Kind]: 'Number';
|
|
213
|
+
static: number;
|
|
214
|
+
type: 'number';
|
|
215
|
+
}
|
|
216
|
+
export type ReadonlyOptionalPropertyKeys<T extends TProperties> = {
|
|
217
|
+
[K in keyof T]: T[K] extends TReadonlyOptional<TSchema> ? K : never;
|
|
218
|
+
}[keyof T];
|
|
219
|
+
export type ReadonlyPropertyKeys<T extends TProperties> = {
|
|
220
|
+
[K in keyof T]: T[K] extends TReadonly<TSchema> ? K : never;
|
|
221
|
+
}[keyof T];
|
|
222
|
+
export type OptionalPropertyKeys<T extends TProperties> = {
|
|
223
|
+
[K in keyof T]: T[K] extends TOptional<TSchema> ? K : never;
|
|
224
|
+
}[keyof T];
|
|
225
|
+
export type RequiredPropertyKeys<T extends TProperties> = keyof Omit<T, ReadonlyOptionalPropertyKeys<T> | ReadonlyPropertyKeys<T> | OptionalPropertyKeys<T>>;
|
|
226
|
+
export type PropertiesReducer<T extends TProperties, R extends Record<keyof any, unknown>> = Evaluate<(Readonly<Partial<Pick<R, ReadonlyOptionalPropertyKeys<T>>>> & Readonly<Pick<R, ReadonlyPropertyKeys<T>>> & Partial<Pick<R, OptionalPropertyKeys<T>>> & Required<Pick<R, RequiredPropertyKeys<T>>>)>;
|
|
227
|
+
export type PropertiesReduce<T extends TProperties, P extends unknown[]> = PropertiesReducer<T, {
|
|
228
|
+
[K in keyof T]: Static<T[K], P>;
|
|
229
|
+
}>;
|
|
230
|
+
export type TProperties = Record<keyof any, TSchema>;
|
|
231
|
+
export type ObjectProperties<T> = T extends TObject<infer U> ? U : never;
|
|
232
|
+
export type ObjectPropertyKeys<T> = T extends TObject<infer U> ? keyof U : never;
|
|
233
|
+
export type TAdditionalProperties = undefined | TSchema | boolean;
|
|
234
|
+
export interface ObjectOptions extends SchemaOptions {
|
|
235
|
+
additionalProperties?: TAdditionalProperties;
|
|
236
|
+
minProperties?: number;
|
|
237
|
+
maxProperties?: number;
|
|
238
|
+
}
|
|
239
|
+
export interface TObject<T extends TProperties = TProperties> extends TSchema, ObjectOptions {
|
|
240
|
+
[Kind]: 'Object';
|
|
241
|
+
static: PropertiesReduce<T, this['params']>;
|
|
242
|
+
additionalProperties?: TAdditionalProperties;
|
|
243
|
+
type: 'object';
|
|
244
|
+
properties: T;
|
|
245
|
+
required?: string[];
|
|
246
|
+
}
|
|
247
|
+
export type TOmitArray<T extends TSchema[], K extends keyof any> = Assert<{
|
|
248
|
+
[K2 in keyof T]: TOmit<Assert<T[K2], TSchema>, K>;
|
|
249
|
+
}, TSchema[]>;
|
|
250
|
+
export type TOmitProperties<T extends TProperties, K extends keyof any> = Evaluate<Assert<Omit<T, K>, TProperties>>;
|
|
251
|
+
export type TOmit<T extends TSchema = TSchema, K extends keyof any = keyof any> = T extends TRecursive<infer S> ? TRecursive<TOmit<S, K>> : T extends TComposite<infer S> ? TComposite<TOmitArray<S, K>> : T extends TIntersect<infer S> ? TIntersect<TOmitArray<S, K>> : T extends TUnion<infer S> ? TUnion<TOmitArray<S, K>> : T extends TObject<infer S> ? TObject<TOmitProperties<S, K>> : T;
|
|
252
|
+
export type TParameters<T extends TFunction> = TTuple<T['parameters']>;
|
|
253
|
+
export type TPartialObjectArray<T extends TObject[]> = Assert<{
|
|
254
|
+
[K in keyof T]: TPartial<Assert<T[K], TObject>>;
|
|
255
|
+
}, TObject[]>;
|
|
256
|
+
export type TPartialArray<T extends TSchema[]> = Assert<{
|
|
257
|
+
[K in keyof T]: TPartial<Assert<T[K], TSchema>>;
|
|
258
|
+
}, TSchema[]>;
|
|
259
|
+
export type TPartialProperties<T extends TProperties> = Evaluate<Assert<{
|
|
260
|
+
[K in keyof T]: T[K] extends TReadonlyOptional<infer U> ? TReadonlyOptional<U> : T[K] extends TReadonly<infer U> ? TReadonlyOptional<U> : T[K] extends TOptional<infer U> ? TOptional<U> : TOptional<T[K]>;
|
|
261
|
+
}, TProperties>>;
|
|
262
|
+
export type TPartial<T extends TSchema> = T extends TRecursive<infer S> ? TRecursive<TPartial<S>> : T extends TComposite<infer S> ? TComposite<TPartialArray<S>> : T extends TIntersect<infer S> ? TIntersect<TPartialArray<S>> : T extends TUnion<infer S> ? TUnion<TPartialArray<S>> : T extends TObject<infer S> ? TObject<TPartialProperties<S>> : T;
|
|
263
|
+
export type TPickArray<T extends TSchema[], K extends keyof any> = {
|
|
264
|
+
[K2 in keyof T]: TPick<Assert<T[K2], TSchema>, K>;
|
|
265
|
+
};
|
|
266
|
+
export type TPickProperties<T extends TProperties, K extends keyof any> = Pick<T, Assert<Extract<K, keyof T>, keyof T>> extends infer R ? ({
|
|
267
|
+
[K in keyof R]: Assert<R[K], TSchema> extends TSchema ? R[K] : never;
|
|
268
|
+
}) : never;
|
|
269
|
+
export type TPick<T extends TSchema = TSchema, K extends keyof any = keyof any> = T extends TRecursive<infer S> ? TRecursive<TPick<S, K>> : T extends TComposite<infer S> ? TComposite<TPickArray<S, K>> : T extends TIntersect<infer S> ? TIntersect<TPickArray<S, K>> : T extends TUnion<infer S> ? TUnion<TPickArray<S, K>> : T extends TObject<infer S> ? TObject<TPickProperties<S, K>> : T;
|
|
270
|
+
export interface TPromise<T extends TSchema = TSchema> extends TSchema {
|
|
271
|
+
[Kind]: 'Promise';
|
|
272
|
+
static: Promise<Static<T, this['params']>>;
|
|
273
|
+
type: 'object';
|
|
274
|
+
instanceOf: 'Promise';
|
|
275
|
+
item: TSchema;
|
|
276
|
+
}
|
|
277
|
+
export type RecordTemplateLiteralObjectType<K extends TTemplateLiteral, T extends TSchema> = Ensure<TObject<Evaluate<{
|
|
278
|
+
[_ in Static<K>]: T;
|
|
279
|
+
}>>>;
|
|
280
|
+
export type RecordTemplateLiteralType<K extends TTemplateLiteral, T extends TSchema> = IsTemplateLiteralFinite<K> extends true ? RecordTemplateLiteralObjectType<K, T> : TRecord<K, T>;
|
|
281
|
+
export type RecordUnionLiteralType<K extends TUnion<TLiteral<string | number>[]>, T extends TSchema> = Static<K> extends string ? Ensure<TObject<{
|
|
282
|
+
[X in Static<K>]: T;
|
|
283
|
+
}>> : never;
|
|
284
|
+
export type RecordLiteralType<K extends TLiteral<string | number>, T extends TSchema> = Ensure<TObject<{
|
|
285
|
+
[K2 in K['const']]: T;
|
|
286
|
+
}>>;
|
|
287
|
+
export type RecordNumberType<K extends TInteger | TNumber, T extends TSchema> = Ensure<TRecord<K, T>>;
|
|
288
|
+
export type RecordStringType<K extends TString, T extends TSchema> = Ensure<TRecord<K, T>>;
|
|
289
|
+
export type RecordKey = TUnion<TLiteral<string | number>[]> | TLiteral<string | number> | TTemplateLiteral | TInteger | TNumber | TString;
|
|
290
|
+
export interface TRecord<K extends RecordKey = RecordKey, T extends TSchema = TSchema> extends TSchema {
|
|
291
|
+
[Kind]: 'Record';
|
|
292
|
+
static: Record<Static<K>, Static<T, this['params']>>;
|
|
293
|
+
type: 'object';
|
|
294
|
+
patternProperties: {
|
|
295
|
+
[pattern: string]: T;
|
|
296
|
+
};
|
|
297
|
+
additionalProperties: false;
|
|
298
|
+
}
|
|
299
|
+
export interface TThis extends TSchema {
|
|
300
|
+
[Kind]: 'This';
|
|
301
|
+
static: this['params'][0];
|
|
302
|
+
$ref: string;
|
|
303
|
+
}
|
|
304
|
+
export type TRecursiveReduce<T extends TSchema> = Static<T, [TRecursiveReduce<T>]>;
|
|
305
|
+
export interface TRecursive<T extends TSchema> extends TSchema {
|
|
306
|
+
[Hint]: 'Recursive';
|
|
307
|
+
static: TRecursiveReduce<T>;
|
|
308
|
+
}
|
|
309
|
+
export interface TRef<T extends TSchema = TSchema> extends TSchema {
|
|
310
|
+
[Kind]: 'Ref';
|
|
311
|
+
static: Static<T, this['params']>;
|
|
312
|
+
$ref: string;
|
|
313
|
+
}
|
|
314
|
+
export type TReturnType<T extends TFunction> = T['returns'];
|
|
315
|
+
export type TRequiredArray<T extends TSchema[]> = Assert<{
|
|
316
|
+
[K in keyof T]: TRequired<Assert<T[K], TSchema>>;
|
|
317
|
+
}, TSchema[]>;
|
|
318
|
+
export type TRequiredProperties<T extends TProperties> = Evaluate<Assert<{
|
|
319
|
+
[K in keyof T]: T[K] extends TReadonlyOptional<infer U> ? TReadonly<U> : T[K] extends TReadonly<infer U> ? TReadonly<U> : T[K] extends TOptional<infer U> ? U : T[K];
|
|
320
|
+
}, TProperties>>;
|
|
321
|
+
export type TRequired<T extends TSchema> = T extends TRecursive<infer S> ? TRecursive<TRequired<S>> : T extends TComposite<infer S> ? TComposite<TRequiredArray<S>> : T extends TIntersect<infer S> ? TIntersect<TRequiredArray<S>> : T extends TUnion<infer S> ? TUnion<TRequiredArray<S>> : T extends TObject<infer S> ? TObject<TRequiredProperties<S>> : T;
|
|
322
|
+
export type StringFormatOption = 'date-time' | 'time' | 'date' | 'email' | 'idn-email' | 'hostname' | 'idn-hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uri-reference' | 'iri' | 'uuid' | 'iri-reference' | 'uri-template' | 'json-pointer' | 'relative-json-pointer' | 'regex';
|
|
323
|
+
export interface StringOptions<Format extends string> extends SchemaOptions {
|
|
324
|
+
minLength?: number;
|
|
325
|
+
maxLength?: number;
|
|
326
|
+
pattern?: string;
|
|
327
|
+
format?: Format;
|
|
328
|
+
contentEncoding?: '7bit' | '8bit' | 'binary' | 'quoted-printable' | 'base64';
|
|
329
|
+
contentMediaType?: string;
|
|
330
|
+
}
|
|
331
|
+
export interface TString<Format extends string = string> extends TSchema, StringOptions<Format> {
|
|
332
|
+
[Kind]: 'String';
|
|
333
|
+
static: string;
|
|
334
|
+
type: 'string';
|
|
335
|
+
}
|
|
336
|
+
export type SymbolValue = string | number | undefined;
|
|
337
|
+
export interface TSymbol extends TSchema, SchemaOptions {
|
|
338
|
+
[Kind]: 'Symbol';
|
|
339
|
+
static: symbol;
|
|
340
|
+
type: 'null';
|
|
341
|
+
typeOf: 'Symbol';
|
|
342
|
+
}
|
|
343
|
+
export type IsTemplateLiteralFiniteCheck<T> = T extends TTemplateLiteral<infer U> ? IsTemplateLiteralFiniteArray<Assert<U, TTemplateLiteralKind[]>> : T extends TUnion<infer U> ? IsTemplateLiteralFiniteArray<Assert<U, TTemplateLiteralKind[]>> : T extends TString ? false : T extends TBoolean ? false : T extends TNumber ? false : T extends TInteger ? false : T extends TBigInt ? false : T extends TLiteral ? true : false;
|
|
344
|
+
export type IsTemplateLiteralFiniteArray<T extends TTemplateLiteralKind[]> = T extends [infer L, ...infer R] ? IsTemplateLiteralFiniteCheck<L> extends false ? false : IsTemplateLiteralFiniteArray<Assert<R, TTemplateLiteralKind[]>> : T extends [infer L] ? IsTemplateLiteralFiniteCheck<L> extends false ? false : true : true;
|
|
345
|
+
export type IsTemplateLiteralFinite<T> = T extends TTemplateLiteral<infer U> ? IsTemplateLiteralFiniteArray<U> : false;
|
|
346
|
+
export type TTemplateLiteralKind = TUnion | TLiteral | TInteger | TTemplateLiteral | TNumber | TBigInt | TString | TBoolean | TNever;
|
|
347
|
+
export type TTemplateLiteralConst<T, Acc extends string> = T extends TUnion<infer U> ? {
|
|
348
|
+
[K in keyof U]: TTemplateLiteralUnion<Assert<[U[K]], TTemplateLiteralKind[]>, Acc>;
|
|
349
|
+
}[number] : T extends TTemplateLiteral ? `${Static<T>}` : T extends TLiteral<infer U> ? `${U}` : T extends TString ? `${string}` : T extends TNumber ? `${number}` : T extends TBigInt ? `${bigint}` : T extends TBoolean ? `${boolean}` : never;
|
|
350
|
+
export type TTemplateLiteralUnion<T extends TTemplateLiteralKind[], Acc extends string = ''> = T extends [infer L, ...infer R] ? `${TTemplateLiteralConst<L, Acc>}${TTemplateLiteralUnion<Assert<R, TTemplateLiteralKind[]>, Acc>}` : T extends [infer L] ? `${TTemplateLiteralConst<L, Acc>}${Acc}` : Acc;
|
|
351
|
+
export interface TTemplateLiteral<T extends TTemplateLiteralKind[] = TTemplateLiteralKind[]> extends TSchema {
|
|
352
|
+
[Kind]: 'TemplateLiteral';
|
|
353
|
+
static: TTemplateLiteralUnion<T>;
|
|
354
|
+
type: 'string';
|
|
355
|
+
pattern: string;
|
|
356
|
+
}
|
|
357
|
+
export type TTupleIntoArray<T extends TTuple<TSchema[]>> = T extends TTuple<infer R> ? Assert<R, TSchema[]> : never;
|
|
358
|
+
export interface TTuple<T extends TSchema[] = TSchema[]> extends TSchema {
|
|
359
|
+
[Kind]: 'Tuple';
|
|
360
|
+
static: {
|
|
361
|
+
[K in keyof T]: T[K] extends TSchema ? Static<T[K], this['params']> : T[K];
|
|
362
|
+
};
|
|
363
|
+
type: 'array';
|
|
364
|
+
items?: T;
|
|
365
|
+
additionalItems?: false;
|
|
366
|
+
minItems: number;
|
|
367
|
+
maxItems: number;
|
|
368
|
+
}
|
|
369
|
+
export interface TUndefined extends TSchema {
|
|
370
|
+
[Kind]: 'Undefined';
|
|
371
|
+
static: undefined;
|
|
372
|
+
type: 'null';
|
|
373
|
+
typeOf: 'Undefined';
|
|
374
|
+
}
|
|
375
|
+
export type TUnionOfLiteralArray<T extends TLiteral<string>[]> = {
|
|
376
|
+
[K in keyof T]: Assert<T[K], TLiteral>['const'];
|
|
377
|
+
}[number];
|
|
378
|
+
export type TUnionOfLiteral<T extends TUnion<TLiteral<string>[]>> = TUnionOfLiteralArray<T['anyOf']>;
|
|
379
|
+
export type TUnionResult<T extends TSchema[]> = T extends [] ? TNever : T extends [infer S] ? S : TUnion<T>;
|
|
380
|
+
export type TUnionTemplateLiteral<T extends TTemplateLiteral, S extends string = Static<T>> = Ensure<TUnionResult<Assert<UnionToTuple<{
|
|
381
|
+
[K in S]: TLiteral<K>;
|
|
382
|
+
}[S]>, TLiteral[]>>>;
|
|
383
|
+
export interface TUnion<T extends TSchema[] = TSchema[]> extends TSchema {
|
|
384
|
+
[Kind]: 'Union';
|
|
385
|
+
static: {
|
|
386
|
+
[K in keyof T]: T[K] extends TSchema ? Static<T[K], this['params']> : never;
|
|
387
|
+
}[number];
|
|
388
|
+
anyOf: T;
|
|
389
|
+
}
|
|
390
|
+
export interface Uint8ArrayOptions extends SchemaOptions {
|
|
391
|
+
maxByteLength?: number;
|
|
392
|
+
minByteLength?: number;
|
|
393
|
+
}
|
|
394
|
+
export interface TUint8Array extends TSchema, Uint8ArrayOptions {
|
|
395
|
+
[Kind]: 'Uint8Array';
|
|
396
|
+
static: Uint8Array;
|
|
397
|
+
instanceOf: 'Uint8Array';
|
|
398
|
+
type: 'object';
|
|
399
|
+
}
|
|
400
|
+
export interface TUnknown extends TSchema {
|
|
401
|
+
[Kind]: 'Unknown';
|
|
402
|
+
static: unknown;
|
|
403
|
+
}
|
|
404
|
+
export interface UnsafeOptions extends SchemaOptions {
|
|
405
|
+
[Kind]?: string;
|
|
406
|
+
}
|
|
407
|
+
export interface TUnsafe<T> extends TSchema {
|
|
408
|
+
[Kind]: string;
|
|
409
|
+
static: T;
|
|
410
|
+
}
|
|
411
|
+
export interface TVoid extends TSchema {
|
|
412
|
+
[Kind]: 'Void';
|
|
413
|
+
static: void;
|
|
414
|
+
type: 'null';
|
|
415
|
+
typeOf: 'Void';
|
|
416
|
+
}
|
|
417
|
+
/** Creates a TypeScript static type from a TypeBox type */
|
|
418
|
+
export type Static<T extends TSchema, P extends unknown[] = []> = (T & {
|
|
419
|
+
params: P;
|
|
420
|
+
})['static'];
|
|
421
|
+
export type TypeRegistryValidationFunction<TSchema> = (schema: TSchema, value: unknown) => boolean;
|
|
422
|
+
/** A registry for user defined types */
|
|
423
|
+
export declare namespace TypeRegistry {
|
|
424
|
+
/** Returns the entries in this registry */
|
|
425
|
+
function Entries(): Map<string, TypeRegistryValidationFunction<any>>;
|
|
426
|
+
/** Clears all user defined types */
|
|
427
|
+
function Clear(): void;
|
|
428
|
+
/** Returns true if this registry contains this kind */
|
|
429
|
+
function Has(kind: string): boolean;
|
|
430
|
+
/** Sets a validation function for a user defined type */
|
|
431
|
+
function Set<TSchema = unknown>(kind: string, func: TypeRegistryValidationFunction<TSchema>): void;
|
|
432
|
+
/** Gets a custom validation function for a user defined type */
|
|
433
|
+
function Get(kind: string): TypeRegistryValidationFunction<any> | undefined;
|
|
434
|
+
}
|
|
435
|
+
export type FormatRegistryValidationFunction = (value: string) => boolean;
|
|
436
|
+
/** A registry for user defined string formats */
|
|
437
|
+
export declare namespace FormatRegistry {
|
|
438
|
+
/** Returns the entries in this registry */
|
|
439
|
+
function Entries(): Map<string, FormatRegistryValidationFunction>;
|
|
440
|
+
/** Clears all user defined string formats */
|
|
441
|
+
function Clear(): void;
|
|
442
|
+
/** Returns true if the user defined string format exists */
|
|
443
|
+
function Has(format: string): boolean;
|
|
444
|
+
/** Sets a validation function for a user defined string format */
|
|
445
|
+
function Set(format: string, func: FormatRegistryValidationFunction): void;
|
|
446
|
+
/** Gets a validation function for a user defined string format */
|
|
447
|
+
function Get(format: string): FormatRegistryValidationFunction | undefined;
|
|
448
|
+
}
|
|
449
|
+
export declare class TypeGuardUnknownTypeError extends Error {
|
|
450
|
+
readonly schema: unknown;
|
|
451
|
+
constructor(schema: unknown);
|
|
452
|
+
}
|
|
453
|
+
/** Provides functions to test if JavaScript values are TypeBox types */
|
|
454
|
+
export declare namespace TypeGuard {
|
|
455
|
+
/** Returns true if the given schema is TAny */
|
|
456
|
+
function TAny(schema: unknown): schema is TAny;
|
|
457
|
+
/** Returns true if the given schema is TArray */
|
|
458
|
+
function TArray(schema: unknown): schema is TArray;
|
|
459
|
+
/** Returns true if the given schema is TBigInt */
|
|
460
|
+
function TBigInt(schema: unknown): schema is TBigInt;
|
|
461
|
+
/** Returns true if the given schema is TBoolean */
|
|
462
|
+
function TBoolean(schema: unknown): schema is TBoolean;
|
|
463
|
+
/** Returns true if the given schema is TConstructor */
|
|
464
|
+
function TConstructor(schema: unknown): schema is TConstructor;
|
|
465
|
+
/** Returns true if the given schema is TDate */
|
|
466
|
+
function TDate(schema: unknown): schema is TDate;
|
|
467
|
+
/** Returns true if the given schema is TFunction */
|
|
468
|
+
function TFunction(schema: unknown): schema is TFunction;
|
|
469
|
+
/** Returns true if the given schema is TInteger */
|
|
470
|
+
function TInteger(schema: unknown): schema is TInteger;
|
|
471
|
+
/** Returns true if the given schema is TIntersect */
|
|
472
|
+
function TIntersect(schema: unknown): schema is TIntersect;
|
|
473
|
+
/** Returns true if the given schema is TKind */
|
|
474
|
+
function TKind(schema: unknown): schema is Record<typeof Kind | string, unknown>;
|
|
475
|
+
/** Returns true if the given schema is TLiteral */
|
|
476
|
+
function TLiteral(schema: unknown): schema is TLiteral;
|
|
477
|
+
/** Returns true if the given schema is TNever */
|
|
478
|
+
function TNever(schema: unknown): schema is TNever;
|
|
479
|
+
/** Returns true if the given schema is TNot */
|
|
480
|
+
function TNot(schema: unknown): schema is TNot;
|
|
481
|
+
/** Returns true if the given schema is TNull */
|
|
482
|
+
function TNull(schema: unknown): schema is TNull;
|
|
483
|
+
/** Returns true if the given schema is TNumber */
|
|
484
|
+
function TNumber(schema: unknown): schema is TNumber;
|
|
485
|
+
/** Returns true if the given schema is TObject */
|
|
486
|
+
function TObject(schema: unknown): schema is TObject;
|
|
487
|
+
/** Returns true if the given schema is TPromise */
|
|
488
|
+
function TPromise(schema: unknown): schema is TPromise;
|
|
489
|
+
/** Returns true if the given schema is TRecord */
|
|
490
|
+
function TRecord(schema: unknown): schema is TRecord;
|
|
491
|
+
/** Returns true if the given schema is TRef */
|
|
492
|
+
function TRef(schema: unknown): schema is TRef;
|
|
493
|
+
/** Returns true if the given schema is TString */
|
|
494
|
+
function TString(schema: unknown): schema is TString;
|
|
495
|
+
/** Returns true if the given schema is TSymbol */
|
|
496
|
+
function TSymbol(schema: unknown): schema is TSymbol;
|
|
497
|
+
/** Returns true if the given schema is TTemplateLiteral */
|
|
498
|
+
function TTemplateLiteral(schema: unknown): schema is TTemplateLiteral;
|
|
499
|
+
/** Returns true if the given schema is TThis */
|
|
500
|
+
function TThis(schema: unknown): schema is TThis;
|
|
501
|
+
/** Returns true if the given schema is TTuple */
|
|
502
|
+
function TTuple(schema: unknown): schema is TTuple;
|
|
503
|
+
/** Returns true if the given schema is TUndefined */
|
|
504
|
+
function TUndefined(schema: unknown): schema is TUndefined;
|
|
505
|
+
/** Returns true if the given schema is TUnion */
|
|
506
|
+
function TUnion(schema: unknown): schema is TUnion;
|
|
507
|
+
/** Returns true if the given schema is TUnion<Literal<string>[]> */
|
|
508
|
+
function TUnionLiteral(schema: unknown): schema is TUnion<TLiteral<string>[]>;
|
|
509
|
+
/** Returns true if the given schema is TUint8Array */
|
|
510
|
+
function TUint8Array(schema: unknown): schema is TUint8Array;
|
|
511
|
+
/** Returns true if the given schema is TUnknown */
|
|
512
|
+
function TUnknown(schema: unknown): schema is TUnknown;
|
|
513
|
+
/** Returns true if the given schema is a raw TUnsafe */
|
|
514
|
+
function TUnsafe(schema: unknown): schema is TUnsafe<unknown>;
|
|
515
|
+
/** Returns true if the given schema is TVoid */
|
|
516
|
+
function TVoid(schema: unknown): schema is TVoid;
|
|
517
|
+
/** Returns true if this schema has the ReadonlyOptional modifier */
|
|
518
|
+
function TReadonlyOptional<T extends TSchema>(schema: T): schema is TReadonlyOptional<T>;
|
|
519
|
+
/** Returns true if this schema has the Readonly modifier */
|
|
520
|
+
function TReadonly<T extends TSchema>(schema: T): schema is TReadonly<T>;
|
|
521
|
+
/** Returns true if this schema has the Optional modifier */
|
|
522
|
+
function TOptional<T extends TSchema>(schema: T): schema is TOptional<T>;
|
|
523
|
+
/** Returns true if the given schema is TSchema */
|
|
524
|
+
function TSchema(schema: unknown): schema is TSchema;
|
|
525
|
+
}
|
|
526
|
+
/** Fast undefined check used for properties of type undefined */
|
|
527
|
+
export declare namespace ExtendsUndefined {
|
|
528
|
+
function Check(schema: TSchema): boolean;
|
|
529
|
+
}
|
|
530
|
+
export declare enum TypeExtendsResult {
|
|
531
|
+
Union = 0,
|
|
532
|
+
True = 1,
|
|
533
|
+
False = 2
|
|
534
|
+
}
|
|
535
|
+
export declare namespace TypeExtends {
|
|
536
|
+
function Extends(left: TSchema, right: TSchema): TypeExtendsResult;
|
|
537
|
+
}
|
|
538
|
+
/** Specialized Clone for Types */
|
|
539
|
+
export declare namespace TypeClone {
|
|
540
|
+
/** Clones a type. */
|
|
541
|
+
function Clone<T extends TSchema>(schema: T, options: SchemaOptions): T;
|
|
542
|
+
}
|
|
543
|
+
export declare namespace ObjectMap {
|
|
544
|
+
function Map<T = TSchema>(schema: TSchema, callback: (object: TObject) => TObject, options: SchemaOptions): T;
|
|
545
|
+
}
|
|
546
|
+
export declare namespace KeyResolver {
|
|
547
|
+
function Resolve<T extends TSchema>(schema: T): string[];
|
|
548
|
+
}
|
|
549
|
+
export declare namespace TemplateLiteralPattern {
|
|
550
|
+
function Create(kinds: TTemplateLiteralKind[]): string;
|
|
551
|
+
}
|
|
552
|
+
export declare namespace TemplateLiteralResolver {
|
|
553
|
+
function Resolve(template: TTemplateLiteral): TString | TUnion | TLiteral;
|
|
554
|
+
}
|
|
555
|
+
export declare class TemplateLiteralParserError extends Error {
|
|
556
|
+
constructor(message: string);
|
|
557
|
+
}
|
|
558
|
+
export declare namespace TemplateLiteralParser {
|
|
559
|
+
type Expression = And | Or | Const;
|
|
560
|
+
type Const = {
|
|
561
|
+
type: 'const';
|
|
562
|
+
const: string;
|
|
563
|
+
};
|
|
564
|
+
type And = {
|
|
565
|
+
type: 'and';
|
|
566
|
+
expr: Expression[];
|
|
567
|
+
};
|
|
568
|
+
type Or = {
|
|
569
|
+
type: 'or';
|
|
570
|
+
expr: Expression[];
|
|
571
|
+
};
|
|
572
|
+
/** Parses a pattern and returns an expression tree */
|
|
573
|
+
function Parse(pattern: string): Expression;
|
|
574
|
+
/** Parses a pattern and strips forward and trailing ^ and $ */
|
|
575
|
+
function ParseExact(pattern: string): Expression;
|
|
576
|
+
}
|
|
577
|
+
export declare namespace TemplateLiteralFinite {
|
|
578
|
+
function Check(expression: TemplateLiteralParser.Expression): boolean;
|
|
579
|
+
}
|
|
580
|
+
export declare namespace TemplateLiteralGenerator {
|
|
581
|
+
function Generate(expression: TemplateLiteralParser.Expression): IterableIterator<string>;
|
|
582
|
+
}
|
|
583
|
+
export declare class TypeBuilder {
|
|
584
|
+
/** `[Utility]` Creates a schema without `static` and `params` types */
|
|
585
|
+
protected Create<T>(schema: Omit<T, 'static' | 'params'>): T;
|
|
586
|
+
/** `[Standard]` Omits compositing symbols from this schema */
|
|
587
|
+
Strict<T extends TSchema>(schema: T): T;
|
|
588
|
+
}
|
|
589
|
+
export declare class StandardTypeBuilder extends TypeBuilder {
|
|
590
|
+
/** `[Modifier]` Creates a Optional property */
|
|
591
|
+
Optional<T extends TSchema>(schema: T): TOptional<T>;
|
|
592
|
+
/** `[Modifier]` Creates a ReadonlyOptional property */
|
|
593
|
+
ReadonlyOptional<T extends TSchema>(schema: T): TReadonlyOptional<T>;
|
|
594
|
+
/** `[Modifier]` Creates a Readonly object or property */
|
|
595
|
+
Readonly<T extends TSchema>(schema: T): TReadonly<T>;
|
|
596
|
+
/** `[Standard]` Creates an Any type */
|
|
597
|
+
Any(options?: SchemaOptions): TAny;
|
|
598
|
+
/** `[Standard]` Creates an Array type */
|
|
599
|
+
Array<T extends TSchema>(items: T, options?: ArrayOptions): TArray<T>;
|
|
600
|
+
/** `[Standard]` Creates a Boolean type */
|
|
601
|
+
Boolean(options?: SchemaOptions): TBoolean;
|
|
602
|
+
/** `[Standard]` Creates a Composite object type. */
|
|
603
|
+
Composite<T extends TObject[]>(objects: [...T], options?: ObjectOptions): TComposite<T>;
|
|
604
|
+
/** `[Standard]` Creates a Enum type */
|
|
605
|
+
Enum<T extends Record<string, string | number>>(item: T, options?: SchemaOptions): TEnum<T>;
|
|
606
|
+
/** `[Standard]` A conditional type expression that will return the true type if the left type extends the right */
|
|
607
|
+
Extends<L extends TSchema, R extends TSchema, T extends TSchema, U extends TSchema>(left: L, right: R, trueType: T, falseType: U, options?: SchemaOptions): TExtends<L, R, T, U>;
|
|
608
|
+
/** `[Standard]` Excludes from the left type any type that is not assignable to the right */
|
|
609
|
+
Exclude<L extends TSchema, R extends TSchema>(left: L, right: R, options?: SchemaOptions): TExclude<L, R>;
|
|
610
|
+
/** `[Standard]` Extracts from the left type any type that is assignable to the right */
|
|
611
|
+
Extract<L extends TSchema, R extends TSchema>(left: L, right: R, options?: SchemaOptions): TExtract<L, R>;
|
|
612
|
+
/** `[Standard]` Creates an Integer type */
|
|
613
|
+
Integer(options?: NumericOptions<number>): TInteger;
|
|
614
|
+
/** `[Standard]` Creates a Intersect type */
|
|
615
|
+
Intersect(allOf: [], options?: SchemaOptions): TNever;
|
|
616
|
+
/** `[Standard]` Creates a Intersect type */
|
|
617
|
+
Intersect<T extends [TSchema]>(allOf: [...T], options?: SchemaOptions): T[0];
|
|
618
|
+
Intersect<T extends TSchema[]>(allOf: [...T], options?: IntersectOptions): TIntersect<T>;
|
|
619
|
+
/** `[Standard]` Creates a KeyOf type */
|
|
620
|
+
KeyOf<T extends TSchema>(schema: T, options?: SchemaOptions): TKeyOf<T>;
|
|
621
|
+
/** `[Standard]` Creates a Literal type */
|
|
622
|
+
Literal<T extends TLiteralValue>(value: T, options?: SchemaOptions): TLiteral<T>;
|
|
623
|
+
/** `[Standard]` Creates a Never type */
|
|
624
|
+
Never(options?: SchemaOptions): TNever;
|
|
625
|
+
/** `[Standard]` Creates a Not type. The first argument is the disallowed type, the second is the allowed. */
|
|
626
|
+
Not<N extends TSchema, T extends TSchema>(not: N, schema: T, options?: SchemaOptions): TNot<N, T>;
|
|
627
|
+
/** `[Standard]` Creates a Null type */
|
|
628
|
+
Null(options?: SchemaOptions): TNull;
|
|
629
|
+
/** `[Standard]` Creates a Number type */
|
|
630
|
+
Number(options?: NumericOptions<number>): TNumber;
|
|
631
|
+
/** `[Standard]` Creates an Object type */
|
|
632
|
+
Object<T extends TProperties>(properties: T, options?: ObjectOptions): TObject<T>;
|
|
633
|
+
/** `[Standard]` Creates a mapped type whose keys are omitted from the given type */
|
|
634
|
+
Omit<T extends TSchema, K extends (keyof Static<T>)[]>(schema: T, keys: readonly [...K], options?: SchemaOptions): TOmit<T, K[number]>;
|
|
635
|
+
/** `[Standard]` Creates a mapped type whose keys are omitted from the given type */
|
|
636
|
+
Omit<T extends TSchema, K extends TUnion<TLiteral<string>[]>>(schema: T, keys: K, options?: SchemaOptions): TOmit<T, TUnionOfLiteral<K>>;
|
|
637
|
+
/** `[Standard]` Creates a mapped type whose keys are omitted from the given type */
|
|
638
|
+
Omit<T extends TSchema, K extends TLiteral<string>>(schema: T, key: K, options?: SchemaOptions): TOmit<T, K['const']>;
|
|
639
|
+
/** `[Standard]` Creates a mapped type whose keys are omitted from the given type */
|
|
640
|
+
Omit<T extends TSchema, K extends TNever>(schema: T, key: K, options?: SchemaOptions): TOmit<T, never>;
|
|
641
|
+
/** `[Standard]` Creates a mapped type where all properties are Optional */
|
|
642
|
+
Partial<T extends TSchema>(schema: T, options?: ObjectOptions): TPartial<T>;
|
|
643
|
+
/** `[Standard]` Creates a mapped type whose keys are picked from the given type */
|
|
644
|
+
Pick<T extends TSchema, K extends (keyof Static<T>)[]>(schema: T, keys: readonly [...K], options?: SchemaOptions): TPick<T, K[number]>;
|
|
645
|
+
/** `[Standard]` Creates a mapped type whose keys are picked from the given type */
|
|
646
|
+
Pick<T extends TSchema, K extends TUnion<TLiteral<string>[]>>(schema: T, keys: K, options?: SchemaOptions): TPick<T, TUnionOfLiteral<K>>;
|
|
647
|
+
/** `[Standard]` Creates a mapped type whose keys are picked from the given type */
|
|
648
|
+
Pick<T extends TSchema, K extends TLiteral<string>>(schema: T, key: K, options?: SchemaOptions): TPick<T, K['const']>;
|
|
649
|
+
/** `[Standard]` Creates a mapped type whose keys are picked from the given type */
|
|
650
|
+
Pick<T extends TSchema, K extends TNever>(schema: T, key: K, options?: SchemaOptions): TPick<T, never>;
|
|
651
|
+
/** `[Standard]` Creates a Record type */
|
|
652
|
+
Record<K extends TUnion<TLiteral<string | number>[]>, T extends TSchema>(key: K, schema: T, options?: ObjectOptions): RecordUnionLiteralType<K, T>;
|
|
653
|
+
/** `[Standard]` Creates a Record type */
|
|
654
|
+
Record<K extends TLiteral<string | number>, T extends TSchema>(key: K, schema: T, options?: ObjectOptions): RecordLiteralType<K, T>;
|
|
655
|
+
/** `[Standard]` Creates a Record type */
|
|
656
|
+
Record<K extends TTemplateLiteral, T extends TSchema>(key: K, schema: T, options?: ObjectOptions): RecordTemplateLiteralType<K, T>;
|
|
657
|
+
/** `[Standard]` Creates a Record type */
|
|
658
|
+
Record<K extends TInteger | TNumber, T extends TSchema>(key: K, schema: T, options?: ObjectOptions): RecordNumberType<K, T>;
|
|
659
|
+
/** `[Standard]` Creates a Record type */
|
|
660
|
+
Record<K extends TString, T extends TSchema>(key: K, schema: T, options?: ObjectOptions): RecordStringType<K, T>;
|
|
661
|
+
/** `[Standard]` Creates a Recursive type */
|
|
662
|
+
Recursive<T extends TSchema>(callback: (thisType: TThis) => T, options?: SchemaOptions): TRecursive<T>;
|
|
663
|
+
/** `[Standard]` Creates a Ref type. The referenced type must contain a $id */
|
|
664
|
+
Ref<T extends TSchema>(schema: T, options?: SchemaOptions): TRef<T>;
|
|
665
|
+
/** `[Standard]` Creates a mapped type where all properties are Required */
|
|
666
|
+
Required<T extends TSchema>(schema: T, options?: SchemaOptions): TRequired<T>;
|
|
667
|
+
/** `[Standard]` Creates a String type */
|
|
668
|
+
String<Format extends string>(options?: StringOptions<StringFormatOption | Format>): TString<Format>;
|
|
669
|
+
/** `[Standard]` Creates a template literal type */
|
|
670
|
+
TemplateLiteral<T extends TTemplateLiteralKind[]>(kinds: [...T], options?: SchemaOptions): TTemplateLiteral<T>;
|
|
671
|
+
/** `[Standard]` Creates a Tuple type */
|
|
672
|
+
Tuple<T extends TSchema[]>(items: [...T], options?: SchemaOptions): TTuple<T>;
|
|
673
|
+
/** `[Standard]` Creates a Union type */
|
|
674
|
+
Union(anyOf: [], options?: SchemaOptions): TNever;
|
|
675
|
+
/** `[Standard]` Creates a Union type */
|
|
676
|
+
Union<T extends [TSchema]>(anyOf: [...T], options?: SchemaOptions): T[0];
|
|
677
|
+
/** `[Standard]` Creates a Union type */
|
|
678
|
+
Union<T extends TSchema[]>(anyOf: [...T], options?: SchemaOptions): TUnion<T>;
|
|
679
|
+
/** `[Experimental]` Remaps a TemplateLiteral into a Union representation. This function is known to cause TS compiler crashes for finite templates with large generation counts. Use with caution. */
|
|
680
|
+
Union<T extends TTemplateLiteral>(template: T): TUnionTemplateLiteral<T>;
|
|
681
|
+
/** `[Standard]` Creates an Unknown type */
|
|
682
|
+
Unknown(options?: SchemaOptions): TUnknown;
|
|
683
|
+
/** `[Standard]` Creates a Unsafe type that infers for the generic argument */
|
|
684
|
+
Unsafe<T>(options?: UnsafeOptions): TUnsafe<T>;
|
|
685
|
+
}
|
|
686
|
+
export declare class ExtendedTypeBuilder extends StandardTypeBuilder {
|
|
687
|
+
/** `[Extended]` Creates a BigInt type */
|
|
688
|
+
BigInt(options?: NumericOptions<bigint>): TBigInt;
|
|
689
|
+
/** `[Extended]` Extracts the ConstructorParameters from the given Constructor type */
|
|
690
|
+
ConstructorParameters<T extends TConstructor<any[], any>>(schema: T, options?: SchemaOptions): TConstructorParameters<T>;
|
|
691
|
+
/** `[Extended]` Creates a Constructor type */
|
|
692
|
+
Constructor<T extends TTuple<TSchema[]>, U extends TSchema>(parameters: T, returns: U, options?: SchemaOptions): TConstructor<TTupleIntoArray<T>, U>;
|
|
693
|
+
/** `[Extended]` Creates a Constructor type */
|
|
694
|
+
Constructor<T extends TSchema[], U extends TSchema>(parameters: [...T], returns: U, options?: SchemaOptions): TConstructor<T, U>;
|
|
695
|
+
/** `[Extended]` Creates a Date type */
|
|
696
|
+
Date(options?: DateOptions): TDate;
|
|
697
|
+
/** `[Extended]` Creates a Function type */
|
|
698
|
+
Function<T extends TTuple<TSchema[]>, U extends TSchema>(parameters: T, returns: U, options?: SchemaOptions): TFunction<TTupleIntoArray<T>, U>;
|
|
699
|
+
/** `[Extended]` Creates a Function type */
|
|
700
|
+
Function<T extends TSchema[], U extends TSchema>(parameters: [...T], returns: U, options?: SchemaOptions): TFunction<T, U>;
|
|
701
|
+
/** `[Extended]` Extracts the InstanceType from the given Constructor */
|
|
702
|
+
InstanceType<T extends TConstructor<any[], any>>(schema: T, options?: SchemaOptions): TInstanceType<T>;
|
|
703
|
+
/** `[Extended]` Extracts the Parameters from the given Function type */
|
|
704
|
+
Parameters<T extends TFunction<any[], any>>(schema: T, options?: SchemaOptions): TParameters<T>;
|
|
705
|
+
/** `[Extended]` Creates a Promise type */
|
|
706
|
+
Promise<T extends TSchema>(item: T, options?: SchemaOptions): TPromise<T>;
|
|
707
|
+
/** `[Extended]` Creates a regular expression type */
|
|
708
|
+
RegEx(regex: RegExp, options?: SchemaOptions): TString;
|
|
709
|
+
/** `[Extended]` Extracts the ReturnType from the given Function */
|
|
710
|
+
ReturnType<T extends TFunction<any[], any>>(schema: T, options?: SchemaOptions): TReturnType<T>;
|
|
711
|
+
/** `[Extended]` Creates a Symbol type */
|
|
712
|
+
Symbol(options?: SchemaOptions): TSymbol;
|
|
713
|
+
/** `[Extended]` Creates a Undefined type */
|
|
714
|
+
Undefined(options?: SchemaOptions): TUndefined;
|
|
715
|
+
/** `[Extended]` Creates a Uint8Array type */
|
|
716
|
+
Uint8Array(options?: Uint8ArrayOptions): TUint8Array;
|
|
717
|
+
/** `[Extended]` Creates a Void type */
|
|
718
|
+
Void(options?: SchemaOptions): TVoid;
|
|
719
|
+
}
|
|
720
|
+
/** JSON Schema TypeBuilder with Static Resolution for TypeScript */
|
|
721
|
+
export declare const StandardType: StandardTypeBuilder;
|
|
722
|
+
/** JSON Schema TypeBuilder with Static Resolution for TypeScript */
|
|
723
|
+
export declare const Type: ExtendedTypeBuilder;
|