@decocms/runtime 1.1.2 → 1.1.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/bindings.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/runtime",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "check": "tsc --noEmit",
package/src/bindings.ts CHANGED
@@ -33,12 +33,12 @@ export type BindingRegistry = Record<string, readonly ToolBinder[]>;
33
33
  */
34
34
  export const BindingOf = <
35
35
  TRegistry extends BindingRegistry,
36
- TName extends keyof TRegistry | "*",
36
+ TName extends (keyof TRegistry | "*") & z.util.Literal,
37
37
  >(
38
38
  name: TName,
39
39
  ) => {
40
40
  return z.object({
41
- __type: z.literal(name as string).default(name as string),
41
+ __type: z.literal(name).default(name as any),
42
42
  value: z.string(),
43
43
  });
44
44
  };