@gi-tcg/gts-runtime 0.3.9 → 0.3.10

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
@@ -171,7 +171,7 @@ declare class AttributeDefHelper<ModelT> {
171
171
  };
172
172
  <Args extends any[], U>(action: (this: ModelT, ...args: Args) => void, binder: (this: ModelT, ...args: Args) => U): {
173
173
  (...args: Args): AttributeReturn.Done;
174
- as?(): U;
174
+ as(): U;
175
175
  };
176
176
  };
177
177
  simpleAttribute<const Options extends SimpleAttributeOptions>(options: Options): {
@@ -180,7 +180,7 @@ declare class AttributeDefHelper<ModelT> {
180
180
  }, Options>;
181
181
  <Args extends any[], U>(action: (this: ModelT, ...args: Args) => void, binder: (this: ModelT, ...args: Args) => U): WithSimpleOptions<{
182
182
  (...args: Args): AttributeReturn.Done;
183
- as?(): U;
183
+ as(): U;
184
184
  }, Options>;
185
185
  };
186
186
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gi-tcg/gts-runtime",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/piovium/gts.git"
package/src/view_model.ts CHANGED
@@ -201,7 +201,7 @@ class AttributeDefHelper<ModelT> {
201
201
  <Args extends any[], U>(
202
202
  action: (this: ModelT, ...args: Args) => void,
203
203
  binder: (this: ModelT, ...args: Args) => U,
204
- ): { (...args: Args): AttributeReturn.Done; as?(): U };
204
+ ): { (...args: Args): AttributeReturn.Done; as(): U };
205
205
  };
206
206
  simpleAttribute<const Options extends SimpleAttributeOptions>(
207
207
  options: Options,
@@ -213,14 +213,14 @@ class AttributeDefHelper<ModelT> {
213
213
  action: (this: ModelT, ...args: Args) => void,
214
214
  binder: (this: ModelT, ...args: Args) => U,
215
215
  ): WithSimpleOptions<
216
- { (...args: Args): AttributeReturn.Done; as?(): U },
216
+ { (...args: Args): AttributeReturn.Done; as(): U },
217
217
  Options
218
218
  >;
219
219
  };
220
220
  simpleAttribute(options?: SimpleAttributeOptions) {
221
221
  return (
222
222
  action: (this: ModelT, ...args: any[]) => void,
223
- binder?: (...args: any[]) => any,
223
+ binder?: (this: ModelT, ...args: any[]) => any,
224
224
  ) => {
225
225
  const action2: AttributeAction<ModelT, any> = (model, positionals) =>
226
226
  action.apply(model, positionals);