type-tls 2.4.4 → 2.5.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/dist/index.d.ts CHANGED
@@ -168,10 +168,40 @@ export declare type Optional<T> = T | null | undefined;
168
168
  export declare type OptionalBoolean = Optional<boolean>;
169
169
  /**
170
170
  * 获取值类型为指定类型的所有 key
171
+ *
172
+ * @typeParam Target - 目标对象
173
+ * @typeParam Value - 要获取的key的对应值的类型
171
174
  */
172
175
  export declare type KeyOfValue<Target, Value> = {
173
176
  [K in keyof Target]: Target[K] extends Value ? K : never;
174
177
  }[keyof Target];
178
+ /**
179
+ * 获取值类型不是指定类型的所有 key
180
+ *
181
+ * @typeParam Target - 目标对象
182
+ * @typeParam Value - 被排除的值的类型
183
+ */
184
+ export declare type KeyOfNonValue<Target, Value> = {
185
+ [K in keyof Target]: Target[K] extends Value ? never : K;
186
+ }[keyof Target];
187
+ /**
188
+ * 获取值类型包含指定类型的所有 key
189
+ *
190
+ * @typeParam Target - 目标对象
191
+ * @typeParam Value - 要获取的key的对应值应包含的类型
192
+ */
193
+ export declare type KeyOfContainsValue<Target, Value> = {
194
+ [K in keyof Target]: Value extends Target[K] ? K : never;
195
+ }[keyof Target];
196
+ /**
197
+ * 获取值类型不应包含指定类型的所有 key
198
+ *
199
+ * @typeParam Target - 目标对象
200
+ * @typeParam Value - 不应包含的值的类型
201
+ */
202
+ export declare type KeyOfNonContainsValue<Target, Value> = {
203
+ [K in keyof Target]: Value extends Target[K] ? never : K;
204
+ }[keyof Target];
175
205
  /**
176
206
  * 可将源类型 SourType 中的 类型 MatchType 替换为 新的类型 NewType
177
207
  */
@@ -434,6 +464,11 @@ export declare type MethodParams<Obj, Method extends keyof Obj, ParamIndex exten
434
464
  * @typeParam Method - 对象方法的名字
435
465
  */
436
466
  export declare type MethodReturnType<Obj, Method extends keyof Obj> = Obj[Method] extends AnyFunction ? ReturnType<Obj[Method]> : never;
467
+ /**
468
+ * 获取数组元素的类型
469
+ * @typeParam Arr 数组
470
+ */
471
+ export declare type ArrayItemType<Arr> = Arr extends (infer Item)[] ? Item : never;
437
472
  /**
438
473
  * 获取 Promise 解决的类型的值
439
474
  * @remarks
@@ -462,5 +497,109 @@ export declare type WaitAsyncableCallback<Result, Return> = (result: ResolveData
462
497
  * @returns
463
498
  */
464
499
  export declare function waitAsyncable<Result, Return>(asyncable: Result, callback: WaitAsyncableCallback<Result, Return>): WaitAsyncableReturn<Result, Return>;
500
+ /**
501
+ * 二维向量
502
+ */
503
+ export interface IVector2 {
504
+ x: number;
505
+ y: number;
506
+ }
507
+ /**
508
+ * 三维向量
509
+ */
510
+ export interface IVector3 extends IVector2 {
511
+ z: number;
512
+ }
513
+ /**
514
+ * 四维向量
515
+ */
516
+ export interface IVector4 extends IVector3 {
517
+ w: number;
518
+ }
519
+ /**
520
+ * 向量
521
+ */
522
+ export declare type IVector = IVector2 | IVector3 | IVector4;
523
+ /**
524
+ * 轴名
525
+ */
526
+ export declare type AxisName = "x" | "y" | "z";
527
+ /**
528
+ * 轴
529
+ */
530
+ export declare enum Axis {
531
+ x = 0,
532
+ y = 1,
533
+ z = 2
534
+ }
535
+ /**
536
+ * 轴的方法
537
+ */
538
+ export declare namespace Axis {
539
+ /**
540
+ * 将轴索引转为轴名字
541
+ * @param index - 索引
542
+ * @returns
543
+ */
544
+ function toKey(index: Axis): AxisName;
545
+ /**
546
+ * 将轴名字转为轴索引
547
+ * @param name
548
+ * @returns
549
+ */
550
+ function toIndex(name: AxisName): Axis;
551
+ /**
552
+ * 获取剩余的另外两个轴
553
+ * @remarks
554
+ * 获取除 axis 之外的另外两个轴,且这两轴的顺序符合叉乘得 axis 轴的顺序
555
+ * @param axis
556
+ * @returns
557
+ */
558
+ function getCrossAxiss(axis: Axis): [
559
+ Axis,
560
+ Axis
561
+ ];
562
+ }
563
+ /**
564
+ * 四维轴的名字
565
+ */
566
+ export declare type Axis4Name = "x" | "y" | "z";
567
+ /**
568
+ * 四维轴
569
+ */
570
+ export declare enum Axis4 {
571
+ x = 0,
572
+ y = 1,
573
+ z = 2,
574
+ w = 3
575
+ }
576
+ /**
577
+ * 四维轴的方法
578
+ */
579
+ export declare namespace Axis4 {
580
+ /**
581
+ * 将轴索引转为轴名字
582
+ * @param index - 索引
583
+ * @returns
584
+ */
585
+ function toKey(index: Axis4): Axis4Name;
586
+ /**
587
+ * 将轴名字转为轴索引
588
+ * @param name
589
+ * @returns
590
+ */
591
+ function toIndex(name: Axis4Name): Axis4;
592
+ /**
593
+ * 获取剩余的另外两个轴
594
+ * @remarks
595
+ * 获取除 axis 之外的另外两个轴,且这两轴的顺序符合叉乘得 axis 轴的顺序
596
+ * @param axis
597
+ * @returns
598
+ */
599
+ function getCrossAxiss(axis: Axis4): [
600
+ Axis4,
601
+ Axis4
602
+ ];
603
+ }
465
604
 
466
605
  export {};
@@ -11,6 +11,99 @@
11
11
  */
12
12
  export declare type AnyFunction = (...args: any) => any;
13
13
 
