@zwa73/utils 1.0.62 → 1.0.63

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.
@@ -99,5 +99,5 @@ export type MethodsThisAs<Methods, T> = {
99
99
  * @template T - 目标this类型
100
100
  * @param prototype - 类的原型
101
101
  */
102
- export declare function assignThisAs<Self, T>(prototype: MethodsThisAs<Self, T>): void;
102
+ export declare function assertThisAs<Self, T>(prototype: MethodsThisAs<Self, T>): void;
103
103
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assignThisAs = exports.stringifyJToken = void 0;
3
+ exports.assertThisAs = exports.stringifyJToken = void 0;
4
4
  /**将JToken转换为字符串
5
5
  * @param token - 待转换的Token
6
6
  * @param space - 插入的空格 数字为空格数量 默认为制表符\t
@@ -19,5 +19,5 @@ exports.stringifyJToken = stringifyJToken;
19
19
  * @template T - 目标this类型
20
20
  * @param prototype - 类的原型
21
21
  */
22
- function assignThisAs(prototype) { }
23
- exports.assignThisAs = assignThisAs;
22
+ function assertThisAs(prototype) { }
23
+ exports.assertThisAs = assertThisAs;
@@ -41,7 +41,7 @@ function composeC(obj) {
41
41
  return ob3;
42
42
  }
43
43
  exports.C = _C;
44
- (0, __1.assignThisAs)(exports.C.prototype);
44
+ (0, __1.assertThisAs)(exports.C.prototype);
45
45
  const insc = exports.C.create(); //?
46
46
  insc.getC().testFunc(); //?
47
47
  insc.testFunc(); //?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zwa73/utils",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "description": "my utils",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -155,4 +155,4 @@ export type MethodsThisAs<Methods, T> = {
155
155
  * @template T - 目标this类型
156
156
  * @param prototype - 类的原型
157
157
  */
158
- export function assignThisAs<Self,T>(prototype: MethodsThisAs<Self, T>) {}
158
+ export function assertThisAs<Self,T>(prototype: MethodsThisAs<Self, T>) {}
@@ -1,4 +1,4 @@
1
- import { UtilFP, UtilFunc, assignThisAs } from ".."
1
+ import { UtilFP, UtilFunc, assertThisAs } from ".."
2
2
 
3
3
  class A {
4
4
  private num = 1;
@@ -39,7 +39,7 @@ function composeC(obj:_C){
39
39
  }
40
40
  export type C = ReturnType<typeof composeC>;
41
41
  export const C = _C;
42
- assignThisAs<_C,C>(C.prototype);
42
+ assertThisAs<_C,C>(C.prototype);
43
43
 
44
44
  const insc:C=C.create();//?
45
45
  insc.getC().testFunc()//?