Add tests for optional fields

master
Paul Loyd 2017-12-03 15:56:28 +03:00
parent b8e69e10a4
commit 50bbfe26fb
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,9 @@
type Type = {
a?: string,
};
interface Interface {
a?: boolean;
};
export {Type, Interface};

View File

@ -0,0 +1,12 @@
- kind: record
fields:
- name: a
value: {kind: string}
required: false
id: [optionals, Type]
- kind: record
fields:
- name: a
value: {kind: boolean}
required: false
id: [optionals, Interface]