@gi-tcg/gts-runtime 0.6.4 → 0.6.6
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 +2 -2
- package/package.json +1 -1
- package/src/simple_view_model.ts +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -260,9 +260,9 @@ type SimpleViewModelAttribute<ValueT, Options extends SimpleViewModelOptions> =
|
|
|
260
260
|
(value: ValueT): AttributeReturn.Done;
|
|
261
261
|
} & (Options["recursive"] extends true ? IsSingleton<ExtractObject<ValueT>> extends true ? {
|
|
262
262
|
(): AttributeReturn.With<SimpleViewModel<ExtractObject<ValueT>, Options>>;
|
|
263
|
-
} : Options["booleanSwitch"] extends true ?
|
|
263
|
+
} : {} : Options["booleanSwitch"] extends true ? true extends ValueT ? {
|
|
264
264
|
(): AttributeReturn.Done;
|
|
265
|
-
} : {} : {}
|
|
265
|
+
} : {} : {});
|
|
266
266
|
interface SimpleViewModel<T, Options extends SimpleViewModelOptions = {}> extends IViewModel<T, { [K in keyof T]-?: SimpleViewModelAttribute<T[K], Options> & {
|
|
267
267
|
uniqueKey(): K;
|
|
268
268
|
required(): {} extends Pick<T, K> ? false : true;
|
package/package.json
CHANGED
package/src/simple_view_model.ts
CHANGED
|
@@ -37,12 +37,12 @@ type SimpleViewModelAttribute<
|
|
|
37
37
|
SimpleViewModel<ExtractObject<ValueT>, Options>
|
|
38
38
|
>;
|
|
39
39
|
}
|
|
40
|
-
:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
: {}
|
|
41
|
+
: Options["booleanSwitch"] extends true
|
|
42
|
+
? true extends ValueT
|
|
43
|
+
? { (): AttributeReturn.Done }
|
|
44
44
|
: {}
|
|
45
|
-
|
|
45
|
+
: {});
|
|
46
46
|
|
|
47
47
|
export interface SimpleViewModel<
|
|
48
48
|
T,
|