Skip to content

Commit 8fb2304

Browse files
committed
fix warnings when using ID and ID_Field on data with types derived from json schema
1 parent 16e5d38 commit 8fb2304

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

builder/src/schema-to-ts.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { JSONSchema } from "./types.ts";
1+
import type { IDFields, JSONSchema } from "./types.ts";
22
import type { Cell, Stream } from "@commontools/runner";
33

44
export const schema = <T extends JSONSchema>(schema: T) => schema;
@@ -126,7 +126,8 @@ type ObjectFromProperties<
126126
: AP extends JSONSchema
127127
? { [key: string]: Schema<AP, Root, DecrementDepth<Depth>> }
128128
: Record<string | number | symbol, never>
129-
);
129+
)
130+
& IDFields;
130131

131132
// Restrict Depth to these numeric literal types
132133
type DepthLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;

0 commit comments

Comments
 (0)