From 5a9e437bbd175b36a161e1d96c8ae873dfe6d105 Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Mon, 22 Apr 2019 03:39:39 -0400 Subject: More --- src/debug/Test.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/debug') diff --git a/src/debug/Test.tsx b/src/debug/Test.tsx index 22a39f31e..179f987e0 100644 --- a/src/debug/Test.tsx +++ b/src/debug/Test.tsx @@ -1,12 +1,10 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { SerializationHelper } from '../client/util/SerializationHelper'; -import { createSchema, makeInterface, makeStrictInterface } from '../new_fields/Schema'; +import { createSchema, makeInterface, makeStrictInterface, listSpec } from '../new_fields/Schema'; import { ImageField } from '../new_fields/URLField'; import { Doc } from '../new_fields/Doc'; -import { ListSpec } from '../new_fields/Types'; import { List } from '../new_fields/List'; -const JsxParser = require('react-jsx-parser').default; //TODO Why does this need to be imported like this? const schema1 = createSchema({ hello: "number", @@ -22,7 +20,7 @@ type TestDoc = makeInterface<[typeof schema1]>; const schema2 = createSchema({ hello: ImageField, test: "boolean", - fields: { List: "number" } as ListSpec, + fields: listSpec("number"), url: "number", testDoc: ImageField }); @@ -30,13 +28,6 @@ const schema2 = createSchema({ const Test2Doc = makeStrictInterface(schema2); type Test2Doc = makeStrictInterface; -const schema3 = createSchema({ - test: "boolean", -}); - -const Test3Doc = makeStrictInterface(schema3); -type Test3Doc = makeStrictInterface; - const assert = (bool: boolean) => { if (!bool) throw new Error(); }; -- cgit v1.2.3-70-g09d2