mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 21:07:52 -05:00
Added tests.
This commit is contained in:
@@ -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;
|
||||
@@ -0,0 +1,9 @@
|
||||
// @strictNullChecks: true
|
||||
// @declaration: true
|
||||
|
||||
interface Foo {
|
||||
a?: string;
|
||||
b: string;
|
||||
}
|
||||
|
||||
<Foo>{ a: undefined };
|
||||
Reference in New Issue
Block a user