aboutsummaryrefslogtreecommitdiff
path: root/src/debug/Test.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-04-22 03:39:39 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-04-22 03:39:39 -0400
commit5a9e437bbd175b36a161e1d96c8ae873dfe6d105 (patch)
tree0f54896387bb601aa18ee0be511a6059400d17eb /src/debug/Test.tsx
parent393d351420b3a0d28f4cd1ea8b674fa5d04bfcde (diff)
More
Diffstat (limited to 'src/debug/Test.tsx')
-rw-r--r--src/debug/Test.tsx13
1 files changed, 2 insertions, 11 deletions
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<number>,
+ fields: listSpec("number"),
url: "number",
testDoc: ImageField
});
@@ -30,13 +28,6 @@ const schema2 = createSchema({
const Test2Doc = makeStrictInterface(schema2);
type Test2Doc = makeStrictInterface<typeof schema2>;
-const schema3 = createSchema({
- test: "boolean",
-});
-
-const Test3Doc = makeStrictInterface(schema3);
-type Test3Doc = makeStrictInterface<typeof schema3>;
-
const assert = (bool: boolean) => {
if (!bool) throw new Error();
};