glass-easel-miniprogram-adapter 0.8.0 → 0.8.2

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.
@@ -449,22 +449,22 @@ type Lifetimes = {
449
449
  interface BuilderContext<TPrevData extends DataList$4, TProperty extends PropertyList$4, TMethodCaller> extends ThisType<TMethodCaller> {
450
450
  self: TMethodCaller;
451
451
  data: typeUtils.Merge<typeUtils.DataWithPropertyValues<TPrevData, TProperty>>;
452
- setData: (newData: Partial<typeUtils.SetDataSetter<TPrevData>>, callback?: () => void) => void;
452
+ setData: (this: void, newData: Partial<typeUtils.SetDataSetter<TPrevData>>, callback?: () => void) => void;
453
453
  implement: <TIn extends {
454
454
  [x: string]: any;
455
- }>(traitBehavior: TraitBehavior<TIn, any>, impl: TIn) => void;
455
+ }>(this: void, traitBehavior: TraitBehavior<TIn, any>, impl: TIn) => void;
456
456
  relation<TOut extends {
457
457
  [key: string]: any;
458
- }>(def: TraitRelationParams<TOut> & ThisType<TMethodCaller>): RelationHandler<any, TOut>;
459
- relation(def: RelationParams & ThisType<TMethodCaller>): RelationHandler<any, never>;
460
- observer<P extends typeUtils.ObserverDataPathStrings<typeUtils.DataWithPropertyValues<TPrevData, TProperty>>, V = typeUtils.GetFromObserverPathString<typeUtils.DataWithPropertyValues<TPrevData, TProperty>, P>>(paths: P, func: (newValue: V) => void): void;
458
+ }>(this: void, def: TraitRelationParams<TOut> & ThisType<TMethodCaller>): RelationHandler<any, TOut>;
459
+ relation(this: void, def: RelationParams & ThisType<TMethodCaller>): RelationHandler<any, never>;
460
+ observer<P extends typeUtils.ObserverDataPathStrings<typeUtils.DataWithPropertyValues<TPrevData, TProperty>>, V = typeUtils.GetFromObserverPathString<typeUtils.DataWithPropertyValues<TPrevData, TProperty>, P>>(this: void, paths: P, func: (newValue: V) => void): void;
461
461
  observer<P extends typeUtils.ObserverDataPathStrings<typeUtils.DataWithPropertyValues<TPrevData, TProperty>>[], V = {
462
462
  [K in keyof P]: typeUtils.GetFromObserverPathString<typeUtils.DataWithPropertyValues<TPrevData, TProperty>, P[K]>;
463
- }>(paths: readonly [...P], func: (...newValues: V extends any[] ? V : never) => void): void;
464
- lifetime: <L extends keyof Lifetimes>(name: L, func: Lifetimes[L]) => void;
465
- pageLifetime: (name: string, func: (...args: any[]) => void) => void;
466
- method: <Fn extends ComponentMethod$3>(func: Fn) => TaggedMethod$3<Fn>;
467
- listener: <T>(func: glassEasel.EventListener<T>) => TaggedMethod$3<glassEasel.EventListener<T>>;
463
+ }>(this: void, paths: readonly [...P], func: (...newValues: V extends any[] ? V : never) => void): void;
464
+ lifetime: <L extends keyof Lifetimes>(this: void, name: L, func: Lifetimes[L]) => void;
465
+ pageLifetime: (this: void, name: string, func: (...args: any[]) => void) => void;
466
+ method: <Fn extends ComponentMethod$3>(this: void, func: Fn) => TaggedMethod$3<Fn>;
467
+ listener: <T>(this: void, func: glassEasel.EventListener<T>) => TaggedMethod$3<glassEasel.EventListener<T>>;
468
468
  }
469
469
 
470
470
  type Empty$3 = typeUtils.Empty;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "glass-easel-miniprogram-adapter",
3
3
  "description": "The MiniProgram interface adapter of the glass-easel project",
4
- "version": "0.8.0",
4
+ "version": "0.8.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/wechat-miniprogram/glass-easel.git"
@@ -19,11 +19,11 @@
19
19
  "module": "dist/glass_easel_miniprogram_adapter.es.js",
20
20
  "types": "dist/glass_easel_miniprogram_adapter.d.js",
21
21
  "peerDependencies": {
22
- "glass-easel": "0.8.0"
22
+ "glass-easel": "0.8.2"
23
23
  },
24
24
  "devDependencies": {
25
- "glass-easel": "0.8.0",
26
- "glass-easel-template-compiler": "0.8.0"
25
+ "glass-easel": "0.8.2",
26
+ "glass-easel-template-compiler": "0.8.2"
27
27
  },
28
28
  "scripts": {
29
29
  "doc": "typedoc src/index.ts --excludePrivate --excludeProtected --excludeInternal",
@@ -56,15 +56,21 @@ export interface BuilderContext<
56
56
  > extends ThisType<TMethodCaller> {
57
57
  self: TMethodCaller
58
58
  data: typeUtils.Merge<typeUtils.DataWithPropertyValues<TPrevData, TProperty>>
59
- setData: (newData: Partial<typeUtils.SetDataSetter<TPrevData>>, callback?: () => void) => void
59
+ setData: (
60
+ this: void,
61
+ newData: Partial<typeUtils.SetDataSetter<TPrevData>>,
62
+ callback?: () => void,
63
+ ) => void
60
64
  implement: <TIn extends { [x: string]: any }>(
65
+ this: void,
61
66
  traitBehavior: TraitBehavior<TIn, any>,
62
67
  impl: TIn,
63
68
  ) => void
64
69
  relation<TOut extends { [key: string]: any }>(
70
+ this: void,
65
71
  def: TraitRelationParams<TOut> & ThisType<TMethodCaller>,
66
72
  ): RelationHandler<any, TOut>
67
- relation(def: RelationParams & ThisType<TMethodCaller>): RelationHandler<any, never>
73
+ relation(this: void, def: RelationParams & ThisType<TMethodCaller>): RelationHandler<any, never>
68
74
  observer<
69
75
  P extends typeUtils.ObserverDataPathStrings<
70
76
  typeUtils.DataWithPropertyValues<TPrevData, TProperty>
@@ -74,6 +80,7 @@ export interface BuilderContext<
74
80
  P
75
81
  >,
76
82
  >(
83
+ this: void,
77
84
  paths: P,
78
85
  func: (newValue: V) => void,
79
86
  ): void
@@ -88,11 +95,15 @@ export interface BuilderContext<
88
95
  >
89
96
  },
90
97
  >(
98
+ this: void,
91
99
  paths: readonly [...P],
92
100
  func: (...newValues: V extends any[] ? V : never) => void,
93
101
  ): void
94
- lifetime: <L extends keyof Lifetimes>(name: L, func: Lifetimes[L]) => void
95
- pageLifetime: (name: string, func: (...args: any[]) => void) => void
96
- method: <Fn extends ComponentMethod>(func: Fn) => TaggedMethod<Fn>
97
- listener: <T>(func: glassEasel.EventListener<T>) => TaggedMethod<glassEasel.EventListener<T>>
102
+ lifetime: <L extends keyof Lifetimes>(this: void, name: L, func: Lifetimes[L]) => void
103
+ pageLifetime: (this: void, name: string, func: (...args: any[]) => void) => void
104
+ method: <Fn extends ComponentMethod>(this: void, func: Fn) => TaggedMethod<Fn>
105
+ listener: <T>(
106
+ this: void,
107
+ func: glassEasel.EventListener<T>,
108
+ ) => TaggedMethod<glassEasel.EventListener<T>>
98
109
  }