Skip to content

Commit ffed248

Browse files
Added tests.
1 parent 0e879c0 commit ffed248

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// @strictNullChecks: true
2+
// @declaration: true
3+
4+
interface Foo {
5+
required1: string;
6+
required2: string;
7+
optional?: string;
8+
}
9+
10+
const foo1 = { required1: "hello" } as Foo;
11+
const foo2 = { required1: "hello", optional: "bar" } as Foo;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// @strictNullChecks: true
2+
// @declaration: true
3+
4+
interface Foo {
5+
a?: string;
6+
b: string;
7+
}
8+
9+
<Foo>{ a: undefined };

0 commit comments

Comments
 (0)