Added tests.

This commit is contained in:
Daniel Rosenwasser
2016-11-12 12:46:01 -08:00
parent 0e879c0bbf
commit ffed2484d3
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
// @strictNullChecks: true
// @declaration: true
interface Foo {
required1: string;
required2: string;
optional?: string;
}
const foo1 = { required1: "hello" } as Foo;
const foo2 = { required1: "hello", optional: "bar" } as Foo;

View File

@@ -0,0 +1,9 @@
// @strictNullChecks: true
// @declaration: true
interface Foo {
a?: string;
b: string;
}
<Foo>{ a: undefined };