type-plus 6.5.0 → 6.6.0
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/README.md +27 -15
- package/cjs/any/any_or_never.d.ts +0 -2
- package/cjs/any/any_or_never.d.ts.map +1 -1
- package/cjs/any/any_type.d.ts +2 -6
- package/cjs/any/any_type.d.ts.map +1 -1
- package/cjs/array/array.d.ts +0 -4
- package/cjs/array/array.d.ts.map +1 -1
- package/cjs/array/array_index.d.ts +7 -10
- package/cjs/array/array_index.d.ts.map +1 -1
- package/cjs/array/array_type.d.ts +0 -8
- package/cjs/array/array_type.d.ts.map +1 -1
- package/cjs/bigint/bigint_type.d.ts +4 -12
- package/cjs/bigint/bigint_type.d.ts.map +1 -1
- package/cjs/bigint/strict_bigint_type.d.ts +4 -12
- package/cjs/bigint/strict_bigint_type.d.ts.map +1 -1
- package/cjs/boolean/boolean_type.d.ts +0 -8
- package/cjs/boolean/boolean_type.d.ts.map +1 -1
- package/cjs/boolean/false_type.d.ts +0 -8
- package/cjs/boolean/false_type.d.ts.map +1 -1
- package/cjs/boolean/strict_boolean_type.d.ts +0 -8
- package/cjs/boolean/strict_boolean_type.d.ts.map +1 -1
- package/cjs/boolean/true_type.d.ts +0 -8
- package/cjs/boolean/true_type.d.ts.map +1 -1
- package/cjs/equal/equal.d.ts +4 -5
- package/cjs/equal/equal.d.ts.map +1 -1
- package/cjs/function/function_type.d.ts +0 -8
- package/cjs/function/function_type.d.ts.map +1 -1
- package/cjs/function/strict_function_type.d.ts +0 -8
- package/cjs/function/strict_function_type.d.ts.map +1 -1
- package/cjs/index.d.ts +2 -0
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/never/never_type.d.ts +2 -10
- package/cjs/never/never_type.d.ts.map +1 -1
- package/cjs/null/null_type.d.ts +4 -12
- package/cjs/null/null_type.d.ts.map +1 -1
- package/cjs/number/integer.d.ts +1 -9
- package/cjs/number/integer.d.ts.map +1 -1
- package/cjs/number/negative.d.ts +0 -8
- package/cjs/number/negative.d.ts.map +1 -1
- package/cjs/number/number_type.d.ts +0 -8
- package/cjs/number/number_type.d.ts.map +1 -1
- package/cjs/number/numeric_type.d.ts +0 -8
- package/cjs/number/numeric_type.d.ts.map +1 -1
- package/cjs/number/positive.d.ts +1 -9
- package/cjs/number/positive.d.ts.map +1 -1
- package/cjs/number/strict_number_type.d.ts +4 -12
- package/cjs/number/strict_number_type.d.ts.map +1 -1
- package/cjs/object/object_type.d.ts +1 -9
- package/cjs/object/object_type.d.ts.map +1 -1
- package/cjs/string/strict_string_type.d.ts +14 -19
- package/cjs/string/strict_string_type.d.ts.map +1 -1
- package/cjs/string/string.d.ts +24 -0
- package/cjs/string/string.d.ts.map +1 -0
- package/cjs/string/string.js +3 -0
- package/cjs/string/string.js.map +1 -0
- package/cjs/string/string_plus.d.ts +27 -0
- package/cjs/string/string_plus.d.ts.map +1 -0
- package/cjs/string/string_plus.js +3 -0
- package/cjs/string/string_plus.js.map +1 -0
- package/cjs/string/string_type.d.ts +4 -12
- package/cjs/string/string_type.d.ts.map +1 -1
- package/cjs/symbol/symbol_type.d.ts +5 -15
- package/cjs/symbol/symbol_type.d.ts.map +1 -1
- package/cjs/tuple/tuple_type.d.ts +0 -8
- package/cjs/tuple/tuple_type.d.ts.map +1 -1
- package/cjs/type/failed.d.ts +2 -3
- package/cjs/type/failed.d.ts.map +1 -1
- package/cjs/type/failed.js +0 -1
- package/cjs/type/failed.js.map +1 -1
- package/cjs/undefined/undefined_type.d.ts +4 -12
- package/cjs/undefined/undefined_type.d.ts.map +1 -1
- package/cjs/unknown/unknown_type.d.ts +4 -12
- package/cjs/unknown/unknown_type.d.ts.map +1 -1
- package/cjs/void/void_type.d.ts +0 -8
- package/cjs/void/void_type.d.ts.map +1 -1
- package/esm/any/any_or_never.d.ts +0 -2
- package/esm/any/any_or_never.d.ts.map +1 -1
- package/esm/any/any_type.d.ts +2 -6
- package/esm/any/any_type.d.ts.map +1 -1
- package/esm/array/array.d.ts +0 -4
- package/esm/array/array.d.ts.map +1 -1
- package/esm/array/array_index.d.ts +7 -10
- package/esm/array/array_index.d.ts.map +1 -1
- package/esm/array/array_type.d.ts +0 -8
- package/esm/array/array_type.d.ts.map +1 -1
- package/esm/bigint/bigint_type.d.ts +4 -12
- package/esm/bigint/bigint_type.d.ts.map +1 -1
- package/esm/bigint/strict_bigint_type.d.ts +4 -12
- package/esm/bigint/strict_bigint_type.d.ts.map +1 -1
- package/esm/boolean/boolean_type.d.ts +0 -8
- package/esm/boolean/boolean_type.d.ts.map +1 -1
- package/esm/boolean/false_type.d.ts +0 -8
- package/esm/boolean/false_type.d.ts.map +1 -1
- package/esm/boolean/strict_boolean_type.d.ts +0 -8
- package/esm/boolean/strict_boolean_type.d.ts.map +1 -1
- package/esm/boolean/true_type.d.ts +0 -8
- package/esm/boolean/true_type.d.ts.map +1 -1
- package/esm/equal/equal.d.ts +4 -5
- package/esm/equal/equal.d.ts.map +1 -1
- package/esm/function/function_type.d.ts +0 -8
- package/esm/function/function_type.d.ts.map +1 -1
- package/esm/function/strict_function_type.d.ts +0 -8
- package/esm/function/strict_function_type.d.ts.map +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/never/never_type.d.ts +2 -10
- package/esm/never/never_type.d.ts.map +1 -1
- package/esm/null/null_type.d.ts +4 -12
- package/esm/null/null_type.d.ts.map +1 -1
- package/esm/number/integer.d.ts +1 -9
- package/esm/number/integer.d.ts.map +1 -1
- package/esm/number/negative.d.ts +0 -8
- package/esm/number/negative.d.ts.map +1 -1
- package/esm/number/number_type.d.ts +0 -8
- package/esm/number/number_type.d.ts.map +1 -1
- package/esm/number/numeric_type.d.ts +0 -8
- package/esm/number/numeric_type.d.ts.map +1 -1
- package/esm/number/positive.d.ts +1 -9
- package/esm/number/positive.d.ts.map +1 -1
- package/esm/number/strict_number_type.d.ts +4 -12
- package/esm/number/strict_number_type.d.ts.map +1 -1
- package/esm/object/object_type.d.ts +1 -9
- package/esm/object/object_type.d.ts.map +1 -1
- package/esm/string/strict_string_type.d.ts +14 -19
- package/esm/string/strict_string_type.d.ts.map +1 -1
- package/esm/string/string.d.ts +24 -0
- package/esm/string/string.d.ts.map +1 -0
- package/esm/string/string.js +2 -0
- package/esm/string/string.js.map +1 -0
- package/esm/string/string_plus.d.ts +27 -0
- package/esm/string/string_plus.d.ts.map +1 -0
- package/esm/string/string_plus.js +2 -0
- package/esm/string/string_plus.js.map +1 -0
- package/esm/string/string_type.d.ts +4 -12
- package/esm/string/string_type.d.ts.map +1 -1
- package/esm/symbol/symbol_type.d.ts +5 -15
- package/esm/symbol/symbol_type.d.ts.map +1 -1
- package/esm/tuple/tuple_type.d.ts +0 -8
- package/esm/tuple/tuple_type.d.ts.map +1 -1
- package/esm/type/failed.d.ts +2 -3
- package/esm/type/failed.d.ts.map +1 -1
- package/esm/type/failed.js +1 -1
- package/esm/type/failed.js.map +1 -1
- package/esm/undefined/undefined_type.d.ts +4 -12
- package/esm/undefined/undefined_type.d.ts.map +1 -1
- package/esm/unknown/unknown_type.d.ts +4 -12
- package/esm/unknown/unknown_type.d.ts.map +1 -1
- package/esm/void/void_type.d.ts +0 -8
- package/esm/void/void_type.d.ts.map +1 -1
- package/package.json +2 -2
- package/ts/any/any_or_never.ts +0 -2
- package/ts/any/any_type.ts +2 -6
- package/ts/array/array.ts +0 -4
- package/ts/array/array_index.ts +7 -10
- package/ts/array/array_type.ts +0 -8
- package/ts/bigint/bigint_type.ts +4 -12
- package/ts/bigint/strict_bigint_type.ts +4 -12
- package/ts/boolean/boolean_type.ts +0 -8
- package/ts/boolean/false_type.ts +0 -8
- package/ts/boolean/strict_boolean_type.ts +0 -8
- package/ts/boolean/true_type.ts +0 -8
- package/ts/equal/equal.ts +9 -5
- package/ts/equal/readme.md +3 -0
- package/ts/function/function_type.ts +0 -8
- package/ts/function/strict_function_type.ts +0 -8
- package/ts/index.ts +2 -0
- package/ts/never/never_type.ts +2 -10
- package/ts/null/null_type.ts +4 -12
- package/ts/number/integer.ts +1 -9
- package/ts/number/negative.ts +0 -8
- package/ts/number/number_type.ts +0 -8
- package/ts/number/numeric_type.ts +0 -8
- package/ts/number/positive.ts +1 -9
- package/ts/number/strict_number_type.ts +4 -12
- package/ts/object/object_type.ts +1 -9
- package/ts/string/readme.md +5 -0
- package/ts/string/strict_string_type.ts +15 -19
- package/ts/string/string.ts +36 -0
- package/ts/string/string_plus.ts +33 -0
- package/ts/string/string_type.ts +4 -12
- package/ts/symbol/symbol_type.ts +5 -17
- package/ts/tuple/tuple_type.ts +0 -8
- package/ts/type/failed.ts +1 -3
- package/ts/type/readme.md +22 -0
- package/ts/undefined/undefined_type.ts +4 -12
- package/ts/unknown/unknown_type.ts +4 -12
- package/ts/void/void_type.ts +0 -8
- package/cjs/type/constants.d.ts +0 -5
- package/cjs/type/constants.d.ts.map +0 -1
- package/cjs/type/constants.js +0 -8
- package/cjs/type/constants.js.map +0 -1
- package/esm/type/constants.d.ts +0 -5
- package/esm/type/constants.d.ts.map +0 -1
- package/esm/type/constants.js +0 -5
- package/esm/type/constants.js.map +0 -1
- package/ts/type/constants.ts +0 -4
package/README.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# type-plus
|
|
2
2
|
|
|
3
|
-
[![NPM version][
|
|
4
|
-
[![NPM downloads][
|
|
3
|
+
[![NPM version][npm_image]][npm_url]
|
|
4
|
+
[![NPM downloads][downloads_image]][npm_url]
|
|
5
5
|
|
|
6
|
-
[![
|
|
7
|
-
[![Codecov][
|
|
6
|
+
[![Release][github_release]][github_action_url]
|
|
7
|
+
[![Codecov][codecov_image]][codecov_url]
|
|
8
8
|
|
|
9
|
-
[![Visual Studio Code][
|
|
9
|
+
[![Visual Studio Code][vscode_image]][vscode_url]
|
|
10
|
+
[![Wallaby.js][wallaby_image]][wallaby_url]
|
|
10
11
|
|
|
11
12
|
Advance type utilities for [TypeScript].
|
|
12
13
|
|
|
@@ -683,18 +684,26 @@ git push
|
|
|
683
684
|
# create PR
|
|
684
685
|
```
|
|
685
686
|
|
|
687
|
+
## Wallaby.js
|
|
688
|
+
|
|
689
|
+
[![Wallaby.js][wallaby_image_lg]][wallaby_url]
|
|
690
|
+
|
|
691
|
+
This repository contributors are welcome to use
|
|
692
|
+
[Wallaby.js OSS License][wallaby_url] to get
|
|
693
|
+
test results immediately as you type, and see the results in
|
|
694
|
+
your editor right next to your code.
|
|
695
|
+
|
|
686
696
|
[@gcanti]: https://github.com/gcanti
|
|
687
697
|
[assertion_function]: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions
|
|
688
|
-
[
|
|
689
|
-
[
|
|
690
|
-
[
|
|
691
|
-
[downloads-url]: https://npmjs.org/package/type-plus
|
|
698
|
+
[codecov_image]: https://codecov.io/gh/unional/type-plus/branch/master/graph/badge.svg
|
|
699
|
+
[codecov_url]: https://codecov.io/gh/unional/type-plus
|
|
700
|
+
[downloads_image]: https://img.shields.io/npm/dm/type-plus.svg?style=flat
|
|
692
701
|
[expect-type]: https://github.com/mmkal/expect-type
|
|
693
|
-
[
|
|
694
|
-
[
|
|
702
|
+
[github_action_url]: https://github.com/unional/type-plus/actions
|
|
703
|
+
[github_release]: https://github.com/unional/type-plus/workflows/release/badge.svg
|
|
695
704
|
[hotscript]: https://github.com/gvergnaud/hotscript
|
|
696
|
-
[
|
|
697
|
-
[
|
|
705
|
+
[npm_image]: https://img.shields.io/npm/v/type-plus.svg?style=flat
|
|
706
|
+
[npm_url]: https://npmjs.org/package/type-plus
|
|
698
707
|
[spec.ts]: https://github.com/aleclarson/spec.ts
|
|
699
708
|
[ts-essentials]: https://github.com/ts-essentials/ts-essentials
|
|
700
709
|
[ts-expect]: https://github.com/TypeStrong/ts-expect
|
|
@@ -707,5 +716,8 @@ git push
|
|
|
707
716
|
[TypeScript]: https://www.typescriptlang.org
|
|
708
717
|
[typical]: https://github.com/KiaraGrouwstra/typical
|
|
709
718
|
[utility-types]: https://github.com/piotrwitek/utility-types
|
|
710
|
-
[
|
|
711
|
-
[
|
|
719
|
+
[vscode_image]: https://img.shields.io/badge/vscode-ready-green.svg
|
|
720
|
+
[vscode_url]: https://code.visualstudio.com/
|
|
721
|
+
[wallaby_image]: https://img.shields.io/badge/wallaby.js-powered-blue.svg?style=flat&logo=github
|
|
722
|
+
[wallaby_image_lg]: https://img.shields.io/badge/wallaby.js-powered-blue.svg?style=for-the-badge&logo=github
|
|
723
|
+
[wallaby_url]: https://wallabyjs.com/oss/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"any_or_never.d.ts","sourceRoot":"","sources":["../../ts/any/any_or_never.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C
|
|
1
|
+
{"version":3,"file":"any_or_never.d.ts","sourceRoot":"","sources":["../../ts/any/any_or_never.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA"}
|
package/cjs/any/any_type.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Check if the type `T` is exactly `any`.
|
|
3
3
|
*
|
|
4
|
-
* ```
|
|
5
|
-
* import type { AnyType } from 'type-plus'
|
|
6
|
-
*
|
|
4
|
+
* ```ts
|
|
7
5
|
* type R = AnyType<any> // any
|
|
8
6
|
*
|
|
9
7
|
* type R = AnyType<never> // never
|
|
@@ -15,9 +13,7 @@ export type AnyType<T, Then = T, Else = never> = 0 extends 1 & T ? Then : Else;
|
|
|
15
13
|
/**
|
|
16
14
|
* Is the type `T` exactly `any`.
|
|
17
15
|
*
|
|
18
|
-
* ```
|
|
19
|
-
* import type { IsAny } from 'type-plus'
|
|
20
|
-
*
|
|
16
|
+
* ```ts
|
|
21
17
|
* type R = IsAny<any> // true
|
|
22
18
|
*
|
|
23
19
|
* type R = IsAny<never> // false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"any_type.d.ts","sourceRoot":"","sources":["../../ts/any/any_type.ts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"any_type.d.ts","sourceRoot":"","sources":["../../ts/any/any_type.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAExE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE1E;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
package/cjs/array/array.d.ts
CHANGED
|
@@ -8,8 +8,6 @@ import type { IndexAt } from './array_index.js';
|
|
|
8
8
|
* @see https://github.com/microsoft/TypeScript/issues/53345#issuecomment-1477138167
|
|
9
9
|
*
|
|
10
10
|
* ```ts
|
|
11
|
-
* import type { At } from 'type-plus'
|
|
12
|
-
*
|
|
13
11
|
* type R = At<[1, 2, 3], 2> // 3
|
|
14
12
|
* type R = At<[1, 2, 3], -1> // 3
|
|
15
13
|
* ```
|
|
@@ -23,8 +21,6 @@ export type At<A extends unknown[], N extends number, Fail = never> = IndexAt<A,
|
|
|
23
21
|
* @alias ArrayPlus.Concat
|
|
24
22
|
*
|
|
25
23
|
* ```ts
|
|
26
|
-
* import type { Concat } form 'type-plus'
|
|
27
|
-
*
|
|
28
24
|
* type R = Concat<[1], [2, 3]> // [1, 2, 3]
|
|
29
25
|
* ```
|
|
30
26
|
*/
|
package/cjs/array/array.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../ts/array/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE/C
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../ts/array/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE/C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,EAAE,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,MAAM,CAAC,GACtG,CAAC,SAAS,MAAM,GACf,CAAC,CAAC,CAAC,CAAC,GACJ,IAAI,GACL,KAAK,CAAA;AAER;;;;;;;;;;GAUG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA"}
|
|
@@ -10,28 +10,25 @@ import type { StrictNumberType } from '../number/strict_number_type.js';
|
|
|
10
10
|
/**
|
|
11
11
|
* Gets the normalized index to access the element of an array or tuple.
|
|
12
12
|
*
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* type R = ArrayPlus.IndexAt<['a', 'b', 'c'], 2> // 2
|
|
17
|
-
* type R = ArrayPlus.IndexAt<['a', 'b', 'c'], -2> // 1
|
|
13
|
+
* ```ts
|
|
14
|
+
* type R = IndexAt<['a', 'b', 'c'], 2> // 2
|
|
15
|
+
* type R = IndexAt<['a', 'b', 'c'], -2> // 1
|
|
18
16
|
*
|
|
19
|
-
* type R =
|
|
20
|
-
* type R =
|
|
17
|
+
* type R = IndexAt<['a', 'b', 'c'], 3> // never
|
|
18
|
+
* type R = IndexAt<['a', 'b', 'c'], -4> // never
|
|
21
19
|
* ```
|
|
22
20
|
*/
|
|
23
21
|
export type IndexAt<A extends Array<unknown>, N extends number, Fail = never> = Equal<A['length'], 0, Fail, Integer<N, StrictNumberType<A['length'], N, Negative<N, GreaterThan<Abs<N>, A['length']> extends true ? Fail : Subtract<A['length'], Abs<N>>, GreaterThan<A['length'], N> extends true ? N : Fail>>, IsAny<N, number, StrictNumberType<N, N>>>>;
|
|
24
22
|
/**
|
|
25
23
|
* Is N an out of bound index of A.
|
|
26
24
|
*
|
|
27
|
-
* ```
|
|
28
|
-
* import { IsIndexOutOfBound } from 'type-plus'
|
|
29
|
-
*
|
|
25
|
+
* ```ts
|
|
30
26
|
* type R = IsIndexOutOfBound<[1], 0> // false
|
|
31
27
|
* type R = IsIndexOutOfBound<[1], -1> // false
|
|
32
28
|
|
|
33
29
|
* type R = IsIndexOutOfBound<[1], 1> // true
|
|
34
30
|
* type R = IsIndexOutOfBound<[1], -2> // true
|
|
31
|
+
* ```
|
|
35
32
|
*/
|
|
36
33
|
export type IsIndexOutOfBound<A extends unknown[], N extends number, Then = true, Else = false> = IsNever<IndexAt<A, N>, Then, Else>;
|
|
37
34
|
//# sourceMappingURL=array_index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array_index.d.ts","sourceRoot":"","sources":["../../ts/array/array_index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAEvE
|
|
1
|
+
{"version":3,"file":"array_index.d.ts","sourceRoot":"","sources":["../../ts/array/array_index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,KAAK,IAAI,KAAK,CACpF,CAAC,CAAC,QAAQ,CAAC,EACX,CAAC,EACD,IAAI,EACJ,OAAO,CACN,CAAC,EACD,gBAAgB,CACf,CAAC,CAAC,QAAQ,CAAC,EAEX,CAAC,EAED,QAAQ,CACP,CAAC,EACD,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EACpF,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,IAAI,CACnD,CACD,EAED,KAAK,CACJ,CAAC,EACD,MAAM,EACN,gBAAgB,CACf,CAAC,EAED,CAAC,CACD,CACD,CACD,CACD,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CACxG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EACb,IAAI,EACJ,IAAI,CACJ,CAAA"}
|
|
@@ -4,8 +4,6 @@ import type { StrictNumberType } from '../number/strict_number_type.js';
|
|
|
4
4
|
* Check if the type `T` is an array and not a tuple.
|
|
5
5
|
*
|
|
6
6
|
* ```ts
|
|
7
|
-
* import type { ArrayType } from 'type-plus'
|
|
8
|
-
*
|
|
9
7
|
* type R = ArrayType<number[]> // number[]
|
|
10
8
|
*
|
|
11
9
|
* type R = ArrayType<[1]> // never
|
|
@@ -18,8 +16,6 @@ export type ArrayType<T, Then = T, Else = never> = IsNever<T, Else, [
|
|
|
18
16
|
* Check if the type `T` is not an array.
|
|
19
17
|
*
|
|
20
18
|
* ```ts
|
|
21
|
-
* import type { NotArrayType } from 'type-plus'
|
|
22
|
-
*
|
|
23
19
|
* type R = NotArrayType<number[]> // never
|
|
24
20
|
*
|
|
25
21
|
* type R = NotArrayType<number> // number
|
|
@@ -31,8 +27,6 @@ export type NotArrayType<T, Then = T, Else = never> = ArrayType<T, Else, Then>;
|
|
|
31
27
|
* Is `T` an array?
|
|
32
28
|
*
|
|
33
29
|
* ```ts
|
|
34
|
-
* import type { IsArray } from 'type-plus'
|
|
35
|
-
*
|
|
36
30
|
* type R = IsArray<number[]> // true
|
|
37
31
|
*
|
|
38
32
|
* type R = IsArray<number> // false
|
|
@@ -44,8 +38,6 @@ export type IsArray<T, Then = true, Else = false> = ArrayType<T, Then, Else>;
|
|
|
44
38
|
* Is `T` not an array?
|
|
45
39
|
*
|
|
46
40
|
* ```ts
|
|
47
|
-
* import type { IsNotArray } from 'type-plus'
|
|
48
|
-
*
|
|
49
41
|
* type R = IsNotArray<number[]> // false
|
|
50
42
|
*
|
|
51
43
|
* type R = IsNotArray<number> // true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array_type.d.ts","sourceRoot":"","sources":["../../ts/array/array_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAEvE
|
|
1
|
+
{"version":3,"file":"array_type.d.ts","sourceRoot":"","sources":["../../ts/array/array_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAEvE;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CACzD,CAAC,EACD,IAAI,EACJ;IAAC,GAAG,EAAE;CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CACrG,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE9E;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE5E;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -2,9 +2,7 @@ import type { IsAnyOrNever } from '../any/any_or_never.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Check if the type `T` is exactly `bigint`.
|
|
4
4
|
*
|
|
5
|
-
* ```
|
|
6
|
-
* import type { BigintType } from 'type-plus'
|
|
7
|
-
*
|
|
5
|
+
* ```ts
|
|
8
6
|
* type R = BigintType<bigint> // bigint
|
|
9
7
|
*
|
|
10
8
|
* type R = BigintType<1n> // never
|
|
@@ -17,9 +15,7 @@ export type BigintType<T, Then = T, Else = never> = IsAnyOrNever<T, Else, [T] ex
|
|
|
17
15
|
/**
|
|
18
16
|
* Is the type `T` exactly `bigint`.
|
|
19
17
|
*
|
|
20
|
-
* ```
|
|
21
|
-
* import type { IsBigint } from 'type-plus'
|
|
22
|
-
*
|
|
18
|
+
* ```ts
|
|
23
19
|
* type R = IsBigint<bigint> // true
|
|
24
20
|
*
|
|
25
21
|
* type R = IsBigint<1n> // false
|
|
@@ -32,9 +28,7 @@ export type IsBigint<T, Then = true, Else = false> = BigintType<T, Then, Else>;
|
|
|
32
28
|
/**
|
|
33
29
|
* Check if the type `T` is not exactly `null`.
|
|
34
30
|
*
|
|
35
|
-
* ```
|
|
36
|
-
* import type { NotBigintType } from 'type-plus'
|
|
37
|
-
*
|
|
31
|
+
* ```ts
|
|
38
32
|
* type R = NotBigintType<bigint> // never
|
|
39
33
|
*
|
|
40
34
|
* type R = NotBigintType<1n> // 1n
|
|
@@ -47,9 +41,7 @@ export type NotBigintType<T, Then = T, Else = never> = BigintType<T, Else, Then>
|
|
|
47
41
|
/**
|
|
48
42
|
* Is the type `T` not exactly `null`.
|
|
49
43
|
*
|
|
50
|
-
* ```
|
|
51
|
-
* import type { IsNotBigint } from 'type-plus'
|
|
52
|
-
*
|
|
44
|
+
* ```ts
|
|
53
45
|
* type R = IsNotBigint<bigint> // false
|
|
54
46
|
*
|
|
55
47
|
* type R = IsNotBigint<1n> // true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigint_type.d.ts","sourceRoot":"","sources":["../../ts/bigint/bigint_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"bigint_type.d.ts","sourceRoot":"","sources":["../../ts/bigint/bigint_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAA;AAE7G;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAEhF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -2,9 +2,7 @@ import type { IsAnyOrNever } from '../any/any_or_never.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Check if the type `T` is exactly `bigint`.
|
|
4
4
|
*
|
|
5
|
-
* ```
|
|
6
|
-
* import type { StrictBigintType } from 'type-plus'
|
|
7
|
-
*
|
|
5
|
+
* ```ts
|
|
8
6
|
* type R = StrictBigintType<bigint> // bigint
|
|
9
7
|
*
|
|
10
8
|
* type R = StrictBigintType<1n> // never
|
|
@@ -19,9 +17,7 @@ export type StrictBigintType<T, Then = T, Else = never> = IsAnyOrNever<T, Else,
|
|
|
19
17
|
/**
|
|
20
18
|
* Is the type `T` exactly `bigint`.
|
|
21
19
|
*
|
|
22
|
-
* ```
|
|
23
|
-
* import type { IsStrictBigint } from 'type-plus'
|
|
24
|
-
*
|
|
20
|
+
* ```ts
|
|
25
21
|
* type R = IsStrictBigint<bigint> // true
|
|
26
22
|
*
|
|
27
23
|
* type R = IsStrictBigint<1n> // false
|
|
@@ -34,9 +30,7 @@ export type IsStrictBigint<T, Then = true, Else = false> = StrictBigintType<T, T
|
|
|
34
30
|
/**
|
|
35
31
|
* Check if the type `T` is not exactly `bigint`.
|
|
36
32
|
*
|
|
37
|
-
* ```
|
|
38
|
-
* import type { NotStrictBigintType } from 'type-plus'
|
|
39
|
-
*
|
|
33
|
+
* ```ts
|
|
40
34
|
* type R = NotStrictBigintType<bigint> // never
|
|
41
35
|
*
|
|
42
36
|
* type R = NotStrictBigintType<1n> // 1n
|
|
@@ -49,9 +43,7 @@ export type NotStrictBigintType<T, Then = T, Else = never> = StrictBigintType<T,
|
|
|
49
43
|
/**
|
|
50
44
|
* Is the type `T` not exactly `bigint`.
|
|
51
45
|
*
|
|
52
|
-
* ```
|
|
53
|
-
* import type { IsNotStrictBigint } from 'type-plus'
|
|
54
|
-
*
|
|
46
|
+
* ```ts
|
|
55
47
|
* type R = IsNotStrictBigint<bigint> // false
|
|
56
48
|
*
|
|
57
49
|
* type R = IsNotStrictBigint<1n> // true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict_bigint_type.d.ts","sourceRoot":"","sources":["../../ts/bigint/strict_bigint_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"strict_bigint_type.d.ts","sourceRoot":"","sources":["../../ts/bigint/strict_bigint_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CACrE,CAAC,EACD,IAAI,EACJ;IAAC,MAAM;CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,SAAS,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CACxG,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE1F;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE5F;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -3,8 +3,6 @@ import type { IsAnyOrNever } from '../any/any_or_never.js';
|
|
|
3
3
|
* Check if the type `T` is `boolean`, including `true` and `false`.
|
|
4
4
|
*
|
|
5
5
|
* ```ts
|
|
6
|
-
* import type { BooleanType } from 'type-plus'
|
|
7
|
-
*
|
|
8
6
|
* type R = BooleanType<boolean> // boolean
|
|
9
7
|
* type R = BooleanType<true> // true
|
|
10
8
|
* type R = BooleanType<false> // false
|
|
@@ -20,8 +18,6 @@ export type BooleanType<T, Then = T, Else = never> = IsAnyOrNever<T, Else, [
|
|
|
20
18
|
* Check if the type `T` is not `boolean`, including `true` and `false`.
|
|
21
19
|
*
|
|
22
20
|
* ```ts
|
|
23
|
-
* import type { NotBooleanType } from 'type-plus'
|
|
24
|
-
*
|
|
25
21
|
* type R = NotBooleanType<boolean> // never
|
|
26
22
|
* type R = NotBooleanType<true> // never
|
|
27
23
|
* type R = NotBooleanType<false> // never
|
|
@@ -35,8 +31,6 @@ export type NotBooleanType<T, Then = T, Else = never> = BooleanType<T, Else, The
|
|
|
35
31
|
* Is the type `T` `boolean`, including `true` and `false`.
|
|
36
32
|
*
|
|
37
33
|
* ```ts
|
|
38
|
-
* import type { IsBoolean } from 'type-plus'
|
|
39
|
-
*
|
|
40
34
|
* type R = IsBoolean<boolean> // true
|
|
41
35
|
* type R = IsBoolean<true> // true
|
|
42
36
|
* type R = IsBoolean<false> // true
|
|
@@ -50,8 +44,6 @@ export type IsBoolean<T, Then = true, Else = false> = BooleanType<T, Then, Else>
|
|
|
50
44
|
* Is the type `T` not `boolean`, including `true` and `false`.
|
|
51
45
|
*
|
|
52
46
|
* ```ts
|
|
53
|
-
* import type { IsNotBoolean } from 'type-plus'
|
|
54
|
-
*
|
|
55
47
|
* type R = IsNotBoolean<boolean> // false
|
|
56
48
|
* type R = IsNotBoolean<true> // false
|
|
57
49
|
* type R = IsNotBoolean<false> // false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean_type.d.ts","sourceRoot":"","sources":["../../ts/boolean/boolean_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"boolean_type.d.ts","sourceRoot":"","sources":["../../ts/boolean/boolean_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CAChE,CAAC,EACD,IAAI,EACJ;IAAC,CAAC;CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,IAAI,CACnC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAElF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAEhF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -3,8 +3,6 @@ import type { IsAnyOrNever } from '../any/any_or_never.js';
|
|
|
3
3
|
* Check if the type `T` is exactly `false`.
|
|
4
4
|
*
|
|
5
5
|
* ```ts
|
|
6
|
-
* import type { FalseType } from 'type-plus'
|
|
7
|
-
*
|
|
8
6
|
* type R = FalseType<false> // false
|
|
9
7
|
*
|
|
10
8
|
* type R = FalseType<true> // never
|
|
@@ -19,8 +17,6 @@ export type FalseType<T, Then = T, Else = never> = IsAnyOrNever<T, Else, [
|
|
|
19
17
|
* Check if the type `T` is not exactly `false`.
|
|
20
18
|
*
|
|
21
19
|
* ```ts
|
|
22
|
-
* import type { NotFalseType } from 'type-plus'
|
|
23
|
-
*
|
|
24
20
|
* type R = NotFalseType<false> // never
|
|
25
21
|
*
|
|
26
22
|
* type R = NotFalseType<true> // true
|
|
@@ -32,8 +28,6 @@ export type NotFalseType<T, Then = T, Else = never> = FalseType<T, Else, Then>;
|
|
|
32
28
|
* Is the type `T` exactly `false`.
|
|
33
29
|
*
|
|
34
30
|
* ```ts
|
|
35
|
-
* import type { IsFalse } from 'type-plus'
|
|
36
|
-
*
|
|
37
31
|
* type R = IsFalse<false> // true
|
|
38
32
|
*
|
|
39
33
|
* type R = IsFalse<true> // false
|
|
@@ -45,8 +39,6 @@ export type IsFalse<T, Then = true, Else = false> = FalseType<T, Then, Else>;
|
|
|
45
39
|
* Is the type `T` not exactly `false`.
|
|
46
40
|
*
|
|
47
41
|
* ```ts
|
|
48
|
-
* import type { IsNotFalse } from 'type-plus'
|
|
49
|
-
*
|
|
50
42
|
* type R = IsNotFalse<false> // false
|
|
51
43
|
*
|
|
52
44
|
* type R = IsNotFalse<true> // true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"false_type.d.ts","sourceRoot":"","sources":["../../ts/boolean/false_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"false_type.d.ts","sourceRoot":"","sources":["../../ts/boolean/false_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CAC9D,CAAC,EACD,IAAI,EACJ;IAAC,CAAC;IAAE,KAAK;CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAC3C,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE9E;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE5E;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -3,8 +3,6 @@ import type { IsAnyOrNever } from '../any/any_or_never.js';
|
|
|
3
3
|
* Check if the type `T` is exactly `boolean`.
|
|
4
4
|
*
|
|
5
5
|
* ```ts
|
|
6
|
-
* import type { StrictBooleanType } from 'type-plus'
|
|
7
|
-
*
|
|
8
6
|
* type R = StrictBooleanType<boolean> // true
|
|
9
7
|
*
|
|
10
8
|
* type R = StrictBooleanType<true> // never
|
|
@@ -20,8 +18,6 @@ export type StrictBooleanType<T, Then = T, Else = never> = IsAnyOrNever<T, Else,
|
|
|
20
18
|
* Check if the type `T` is not exactly `boolean`.
|
|
21
19
|
*
|
|
22
20
|
* ```ts
|
|
23
|
-
* import type { NotStrictBooleanType } from 'type-plus'
|
|
24
|
-
*
|
|
25
21
|
* type R = NotStrictBooleanType<boolean> // never
|
|
26
22
|
*
|
|
27
23
|
* type R = NotStrictBooleanType<true> // true
|
|
@@ -34,8 +30,6 @@ export type NotStrictBooleanType<T, Then = T, Else = never> = StrictBooleanType<
|
|
|
34
30
|
* Is the type `T` exactly `boolean`.
|
|
35
31
|
*
|
|
36
32
|
* ```ts
|
|
37
|
-
* import type { IsStrictBoolean } from 'type-plus'
|
|
38
|
-
*
|
|
39
33
|
* type R = IsStrictBoolean<boolean> // true
|
|
40
34
|
*
|
|
41
35
|
* type R = IsStrictBoolean<true> // false
|
|
@@ -48,8 +42,6 @@ export type IsStrictBoolean<T, Then = true, Else = false> = StrictBooleanType<T,
|
|
|
48
42
|
* Is the type `T` not exactly `false`.
|
|
49
43
|
*
|
|
50
44
|
* ```ts
|
|
51
|
-
* import type { IsNotStrictBoolean } from 'type-plus'
|
|
52
|
-
*
|
|
53
45
|
* type R = IsNotStrictBoolean<boolean> // false
|
|
54
46
|
*
|
|
55
47
|
* type R = IsNotStrictBoolean<true> // true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict_boolean_type.d.ts","sourceRoot":"","sources":["../../ts/boolean/strict_boolean_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"strict_boolean_type.d.ts","sourceRoot":"","sources":["../../ts/boolean/strict_boolean_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CACtE,CAAC,EACD,IAAI,EACJ;IAAC,CAAC;IAAE,OAAO;CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAC/C,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE9F;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE5F;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -3,8 +3,6 @@ import type { IsAnyOrNever } from '../any/any_or_never.js';
|
|
|
3
3
|
* Check if the type `T` is exactly `true`.
|
|
4
4
|
*
|
|
5
5
|
* ```ts
|
|
6
|
-
* import type { TrueType } from 'type-plus'
|
|
7
|
-
*
|
|
8
6
|
* type R = TrueType<true> // true
|
|
9
7
|
*
|
|
10
8
|
* type R = TrueType<false> // never
|
|
@@ -19,8 +17,6 @@ export type TrueType<T, Then = T, Else = never> = IsAnyOrNever<T, Else, [
|
|
|
19
17
|
* Check if the type `T` is not exactly `true`.
|
|
20
18
|
*
|
|
21
19
|
* ```ts
|
|
22
|
-
* import type { NotTrueType } from 'type-plus'
|
|
23
|
-
*
|
|
24
20
|
* type R = NotTrueType<true> // never
|
|
25
21
|
*
|
|
26
22
|
* type R = NotTrueType<false> // false
|
|
@@ -32,8 +28,6 @@ export type NotTrueType<T, Then = T, Else = never> = TrueType<T, Else, Then>;
|
|
|
32
28
|
* Is the type `T` exactly `true`.
|
|
33
29
|
*
|
|
34
30
|
* ```ts
|
|
35
|
-
* import type { IsTrue } from 'type-plus'
|
|
36
|
-
*
|
|
37
31
|
* type R = IsTrue<true> // true
|
|
38
32
|
*
|
|
39
33
|
* type R = IsTrue<false> // false
|
|
@@ -45,8 +39,6 @@ export type IsTrue<T, Then = true, Else = false> = TrueType<T, Then, Else>;
|
|
|
45
39
|
* Is the type `T` not exactly `true`.
|
|
46
40
|
*
|
|
47
41
|
* ```ts
|
|
48
|
-
* import type { IsNotTrue } from 'type-plus'
|
|
49
|
-
*
|
|
50
42
|
* type R = IsNotTrue<true> // false
|
|
51
43
|
*
|
|
52
44
|
* type R = IsNotTrue<false> // true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"true_type.d.ts","sourceRoot":"","sources":["../../ts/boolean/true_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"true_type.d.ts","sourceRoot":"","sources":["../../ts/boolean/true_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CAC7D,CAAC,EACD,IAAI,EACJ;IAAC,CAAC;IAAE,IAAI;CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CACzC,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE5E;;;;;;;;;GASG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE1E;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
package/cjs/equal/equal.d.ts
CHANGED
|
@@ -11,8 +11,6 @@ type IdentityEqual<A, B, Then, Else> = (<_>() => _ extends (A & _) | _ ? 1 : 2)
|
|
|
11
11
|
* Checks `A` and `B` are equal.
|
|
12
12
|
*
|
|
13
13
|
* ```ts
|
|
14
|
-
* import { type Equal } from 'type-plus'
|
|
15
|
-
*
|
|
16
14
|
* type R = Equal<1, 1> // true
|
|
17
15
|
* type R = Equal<any, any> // true
|
|
18
16
|
* type R = Equal<boolean, boolean> // true
|
|
@@ -25,7 +23,10 @@ type IdentityEqual<A, B, Then, Else> = (<_>() => _ extends (A & _) | _ ? 1 : 2)
|
|
|
25
23
|
* type R = Equal<{ a: 1 }, { a: 1; b: 2 }> // false
|
|
26
24
|
* ```
|
|
27
25
|
*/
|
|
28
|
-
export type Equal<A, B, Then = true, Else = false> = [A, B] extends [B, A] ? BothNever<A, B, Then, Else, BothAny<A, B, Then, Else, IdentityEqual<A, B, Then, And<IsObject<A>, IsObject<B>, IdentityEqual<Properties<A>, Properties<B>,
|
|
26
|
+
export type Equal<A, B, Then = true, Else = false> = [A, B] extends [B, A] ? BothNever<A, B, Then, Else, BothAny<A, B, Then, Else, IdentityEqual<A, B, Then, And<IsObject<A>, IsObject<B>, IdentityEqual<Properties<A>, Properties<B>, [
|
|
27
|
+
A,
|
|
28
|
+
B
|
|
29
|
+
] extends [(...args: infer P1) => any, (...args: infer P2) => any] ? Equal<P1, P2, Then, Else> : Then, Else>, [
|
|
29
30
|
A,
|
|
30
31
|
B
|
|
31
32
|
] extends [B, A] ? Then : Else>>>> : And<IsSymbol<A>, IsSymbol<B>, Then, Else>;
|
|
@@ -33,8 +34,6 @@ export type Equal<A, B, Then = true, Else = false> = [A, B] extends [B, A] ? Bot
|
|
|
33
34
|
* Checks `A` and `B` are not equal.
|
|
34
35
|
*
|
|
35
36
|
* ```ts
|
|
36
|
-
* import { type NotEqual } from 'type-plus'
|
|
37
|
-
*
|
|
38
37
|
* type R = NotEqual<1, 1> // false
|
|
39
38
|
* type R = NotEqual<any, any> // false
|
|
40
39
|
* type R = NotEqual<boolean, boolean> // false
|
package/cjs/equal/equal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../ts/equal/equal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAExD,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,IAAI,GAAG,CAC1C,OAAO,CAAC,CAAC,CAAC,EACV,OAAO,CAAC,CAAC,CAAC,EACV,IAAI,EACJ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,CACrC,CAAA;AAED,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;AAEtG,KAAK,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,SAC/F,CAAC,CAAC,GAAG,CAAC,CAAC,GACP,CAAC,GACD,CAAC,GACD,CAAC,GACD,IAAI,GACJ,IAAI,CAAA;AAEP
|
|
1
|
+
{"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../ts/equal/equal.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,8 +3,6 @@ import type { IsAnyOrNever } from '../any/any_or_never.js';
|
|
|
3
3
|
* Check if `T` is a `Function`.
|
|
4
4
|
*
|
|
5
5
|
* ```ts
|
|
6
|
-
* import type { FunctionType } from 'type-plus'
|
|
7
|
-
*
|
|
8
6
|
* type R = FunctionType<Function> // Function
|
|
9
7
|
* type R = FunctionType<() => void> // () => void
|
|
10
8
|
* type R = FunctionType<(() => void) | { a: 1 }> // (() => void) | { a: 1 }
|
|
@@ -21,8 +19,6 @@ export type FunctionType<T, Then = T, Else = never> = IsAnyOrNever<T, Else, [
|
|
|
21
19
|
* Is `T` a `Function`.
|
|
22
20
|
*
|
|
23
21
|
* ```ts
|
|
24
|
-
* import type { IsFunction } from 'type-plus'
|
|
25
|
-
*
|
|
26
22
|
* type R = IsFunction<Function> // Function
|
|
27
23
|
* type R = IsFunction<() => void> // () => void
|
|
28
24
|
* type R = IsFunction<(() => void) | { a: 1 }> // (() => void) | { a: 1 }
|
|
@@ -37,8 +33,6 @@ export type IsFunction<T, Then = true, Else = false> = FunctionType<T, Then, Els
|
|
|
37
33
|
* Check if `T` is not a `Function`.
|
|
38
34
|
*
|
|
39
35
|
* ```ts
|
|
40
|
-
* import type { NotFunctionType } from 'type-plus'
|
|
41
|
-
*
|
|
42
36
|
* type R = NotFunctionType<Function> // never
|
|
43
37
|
* type R = NotFunctionType<() => void> // never
|
|
44
38
|
* type R = NotFunctionType<(() => void) | { a: 1 }> // never
|
|
@@ -53,8 +47,6 @@ export type NotFunctionType<T, Then = T, Else = never> = FunctionType<T, Else, T
|
|
|
53
47
|
* Is `T` not a `Function`.
|
|
54
48
|
*
|
|
55
49
|
* ```ts
|
|
56
|
-
* import type { IsNotFunction } from 'type-plus'
|
|
57
|
-
*
|
|
58
50
|
* type R = IsNotFunction<Function> // false
|
|
59
51
|
* type R = IsNotFunction<() => void> // false
|
|
60
52
|
* type R = IsNotFunction<(() => void) | { a: 1 }> // false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function_type.d.ts","sourceRoot":"","sources":["../../ts/function/function_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"function_type.d.ts","sourceRoot":"","sources":["../../ts/function/function_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CACjE,CAAC,EACD,IAAI,EACJ;IAAC,CAAC;CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,IAAI,GAAG,IAAI,CACpC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAElF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAEpF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -3,8 +3,6 @@ import type { IsAnyOrNever } from '../any/any_or_never.js';
|
|
|
3
3
|
* Check if `T` is exactly `Function`.
|
|
4
4
|
*
|
|
5
5
|
* ```ts
|
|
6
|
-
* import type { StrictFunctionType } from 'type-plus'
|
|
7
|
-
*
|
|
8
6
|
* type R = StrictFunctionType<Function> // Function
|
|
9
7
|
*
|
|
10
8
|
* type R = StrictFunctionType<() => void> // never
|
|
@@ -19,8 +17,6 @@ export type StrictFunctionType<T, Then = T, Else = never> = IsAnyOrNever<T, Else
|
|
|
19
17
|
* Check if `T` is not exactly `Function`.
|
|
20
18
|
*
|
|
21
19
|
* ```ts
|
|
22
|
-
* import type { NotStrictFunctionType } from 'type-plus'
|
|
23
|
-
*
|
|
24
20
|
* type R = NotStrictFunctionType<Function> // never
|
|
25
21
|
* type R = NotStrictFunctionType<() => void> // () => void
|
|
26
22
|
*
|
|
@@ -32,8 +28,6 @@ export type NotStrictFunctionType<T, Then = T, Else = never> = StrictFunctionTyp
|
|
|
32
28
|
* Is `T` exactly `Function`.
|
|
33
29
|
*
|
|
34
30
|
* ```ts
|
|
35
|
-
* import type { IsStrictFunction } from 'type-plus'
|
|
36
|
-
*
|
|
37
31
|
* type R = IsStrictFunction<Function> // true
|
|
38
32
|
*
|
|
39
33
|
* type R = IsStrictFunction<() => void> // false
|
|
@@ -45,8 +39,6 @@ export type IsStrictFunction<T, Then = true, Else = false> = StrictFunctionType<
|
|
|
45
39
|
* Is `T` not exactly `Function`.
|
|
46
40
|
*
|
|
47
41
|
* ```ts
|
|
48
|
-
* import type { IsNotStrictFunction } from 'type-plus'
|
|
49
|
-
*
|
|
50
42
|
* type R = IsNotStrictFunction<Function> // false
|
|
51
43
|
*
|
|
52
44
|
* type R = IsNotStrictFunction<() => void> // true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict_function_type.d.ts","sourceRoot":"","sources":["../../ts/function/strict_function_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"strict_function_type.d.ts","sourceRoot":"","sources":["../../ts/function/strict_function_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,YAAY,CACvE,CAAC,EACD,IAAI,EACJ;IAAC,CAAC;IAAE,QAAQ;CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CACjD,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAEhG;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE9F;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|