14
+ /**
15
+ * 获取数组元素的类型
16
+ * @typeParam Arr 数组
17
+ */
18
+ export declare type ArrayItemType<Arr> = Arr extends (infer Item)[] ? Item : never;
19
+
20
+ /**
21
+ * 轴
22
+ */
23
+ export declare enum Axis {
24
+ x = 0,
25
+ y = 1,
26
+ z = 2
27
+ }
28
+
29
+ /**
30
+ * 轴的方法
31
+ */
32
+ export declare namespace Axis {
33
+ /**
34
+ * 将轴索引转为轴名字
35
+ * @param index - 索引
36
+ * @returns
37
+ */
38
+ export function toKey(index: Axis): AxisName;
39
+ /**
40
+ * 将轴名字转为轴索引
41
+ * @param name
42
+ * @returns
43
+ */
44
+ export function toIndex(name: AxisName): Axis;
45
+ /**
46
+ * 获取剩余的另外两个轴
47
+ * @remarks
48
+ * 获取除 axis 之外的另外两个轴,且这两轴的顺序符合叉乘得 axis 轴的顺序
49
+ * @param axis
50
+ * @returns
51
+ */
52
+ export function getCrossAxiss(axis: Axis): [
53
+ Axis,
54
+ Axis
55
+ ];
56
+ }
57
+
58
+ /**
59
+ * 四维轴
60
+ */
61
+ export declare enum Axis4 {
62
+ x = 0,
63
+ y = 1,
64
+ z = 2,
65
+ w = 3
66
+ }
67
+
68
+ /**
69
+ * 四维轴的方法
70
+ */
71
+ export declare namespace Axis4 {
72
+ /**
73
+ * 将轴索引转为轴名字
74
+ * @param index - 索引
75
+ * @returns
76
+ */
77
+ export function toKey(index: Axis4): Axis4Name;
78
+ /**
79
+ * 将轴名字转为轴索引
80
+ * @param name
81
+ * @returns
82
+ */
83
+ export function toIndex(name: Axis4Name): Axis4;
84
+ /**
85
+ * 获取剩余的另外两个轴
86
+ * @remarks
87
+ * 获取除 axis 之外的另外两个轴,且这两轴的顺序符合叉乘得 axis 轴的顺序
88
+ * @param axis
89
+ * @returns
90
+ */
91
+ export function getCrossAxiss(axis: Axis4): [
92
+ Axis4,
93
+ Axis4
94
+ ];
95
+ }
96
+
97
+ /**
98
+ * 四维轴的名字
99
+ */
100
+ export declare type Axis4Name = "x" | "y" | "z";
101
+
102
+ /**
103
+ * 轴名
104
+ */
105
+ export declare type AxisName = "x" | "y" | "z";
106
+
14
107
  /**
15
108
  * 类的类型、构造函数的类型
16
109
  *
@@ -320,8 +413,68 @@ export declare function isIterator(target: any): boolean;
320
413
  */
321
414
  export declare function isObject(target: any): boolean;
322
415
 
416
+ /**
417
+ * 向量
418
+ */
419
+ export declare type IVector = IVector2 | IVector3 | IVector4;
420
+
421
+ /**
422
+ * 二维向量
423
+ */
424
+ export declare interface IVector2 {
425
+ x: number;
426
+ y: number;
427
+ }
428
+
429
+ /**
430
+ * 三维向量
431
+ */
432
+ export declare interface IVector3 extends IVector2 {
433
+ z: number;
434
+ }
435
+
436
+ /**
437
+ * 四维向量
438
+ */
439
+ export declare interface IVector4 extends IVector3 {
440
+ w: number;
441
+ }
442
+
443
+ /**
444
+ * 获取值类型包含指定类型的所有 key
445
+ *
446
+ * @typeParam Target - 目标对象
447
+ * @typeParam Value - 要获取的key的对应值应包含的类型
448
+ */
449
+ export declare type KeyOfContainsValue<Target, Value> = {
450
+ [K in keyof Target]: Value extends Target[K] ? K : never;
451
+ }[keyof Target];
452
+
453
+ /**
454
+ * 获取值类型不应包含指定类型的所有 key
455
+ *
456
+ * @typeParam Target - 目标对象
457
+ * @typeParam Value - 不应包含的值的类型
458
+ */
459
+ export declare type KeyOfNonContainsValue<Target, Value> = {
460
+ [K in keyof Target]: Value extends Target[K] ? never : K;
461
+ }[keyof Target];
462
+
463
+ /**
464
+ * 获取值类型不是指定类型的所有 key
465
+ *
466
+ * @typeParam Target - 目标对象
467
+ * @typeParam Value - 被排除的值的类型
468
+ */
469
+ export declare type KeyOfNonValue<Target, Value> = {
470
+ [K in keyof Target]: Target[K] extends Value ? never : K;
471
+ }[keyof Target];
472
+
323
473
  /**
324
474
  * 获取值类型为指定类型的所有 key
475
+ *
476
+ * @typeParam Target - 目标对象
477
+ * @typeParam Value - 要获取的key的对应值的类型
325
478
  */
