diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-04-20 01:33:50 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-04-20 01:33:50 -0400 |
commit | 4bf22b6095cee078403e4ac11743e7aaa557956c (patch) | |
tree | a11b9db9df6165d92a51b1e74ed741c81d52e622 /src/new_fields/Schema.ts | |
parent | e3ad2c2c8f920a5538541b8e495af52815e36dc6 (diff) | |
parent | 425ea0bacbb40312c5f722f27bf0ca93fe0b17b3 (diff) |
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web into newDocs
Diffstat (limited to 'src/new_fields/Schema.ts')
-rw-r--r-- | src/new_fields/Schema.ts | 4 |
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) { |