aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Schema.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/new_fields/Schema.ts')
-rw-r--r--src/new_fields/Schema.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/new_fields/Schema.ts b/src/new_fields/Schema.ts
index 27b9635af..1607d4c15 100644
--- a/src/new_fields/Schema.ts
+++ b/src/new_fields/Schema.ts
@@ -1,8 +1,8 @@
import { Interface, ToInterface, Cast, FieldCtor, ToConstructor } from "./Types";
import { Doc } from "./Doc";
-export type makeInterface<T extends Interface> = Partial<ToInterface<T>> & Doc;
-export function makeInterface<T extends Interface>(schema: T): (doc: Doc) => makeInterface<T> {
+export type makeInterface<T extends Interface, U extends Doc = Doc> = Partial<ToInterface<T>> & U;
+export function makeInterface<T extends Interface, U extends Doc>(schema: T): (doc: U) => makeInterface<T, U> {
return function (doc: any) {
return new Proxy(doc, {
get(target, prop) {