pwi-plata-type 0.4.207 → 0.4.208
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/package.json +1 -1
- package/src/@types/model.d.ts +8 -3
package/package.json
CHANGED
package/src/@types/model.d.ts
CHANGED
|
@@ -35,10 +35,15 @@ declare namespace Model {
|
|
|
35
35
|
never
|
|
36
36
|
;
|
|
37
37
|
|
|
38
|
+
type HandleBrandTemplateEnvParamType<G extends unknown> =
|
|
39
|
+
G extends Brand<infer B> ? `${Brands[B]}` & { z__brand: B }
|
|
40
|
+
: `${G}`
|
|
41
|
+
;
|
|
42
|
+
|
|
38
43
|
type GetTemplateEnvParamType<const T extends PrimitiveValidationType<unknown, unknown>[]> =
|
|
39
|
-
T extends readonly [ PrimitiveValidationType<infer G, infer H> ] ?
|
|
40
|
-
T extends readonly [ PrimitiveValidationType<any, infer H>, PrimitiveValidationType<infer G, any> ] ?
|
|
41
|
-
T extends readonly [ PrimitiveValidationType<any, infer H>, ...any[], PrimitiveValidationType<infer G, any> ] ?
|
|
44
|
+
T extends readonly [ PrimitiveValidationType<infer G, infer H> ] ? HandleBrandTemplateEnvParamType<G> | H :
|
|
45
|
+
T extends readonly [ PrimitiveValidationType<any, infer H>, PrimitiveValidationType<infer G, any> ] ? HandleBrandTemplateEnvParamType<G> | H :
|
|
46
|
+
T extends readonly [ PrimitiveValidationType<any, infer H>, ...any[], PrimitiveValidationType<infer G, any> ] ? HandleBrandTemplateEnvParamType<G> | H :
|
|
42
47
|
never
|
|
43
48
|
;
|
|
44
49
|
|