326
479
  export declare type KeyOfValue<Target, Value> = {
327
480
  [K in keyof Target]: Target[K] extends Value ? K : never;
@@ -1 +1 @@
1
- var TypeTls=function(e){var y,g,T;"use strict";function a(n){var t=typeof n;return n&&(t==="object"||t==="function")}function o(n){var t=n;return n!=null&&(t=n.constructor,t==null&&(t=typeof n)),t}function f(n){switch(n){case void 0:return"undefined";case null:return"null"}let t=typeof n;switch(t){case"function":return n.name;case"string":return n;default:return t}}function l(n){return globalThis[n]}function A(n){let t=o(n);return f(t)}function s(n){return n==null||a(n)?o(n):typeof n}function b(n){var t=s(n);return f(t)}function m(n){var t=typeof n;return n==null||t!=="object"&&t!=="function"}function F(n){let t=n&&n.length;return Number.isInteger(n.length)&&t>=0}function O(n){return n&&typeof n[Symbol.iterator]=="function"}function E(n){return n&&typeof n.next=="function"}function i(n,...t){for(const r of t){const c=Object.getOwnPropertyDescriptors(r);Object.defineProperties(n,c)}return n}function M(n,t){return t}function w(){return function(t,r){return r}}function _(n,t){return i(n,t),t}function v(n){return function(r){return i(n,r),r}}function h(n,t){return i(n,t),n}function $(n){return function(r){return i(n,r),n}}function N(n,t){return t}function u(n,t){var c;i(n.prototype,t);const r=t._constructor;if(typeof r=="function"){const d=n;((c=d._constructors)!=null?c:d._constructors=[]).push(r)}return t}function S(n){return function(r){return u(n,r),r}}function I(n,t){return u(n,t),n}function j(n){return function(r){return u(n,r),n}}const G=/^[A-Za-z_$]+[\w$]*$/;function p(n){return G.test(n)}const z=/(^\s*(async\s+)?\s*(\b[A-Za-z_$]+[\w$]*\b)\s*=>)|(^\s*(async\s+)?\s*\(\s*(\b[A-Za-z_$]+[\w$]*\b)?\s*(,\s*(\b[A-Za-z_$]+[\w$]*\b)\s*)*\)\s*=>)/;function Z(n){const t=n.toString();return z.test(t)}const B=(y=globalThis.AsyncFunction)!=null?y:async function(){}.constructor;function D(n){return n instanceof B}const P=(g=globalThis.GeneratorFunction)!=null?g:function*(){}.constructor;function x(n){return n instanceof P}const L=(T=globalThis.AsyncGeneratorFunction)!=null?T:async function*(){}.constructor;function R(n){return n instanceof L}const k=/(^\s*(async\s+)?function\s*(\s|\*)\s*)[A-Za-z_$]+[\w$]*(\s*\()/;function q(n){if(n.name){const t=n.toString();return!k.test(t)}return!0}function C(n,t){return n instanceof Promise?n.then(r=>t(r,!1,void 0),r=>t(void 0,!0,r)):t(n,!1,void 0)}return e.createDefineMixin=w,e.createExtendTarget=j,e.createMixinTarget=$,e.createTargetExtend=S,e.createTargetMixin=v,e.defineExtend=N,e.defineMixin=M,e.extendTarget=I,e.getExactTypeNameOf=b,e.getExactTypeOf=s,e.getNameOfType=f,e.getTypeByName=l,e.getTypeNameOf=A,e.getTypeOf=o,e.isAnonymousFunction=q,e.isArrayLike=F,e.isArrowFunction=Z,e.isAsyncFunction=D,e.isAsyncGeneratorFunction=R,e.isBaseType=m,e.isGeneratorFunction=x,e.isIdentifier=p,e.isIterable=O,e.isIterator=E,e.isObject=a,e.mixin=i,e.mixinTarget=h,e.targetExtend=u,e.targetMixin=_,e.waitAsyncable=C,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),e}({});
1
+ var TypeTls=function(e){var d,l,b;"use strict";function g(n){var t=typeof n;return n&&(t==="object"||t==="function")}function a(n){var t=n;return n!=null&&(t=n.constructor,t==null&&(t=typeof n)),t}function s(n){switch(n){case void 0:return"undefined";case null:return"null"}let t=typeof n;switch(t){case"function":return n.name;case"string":return n;default:return t}}function m(n){return globalThis[n]}function F(n){let t=a(n);return s(t)}function T(n){return n==null||g(n)?a(n):typeof n}function O(n){var t=T(n);return s(t)}function w(n){var t=typeof n;return n==null||t!=="object"&&t!=="function"}function E(n){let t=n&&n.length;return Number.isInteger(n.length)&&t>=0}function M(n){return n&&typeof n[Symbol.iterator]=="function"}function I(n){return n&&typeof n.next=="function"}function c(n,...t){for(const r of t){const u=Object.getOwnPropertyDescriptors(r);Object.defineProperties(n,u)}return n}function _(n,t){return t}function v(){return function(t,r){return r}}function h(n,t){return c(n,t),t}function A(n){return function(r){return c(n,r),r}}function $(n,t){return c(n,t),n}function N(n){return function(r){return c(n,r),n}}function S(n,t){return t}function o(n,t){var u;c(n.prototype,t);const r=t._constructor;if(typeof r=="function"){const i=n;((u=i._constructors)!=null?u:i._constructors=[]).push(r)}return t}function z(n){return function(r){return o(n,r),r}}function j(n,t){return o(n,t),n}function G(n){return function(r){return o(n,r),n}}const Z=/^[A-Za-z_$]+[\w$]*$/;function B(n){return Z.test(n)}const C=/(^\s*(async\s+)?\s*(\b[A-Za-z_$]+[\w$]*\b)\s*=>)|(^\s*(async\s+)?\s*\(\s*(\b[A-Za-z_$]+[\w$]*\b)?\s*(,\s*(\b[A-Za-z_$]+[\w$]*\b)\s*)*\)\s*=>)/;function D(n){const t=n.toString();return C.test(t)}const K=(d=globalThis.AsyncFunction)!=null?d:async function(){}.constructor;function P(n){return n instanceof K}const L=(l=globalThis.GeneratorFunction)!=null?l:function*(){}.constructor;function R(n){return n instanceof L}const k=(b=globalThis.AsyncGeneratorFunction)!=null?b:async function*(){}.constructor;function q(n){return n instanceof k}const H=/(^\s*(async\s+)?function\s*(\s|\*)\s*)[A-Za-z_$]+[\w$]*(\s*\()/;function J(n){if(n.name){const t=n.toString();return!H.test(t)}return!0}function Q(n,t){return n instanceof Promise?n.then(r=>t(r,!1,void 0),r=>t(void 0,!0,r)):t(n,!1,void 0)}return e.Axis=(n=>(n[n.x=0]="x",n[n.y=1]="y",n[n.z=2]="z",n))(e.Axis||{}),(n=>{function t(i){return n[i]}n.toKey=t;function r(i){return n[i]}n.toIndex=r;function u(i){const f=(i+1)%3,y=(i+2)%3;return[f,y]}n.getCrossAxiss=u})(e.Axis||(e.Axis={})),e.Axis4=(n=>(n[n.x=0]="x",n[n.y=1]="y",n[n.z=2]="z",n[n.w=3]="w",n))(e.Axis4||{}),(n=>{function t(i){return n[i]}n.toKey=t;function r(i){return n[i]}n.toIndex=r;function u(i){const f=(i+1)%4,y=(i+2)%4;return[f,y]}n.getCrossAxiss=u})(e.Axis4||(e.Axis4={})),e.createDefineMixin=v,e.createExtendTarget=G,e.createMixinTarget=N,e.createTargetExtend=z,e.createTargetMixin=A,e.defineExtend=S,e.defineMixin=_,e.extendTarget=j,e.getExactTypeNameOf=O,e.getExactTypeOf=T,e.getNameOfType=s,e.getTypeByName=m,e.getTypeNameOf=F,e.getTypeOf=a,e.isAnonymousFunction=J,e.isArrayLike=E,e.isArrowFunction=D,e.isAsyncFunction=P,e.isAsyncGeneratorFunction=q,e.isBaseType=w,e.isGeneratorFunction=R,e.isIdentifier=B,e.isIterable=M,e.isIterator=I,e.isObject=g,e.mixin=c,e.mixinTarget=$,e.targetExtend=o,e.targetMixin=h,e.waitAsyncable=Q,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),e}({});
package/dist/type-tls.mjs CHANGED
@@ -1,12 +1,12 @@
1
- function p(n) {
1
+ function T(n) {
2
2
  var t = typeof n;
3
3
  return n && (t === "object" || t === "function");
4
4
  }
5
- function a(n) {
5
+ function d(n) {
6
6
  var t = n;
7
7
  return n != null && (t = n.constructor, t == null && (t = typeof n)), t;
8
8
  }
9
- function y(n) {
9
+ function l(n) {
10
10
  switch (n) {
11
11
  case void 0:
12
12
  return "undefined";
@@ -23,158 +23,192 @@ function y(n) {
23
23
  return t;
24
24
  }
25
25
  }
26
- function m(n) {
26
+ function _(n) {
27
27
  return globalThis[n];
28
28
  }
29
- function h(n) {
30
- let t = a(n);
31
- return y(t);
29
+ function $(n) {
30
+ let t = d(n);
31
+ return l(t);
32
32
  }
33
- function g(n) {
34
- return n == null || p(n) ? a(n) : typeof n;
33
+ function b(n) {
34
+ return n == null || T(n) ? d(n) : typeof n;
35
35
  }
36
- function w(n) {
37
- var t = g(n);
38
- return y(t);
36
+ function x(n) {
37
+ var t = b(n);
38
+ return l(t);
39
39
  }
40
- function O(n) {
40
+ function I(n) {
41
41
  var t = typeof n;
42
42
  return n == null || t !== "object" && t !== "function";
43
43
  }
44
- function _(n) {
44
+ function z(n) {
45
45
  let t = n && n.length;
46
46
  return Number.isInteger(n.length) && t >= 0;
47
47
  }
48
- function $(n) {
48
+ function E(n) {
49
49
  return n && typeof n[Symbol.iterator] == "function";
50
50
  }
51
- function v(n) {
51
+ function S(n) {
52
52
  return n && typeof n.next == "function";
53
53
  }
54
- function r(n, ...t) {
54
+ function u(n, ...t) {
55
55
  for (const e of t) {
56
56
  const o = Object.getOwnPropertyDescriptors(e);
57
57
  Object.defineProperties(n, o);
58
58
  }
59
59
  return n;
60
60
  }
61
- function E(n, t) {
61
+ function M(n, t) {
62
62
  return t;
63
63
  }
64
- function S() {
64
+ function j() {
65
65
  return function(t, e) {
66
66
  return e;
67
67
  };
68
68
  }
69
- function M(n, t) {
70
- return r(n, t), t;
69
+ function G(n, t) {
70
+ return u(n, t), t;
71
71
  }
72
- function j(n) {
72
+ function N(n) {
73
73
  return function(e) {
74
- return r(n, e), e;
74
+ return u(n, e), e;
75
75
  };
76
76
  }
77
- function G(n, t) {
78
- return r(n, t), n;
77
+ function Z(n, t) {
78
+ return u(n, t), n;
79
79
  }
80
- function I(n) {
80
+ function C(n) {
81
81
  return function(e) {
82
- return r(n, e), n;
82
+ return u(n, e), n;
83
83
  };
84
84
  }
85
- function N(n, t) {
85
+ function K(n, t) {
86
86
  return t;
87
87
  }
88
- function u(n, t) {
88
+ function a(n, t) {
89
89
  var o;
90
- r(n.prototype, t);
90
+ u(n.prototype, t);
91
91
  const e = t._constructor;
92
92
  if (typeof e == "function") {
93
- const i = n;
94
- ((o = i._constructors) != null ? o : i._constructors = []).push(e);
93
+ const r = n;
94
+ ((o = r._constructors) != null ? o : r._constructors = []).push(e);
95
95
  }
96
96
  return t;
97
97
  }
98
- function z(n) {
98
+ function D(n) {
99
99
  return function(e) {
100
- return u(n, e), e;
100
+ return a(n, e), e;
101
101
  };
102
102
  }
103
- function Z(n, t) {
104
- return u(n, t), n;
103
+ function P(n, t) {
104
+ return a(n, t), n;
105
105
  }
106
- function D(n) {
106
+ function B(n) {
107
107
  return function(e) {
108
- return u(n, e), n;
108
+ return a(n, e), n;
109
109
  };
110
110
  }
111
- const l = /^[A-Za-z_$]+[\w$]*$/;
112
- function P(n) {
113
- return l.test(n);
111
+ const F = /^[A-Za-z_$]+[\w$]*$/;
112
+ function R(n) {
113
+ return F.test(n);
114
114
  }
115
- const T = /(^\s*(async\s+)?\s*(\b[A-Za-z_$]+[\w$]*\b)\s*=>)|(^\s*(async\s+)?\s*\(\s*(\b[A-Za-z_$]+[\w$]*\b)?\s*(,\s*(\b[A-Za-z_$]+[\w$]*\b)\s*)*\)\s*=>)/;
116
- function B(n) {
115
+ const w = /(^\s*(async\s+)?\s*(\b[A-Za-z_$]+[\w$]*\b)\s*=>)|(^\s*(async\s+)?\s*\(\s*(\b[A-Za-z_$]+[\w$]*\b)?\s*(,\s*(\b[A-Za-z_$]+[\w$]*\b)\s*)*\)\s*=>)/;
116
+ function L(n) {
117
117
  const t = n.toString();
118
- return T.test(t);
118
+ return w.test(t);
119
119
  }
120
- var c;
121
- const d = (c = globalThis.AsyncFunction) != null ? c : async function() {
120
+ var y;
121
+ const m = (y = globalThis.AsyncFunction) != null ? y : async function() {
122
122
  }.constructor;
123
- function R(n) {
124
- return n instanceof d;
123
+ function q(n) {
124
+ return n instanceof m;
125
125
  }
126
- var s;
127
- const x = (s = globalThis.GeneratorFunction) != null ? s : function* () {
126
+ var g;
127
+ const h = (g = globalThis.GeneratorFunction) != null ? g : function* () {
128
128
  }.constructor;
129
- function L(n) {
130
- return n instanceof x;
129
+ function H(n) {
130
+ return n instanceof h;
131
131
  }
132
- var f;
133
- const b = (f = globalThis.AsyncGeneratorFunction) != null ? f : async function* () {
132
+ var p;
133
+ const v = (p = globalThis.AsyncGeneratorFunction) != null ? p : async function* () {
134
134
  }.constructor;
135
- function q(n) {
136
- return n instanceof b;
135
+ function J(n) {
136
+ return n instanceof v;
137
137
  }
138
- const A = /(^\s*(async\s+)?function\s*(\s|\*)\s*)[A-Za-z_$]+[\w$]*(\s*\()/;
139
- function C(n) {
138
+ const O = /(^\s*(async\s+)?function\s*(\s|\*)\s*)[A-Za-z_$]+[\w$]*(\s*\()/;
139
+ function Q(n) {
140
140
  if (n.name) {
141
141
  const t = n.toString();
142
- return !A.test(t);
142
+ return !O.test(t);
143
143
  }
144
144
  return !0;
145
145
  }
146
- function H(n, t) {
146
+ function U(n, t) {
147
147
  return n instanceof Promise ? n.then((e) => t(e, !1, void 0), (e) => t(void 0, !0, e)) : t(n, !1, void 0);
148
148
  }
149
+ var f = /* @__PURE__ */ ((n) => (n[n.x = 0] = "x", n[n.y = 1] = "y", n[n.z = 2] = "z", n))(f || {});
150
+ ((n) => {
151
+ function t(r) {
152
+ return n[r];
153
+ }
154
+ n.toKey = t;
155
+ function e(r) {
156
+ return n[r];
157
+ }
158
+ n.toIndex = e;
159
+ function o(r) {
160
+ const c = (r + 1) % 3, i = (r + 2) % 3;
161
+ return [c, i];
162
+ }
163
+ n.getCrossAxiss = o;
164
+ })(f || (f = {}));
165
+ var s = /* @__PURE__ */ ((n) => (n[n.x = 0] = "x", n[n.y = 1] = "y", n[n.z = 2] = "z", n[n.w = 3] = "w", n))(s || {});
166
+ ((n) => {
167
+ function t(r) {
168
+ return n[r];
169
+ }
170
+ n.toKey = t;
171
+ function e(r) {
172
+ return n[r];
173
+ }
174
+ n.toIndex = e;
175
+ function o(r) {
176
+ const c = (r + 1) % 4, i = (r + 2) % 4;
177
+ return [c, i];
178
+ }
179
+ n.getCrossAxiss = o;
180
+ })(s || (s = {}));
149
181
  export {
150
- S as createDefineMixin,
151
- D as createExtendTarget,
152
- I as createMixinTarget,
153
- z as createTargetExtend,
154
- j as createTargetMixin,
155
- N as defineExtend,
156
- E as defineMixin,
157
- Z as extendTarget,
158
- w as getExactTypeNameOf,
159
- g as getExactTypeOf,
160
- y as getNameOfType,
161
- m as getTypeByName,
162
- h as getTypeNameOf,
163
- a as getTypeOf,
164
- C as isAnonymousFunction,
165
- _ as isArrayLike,
166
- B as isArrowFunction,
167
- R as isAsyncFunction,
168
- q as isAsyncGeneratorFunction,
169
- O as isBaseType,
170
- L as isGeneratorFunction,
171
- P as isIdentifier,
172
- $ as isIterable,
173
- v as isIterator,
174
- p as isObject,
175
- r as mixin,
176
- G as mixinTarget,
177
- u as targetExtend,
178
- M as targetMixin,
179
- H as waitAsyncable
182
+ f as Axis,
183
+ s as Axis4,
184
+ j as createDefineMixin,
185
+ B as createExtendTarget,
186
+ C as createMixinTarget,
187
+ D as createTargetExtend,
188
+ N as createTargetMixin,
189
+ K as defineExtend,
190
+ M as defineMixin,
191
+ P as extendTarget,
192
+ x as getExactTypeNameOf,
193
+ b as getExactTypeOf,
194
+ l as getNameOfType,
195
+ _ as getTypeByName,
196
+ $ as getTypeNameOf,
197
+ d as getTypeOf,
198
+ Q as isAnonymousFunction,
199
+ z as isArrayLike,
200
+ L as isArrowFunction,
201
+ q as isAsyncFunction,
202
+ J as isAsyncGeneratorFunction,
203
+ I as isBaseType,
204
+ H as isGeneratorFunction,
205
+ R as isIdentifier,
206
+ E as isIterable,
207
+ S as isIterator,
208
+ T as isObject,
209
+ u as mixin,
210
+ Z as mixinTarget,
211
+ a as targetExtend,
212
+ G as targetMixin,
213
+ U as waitAsyncable
180
214
  };
@@ -1 +1 @@
1
- (function(e,r){typeof exports=="object"&&typeof module<"u"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis<"u"?globalThis:e||self,r(e.TypeTls={}))})(this,function(e){var y,g,d;"use strict";function r(n){var t=typeof n;return n&&(t==="object"||t==="function")}function f(n){var t=n;return n!=null&&(t=n.constructor,t==null&&(t=typeof n)),t}function s(n){switch(n){case void 0:return"undefined";case null:return"null"}let t=typeof n;switch(t){case"function":return n.name;case"string":return n;default:return t}}function l(n){return globalThis[n]}function m(n){let t=f(n);return s(t)}function a(n){return n==null||r(n)?f(n):typeof n}function b(n){var t=a(n);return s(t)}function A(n){var t=typeof n;return n==null||t!=="object"&&t!=="function"}function F(n){let t=n&&n.length;return Number.isInteger(n.length)&&t>=0}function O(n){return n&&typeof n[Symbol.iterator]=="function"}function p(n){return n&&typeof n.next=="function"}function u(n,...t){for(const i of t){const o=Object.getOwnPropertyDescriptors(i);Object.defineProperties(n,o)}return n}function E(n,t){return t}function h(){return function(t,i){return i}}function M(n,t){return u(n,t),t}function w(n){return function(i){return u(n,i),i}}function _(n,t){return u(n,t),n}function v(n){return function(i){return u(n,i),n}}function $(n,t){return t}function c(n,t){var o;u(n.prototype,t);const i=t._constructor;if(typeof i=="function"){const T=n;((o=T._constructors)!=null?o:T._constructors=[]).push(i)}return t}function N(n){return function(i){return c(n,i),i}}function S(n,t){return c(n,t),n}function j(n){return function(i){return c(n,i),n}}const I=/^[A-Za-z_$]+[\w$]*$/;function G(n){return I.test(n)}const x=/(^\s*(async\s+)?\s*(\b[A-Za-z_$]+[\w$]*\b)\s*=>)|(^\s*(async\s+)?\s*\(\s*(\b[A-Za-z_$]+[\w$]*\b)?\s*(,\s*(\b[A-Za-z_$]+[\w$]*\b)\s*)*\)\s*=>)/;function z(n){const t=n.toString();return x.test(t)}const Z=(y=globalThis.AsyncFunction)!=null?y:async function(){}.constructor;function B(n){return n instanceof Z}const D=(g=globalThis.GeneratorFunction)!=null?g:function*(){}.constructor;function P(n){return n instanceof D}const L=(d=globalThis.AsyncGeneratorFunction)!=null?d:async function*(){}.constructor;function R(n){return n instanceof L}const k=/(^\s*(async\s+)?function\s*(\s|\*)\s*)[A-Za-z_$]+[\w$]*(\s*\()/;function q(n){if(n.name){const t=n.toString();return!k.test(t)}return!0}function C(n,t){return n instanceof Promise?n.then(i=>t(i,!1,void 0),i=>t(void 0,!0,i)):t(n,!1,void 0)}e.createDefineMixin=h,e.createExtendTarget=j,e.createMixinTarget=v,e.createTargetExtend=N,e.createTargetMixin=w,e.defineExtend=$,e.defineMixin=E,e.extendTarget=S,e.getExactTypeNameOf=b,e.getExactTypeOf=a,e.getNameOfType=s,e.getTypeByName=l,e.getTypeNameOf=m,e.getTypeOf=f,e.isAnonymousFunction=q,e.isArrayLike=F,e.isArrowFunction=z,e.isAsyncFunction=B,e.isAsyncGeneratorFunction=R,e.isBaseType=A,e.isGeneratorFunction=P,e.isIdentifier=G,e.isIterable=O,e.isIterator=p,e.isObject=r,e.mixin=u,e.mixinTarget=_,e.targetExtend=c,e.targetMixin=M,e.waitAsyncable=C,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(e,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(e=typeof globalThis<"u"?globalThis:e||self,c(e.TypeTls={}))})(this,function(e){var T,l,m;"use strict";function c(n){var t=typeof n;return n&&(t==="object"||t==="function")}function a(n){var t=n;return n!=null&&(t=n.constructor,t==null&&(t=typeof n)),t}function y(n){switch(n){case void 0:return"undefined";case null:return"null"}let t=typeof n;switch(t){case"function":return n.name;case"string":return n;default:return t}}function b(n){return globalThis[n]}function F(n){let t=a(n);return y(t)}function d(n){return n==null||c(n)?a(n):typeof n}function O(n){var t=d(n);return y(t)}function w(n){var t=typeof n;return n==null||t!=="object"&&t!=="function"}function E(n){let t=n&&n.length;return Number.isInteger(n.length)&&t>=0}function h(n){return n&&typeof n[Symbol.iterator]=="function"}function M(n){return n&&typeof n.next=="function"}function o(n,...t){for(const r of t){const u=Object.getOwnPropertyDescriptors(r);Object.defineProperties(n,u)}return n}function I(n,t){return t}function _(){return function(t,r){return r}}function v(n,t){return o(n,t),t}function A(n){return function(r){return o(n,r),r}}function $(n,t){return o(n,t),n}function N(n){return function(r){return o(n,r),n}}function S(n,t){return t}function f(n,t){var u;o(n.prototype,t);const r=t._constructor;if(typeof r=="function"){const i=n;((u=i._constructors)!=null?u:i._constructors=[]).push(r)}return t}function j(n){return function(r){return f(n,r),r}}function z(n,t){return f(n,t),n}function G(n){return function(r){return f(n,r),n}}const p=/^[A-Za-z_$]+[\w$]*$/;function Z(n){return p.test(n)}const B=/(^\s*(async\s+)?\s*(\b[A-Za-z_$]+[\w$]*\b)\s*=>)|(^\s*(async\s+)?\s*\(\s*(\b[A-Za-z_$]+[\w$]*\b)?\s*(,\s*(\b[A-Za-z_$]+[\w$]*\b)\s*)*\)\s*=>)/;function C(n){const t=n.toString();return B.test(t)}const D=(T=globalThis.AsyncFunction)!=null?T:async function(){}.constructor;function K(n){return n instanceof D}const P=(l=globalThis.GeneratorFunction)!=null?l:function*(){}.constructor;function L(n){return n instanceof P}const R=(m=globalThis.AsyncGeneratorFunction)!=null?m:async function*(){}.constructor;function k(n){return n instanceof R}const q=/(^\s*(async\s+)?function\s*(\s|\*)\s*)[A-Za-z_$]+[\w$]*(\s*\()/;function H(n){if(n.name){const t=n.toString();return!q.test(t)}return!0}function J(n,t){return n instanceof Promise?n.then(r=>t(r,!1,void 0),r=>t(void 0,!0,r)):t(n,!1,void 0)}e.Axis=(n=>(n[n.x=0]="x",n[n.y=1]="y",n[n.z=2]="z",n))(e.Axis||{}),(n=>{function t(i){return n[i]}n.toKey=t;function r(i){return n[i]}n.toIndex=r;function u(i){const s=(i+1)%3,g=(i+2)%3;return[s,g]}n.getCrossAxiss=u})(e.Axis||(e.Axis={})),e.Axis4=(n=>(n[n.x=0]="x",n[n.y=1]="y",n[n.z=2]="z",n[n.w=3]="w",n))(e.Axis4||{}),(n=>{function t(i){return n[i]}n.toKey=t;function r(i){return n[i]}n.toIndex=r;function u(i){const s=(i+1)%4,g=(i+2)%4;return[s,g]}n.getCrossAxiss=u})(e.Axis4||(e.Axis4={})),e.createDefineMixin=_,e.createExtendTarget=G,e.createMixinTarget=N,e.createTargetExtend=j,e.createTargetMixin=A,e.defineExtend=S,e.defineMixin=I,e.extendTarget=z,e.getExactTypeNameOf=O,e.getExactTypeOf=d,e.getNameOfType=y,e.getTypeByName=b,e.getTypeNameOf=F,e.getTypeOf=a,e.isAnonymousFunction=H,e.isArrayLike=E,e.isArrowFunction=C,e.isAsyncFunction=K,e.isAsyncGeneratorFunction=k,e.isBaseType=w,e.isGeneratorFunction=L,e.isIdentifier=Z,e.isIterable=h,e.isIterator=M,e.isObject=c,e.mixin=o,e.mixinTarget=$,e.targetExtend=f,e.targetMixin=v,e.waitAsyncable=J,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [ArrayItemType](./type-tls.arrayitemtype.md)
4
+
5
+ ## ArrayItemType type
6
+
7
+ 获取数组元素的类型
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export declare type ArrayItemType<Arr> = Arr extends (infer Item)[] ? Item : never;
13
+ ```
@@ -0,0 +1,32 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [Axis](./type-tls.axis.md) &gt; [getCrossAxiss](./type-tls.axis.getcrossaxiss.md)
4
+
5
+ ## Axis.getCrossAxiss() function
6
+
7
+ 获取剩余的另外两个轴
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ function getCrossAxiss(axis: Axis): [
13
+ Axis,
14
+ Axis
15
+ ];
16
+ ```
17
+
18
+ ## Parameters
19
+
20
+ | Parameter | Type | Description |
21
+ | --- | --- | --- |
22
+ | axis | [Axis](./type-tls.axis.md) | |
23
+
24
+ <b>Returns:</b>
25
+
26
+ \[ [Axis](./type-tls.axis.md)<!-- -->, [Axis](./type-tls.axis.md) \]
27
+
28
+
29
+ ## Remarks
30
+
31
+ 获取除 axis 之外的另外两个轴,且这两轴的顺序符合叉乘得 axis 轴的顺序
32
+
@@ -0,0 +1,22 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [Axis](./type-tls.axis.md)
4
+
5
+ ## Axis namespace
6
+
7
+ 轴的方法
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export declare namespace Axis
13
+ ```
14
+
15
+ ## Functions
16
+
17
+ | Function | Description |
18
+ | --- | --- |
19
+ | [getCrossAxiss(axis)](./type-tls.axis.getcrossaxiss.md) | 获取剩余的另外两个轴 |
20
+ | [toIndex(name)](./type-tls.axis.toindex.md) | 将轴名字转为轴索引 |
21
+ | [toKey(index)](./type-tls.axis.tokey.md) | 将轴索引转为轴名字 |
22
+
@@ -0,0 +1,25 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [Axis](./type-tls.axis.md) &gt; [toIndex](./type-tls.axis.toindex.md)
4
+
5
+ ## Axis.toIndex() function
6
+
7
+ 将轴名字转为轴索引
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ function toIndex(name: AxisName): Axis;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | name | [AxisName](./type-tls.axisname.md) | |
20
+
21
+ <b>Returns:</b>
22
+
23
+ [Axis](./type-tls.axis.md)
24
+
25
+
@@ -0,0 +1,25 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [Axis](./type-tls.axis.md) &gt; [toKey](./type-tls.axis.tokey.md)
4
+
5
+ ## Axis.toKey() function
6
+
7
+ 将轴索引转为轴名字
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ function toKey(index: Axis): AxisName;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | index | [Axis](./type-tls.axis.md) | 索引 |
20
+
21
+ <b>Returns:</b>
22
+
23
+ [AxisName](./type-tls.axisname.md)
24
+
25
+
@@ -0,0 +1,32 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [Axis4](./type-tls.axis4.md) &gt; [getCrossAxiss](./type-tls.axis4.getcrossaxiss.md)
4
+
5
+ ## Axis4.getCrossAxiss() function
6
+
7
+ 获取剩余的另外两个轴
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ function getCrossAxiss(axis: Axis4): [
13
+ Axis4,
14
+ Axis4
15
+ ];
16
+ ```
17
+
18
+ ## Parameters
19
+
20
+ | Parameter | Type | Description |
21
+ | --- | --- | --- |
22
+ | axis | [Axis4](./type-tls.axis4.md) | |
23
+
24
+ <b>Returns:</b>
25
+
26
+ \[ [Axis4](./type-tls.axis4.md)<!-- -->, [Axis4](./type-tls.axis4.md) \]
27
+
28
+
29
+ ## Remarks
30
+
31
+ 获取除 axis 之外的另外两个轴,且这两轴的顺序符合叉乘得 axis 轴的顺序
32
+
@@ -0,0 +1,22 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [Axis4](./type-tls.axis4.md)
4
+
5
+ ## Axis4 namespace
6
+
7
+ 四维轴的方法
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export declare namespace Axis4
13
+ ```
14
+
15
+ ## Functions
16
+
17
+ | Function | Description |
18
+ | --- | --- |
19
+ | [getCrossAxiss(axis)](./type-tls.axis4.getcrossaxiss.md) | 获取剩余的另外两个轴 |
20
+ | [toIndex(name)](./type-tls.axis4.toindex.md) | 将轴名字转为轴索引 |
21
+ | [toKey(index)](./type-tls.axis4.tokey.md) | 将轴索引转为轴名字 |
22
+
@@ -0,0 +1,25 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [Axis4](./type-tls.axis4.md) &gt; [toIndex](./type-tls.axis4.toindex.md)
4
+
5
+ ## Axis4.toIndex() function
6
+
7
+ 将轴名字转为轴索引
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ function toIndex(name: Axis4Name): Axis4;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | name | [Axis4Name](./type-tls.axis4name.md) | |
20
+
21
+ <b>Returns:</b>
22
+
23
+ [Axis4](./type-tls.axis4.md)
24
+
25
+
@@ -0,0 +1,25 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [Axis4](./type-tls.axis4.md) &gt; [toKey](./type-tls.axis4.tokey.md)
4
+
5
+ ## Axis4.toKey() function
6
+
7
+ 将轴索引转为轴名字
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ function toKey(index: Axis4): Axis4Name;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | index | [Axis4](./type-tls.axis4.md) | 索引 |
20
+
21
+ <b>Returns:</b>
22
+
23
+ [Axis4Name](./type-tls.axis4name.md)
24
+
25
+
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [Axis4Name](./type-tls.axis4name.md)
4
+
5
+ ## Axis4Name type
6
+
7
+ 四维轴的名字
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export declare type Axis4Name = "x" | "y" | "z";
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [AxisName](./type-tls.axisname.md)
4
+
5
+ ## AxisName type
6
+
7
+ 轴名
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export declare type AxisName = "x" | "y" | "z";
13
+ ```
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [IVector](./type-tls.ivector.md)
4
+
5
+ ## IVector type
6
+
7
+ 向量
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export declare type IVector = IVector2 | IVector3 | IVector4;
13
+ ```
14
+ <b>References:</b> [IVector2](./type-tls.ivector2.md)<!-- -->, [IVector3](./type-tls.ivector3.md)<!-- -->, [IVector4](./type-tls.ivector4.md)
15
+
@@ -0,0 +1,21 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [IVector2](./type-tls.ivector2.md)
4
+
5
+ ## IVector2 interface
6
+
7
+ 二维向量
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export interface IVector2
13
+ ```
14
+
15
+ ## Properties
16
+
17
+ | Property | Modifiers | Type | Description |
18
+ | --- | --- | --- | --- |
19
+ | [x](./type-tls.ivector2.x.md) | | number | |
20
+ | [y](./type-tls.ivector2.y.md) | | number | |
21
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [IVector2](./type-tls.ivector2.md) &gt; [x](./type-tls.ivector2.x.md)
4
+
5
+ ## IVector2.x property
6
+
7
+ <b>Signature:</b>
8
+
9
+ ```typescript
10
+ x: number;
11
+ ```
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [IVector2](./type-tls.ivector2.md) &gt; [y](./type-tls.ivector2.y.md)
4
+
5
+ ## IVector2.y property
6
+
7
+ <b>Signature:</b>
8
+
9
+ ```typescript
10
+ y: number;
11
+ ```
@@ -0,0 +1,21 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [IVector3](./type-tls.ivector3.md)
4
+
5
+ ## IVector3 interface
6
+
7
+ 三维向量
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export interface IVector3 extends IVector2
13
+ ```
14
+ <b>Extends:</b> [IVector2](./type-tls.ivector2.md)
15
+
16
+ ## Properties
17
+
18
+ | Property | Modifiers | Type | Description |
19
+ | --- | --- | --- | --- |
20
+ | [z](./type-tls.ivector3.z.md) | | number | |
21
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [IVector3](./type-tls.ivector3.md) &gt; [z](./type-tls.ivector3.z.md)
4
+
5
+ ## IVector3.z property
6
+
7
+ <b>Signature:</b>
8
+
9
+ ```typescript
10
+ z: number;
11
+ ```
@@ -0,0 +1,21 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [IVector4](./type-tls.ivector4.md)
4
+
5
+ ## IVector4 interface
6
+
7
+ 四维向量
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export interface IVector4 extends IVector3
13
+ ```
14
+ <b>Extends:</b> [IVector3](./type-tls.ivector3.md)
15
+
16
+ ## Properties
17
+
18
+ | Property | Modifiers | Type | Description |
19
+ | --- | --- | --- | --- |
20
+ | [w](./type-tls.ivector4.w.md) | | number | |
21
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [IVector4](./type-tls.ivector4.md) &gt; [w](./type-tls.ivector4.w.md)
4
+
5
+ ## IVector4.w property
6
+
7
+ <b>Signature:</b>
8
+
9
+ ```typescript
10
+ w: number;
11
+ ```
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [KeyOfContainsValue](./type-tls.keyofcontainsvalue.md)
4
+
5
+ ## KeyOfContainsValue type
6
+
7
+ 获取值类型包含指定类型的所有 key
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export declare type KeyOfContainsValue<Target, Value> = {
13
+ [K in keyof Target]: Value extends Target[K] ? K : never;
14
+ }[keyof Target];
15
+ ```
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [KeyOfNonContainsValue](./type-tls.keyofnoncontainsvalue.md)
4
+
5
+ ## KeyOfNonContainsValue type
6
+
7
+ 获取值类型不应包含指定类型的所有 key
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export declare type KeyOfNonContainsValue<Target, Value> = {
13
+ [K in keyof Target]: Value extends Target[K] ? never : K;
14
+ }[keyof Target];
15
+ ```
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [KeyOfNonValue](./type-tls.keyofnonvalue.md)
4
+
5
+ ## KeyOfNonValue type
6
+
7
+ 获取值类型不是指定类型的所有 key
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export declare type KeyOfNonValue<Target, Value> = {
13
+ [K in keyof Target]: Target[K] extends Value ? never : K;
14
+ }[keyof Target];
15
+ ```
@@ -10,6 +10,13 @@
10
10
 
11
11
  type-tls 封装了与类型相关的工具,比如获取数据的类型 或 类型名字、判断数据的类型 等
12
12
 
13
+ ## Enumerations
14
+
15
+ | Enumeration | Description |
16
+ | --- | --- |
17
+ | [Axis](./type-tls.axis.md) | 轴 |
18
+ | [Axis4](./type-tls.axis4.md) | 四维轴 |
19
+
13
20
  ## Functions
14
21
 
15
22
  | Function | Description |
@@ -50,15 +57,32 @@ type-tls 封装了与类型相关的工具,比如获取数据的类型 或 类
50
57
  | Interface | Description |
51
58
  | --- | --- |
52
59
  | [ClassType](./type-tls.classtype.md) | 类的类型、构造函数的类型 |
60
+ | [IVector2](./type-tls.ivector2.md) | 二维向量 |
61
+ | [IVector3](./type-tls.ivector3.md) | 三维向量 |
62
+ | [IVector4](./type-tls.ivector4.md) | 四维向量 |
53
63
  | [PrivateMemberOfExtend](./type-tls.privatememberofextend.md) | 用于定义扩展选项中的私有成员 |
54
64
 
65
+ ## Namespaces
66
+
67
+ | Namespace | Description |
68
+ | --- | --- |
69
+ | [Axis](./type-tls.axis.md) | 轴的方法 |
70
+ | [Axis4](./type-tls.axis4.md) | 四维轴的方法 |
71
+
55
72
  ## Type Aliases
56
73
 
57
74
  | Type Alias | Description |
58
75
  | --- | --- |
59
76
  | [AnyFunction](./type-tls.anyfunction.md) | 表示任意的函数类型 |
77
+ | [ArrayItemType](./type-tls.arrayitemtype.md) | 获取数组元素的类型 |
78
+ | [Axis4Name](./type-tls.axis4name.md) | 四维轴的名字 |
79
+ | [AxisName](./type-tls.axisname.md) | 轴名 |
60
80
  | [ExactType](./type-tls.exacttype.md) | 精确类型 |
61
81
  | [ExactTypeName](./type-tls.exacttypename.md) | 精确类型的字符串表示 |
82
+ | [IVector](./type-tls.ivector.md) | 向量 |
83
+ | [KeyOfContainsValue](./type-tls.keyofcontainsvalue.md) | 获取值类型包含指定类型的所有 key |
84
+ | [KeyOfNonContainsValue](./type-tls.keyofnoncontainsvalue.md) | 获取值类型不应包含指定类型的所有 key |
85
+ | [KeyOfNonValue](./type-tls.keyofnonvalue.md) | 获取值类型不是指定类型的所有 key |
62
86
  | [KeyOfValue](./type-tls.keyofvalue.md) | 获取值类型为指定类型的所有 key |
63
87
  | [LooseType](./type-tls.loosetype.md) | 宽松的类型 |
64
88
  | [LooseTypeName](./type-tls.loosetypename.md) | 宽松类型的字符串表示 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "type-tls",
3
- "version": "2.4.4",
3
+ "version": "2.5.0",
4
4
  "description": "type-tls 封装了与类型相关的工具,比如:获取数据的类型 或 类型名字、判断数据的类型 等",
5
5
  "main": "dist/type-tls.umd.js",
6
6
  "module": "dist/type-tls.mjs",