forked from YousefED/typescript-json-schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
40 lines (36 loc) · 717 Bytes
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
interface MySubObject {
bool: boolean;
string: string;
object: object | null;
/**
* @examples require('./examples.ts').mySubObject2Example
*/
subObject?: MySubObject2;
}
export interface MySubObject2 {
bool: boolean;
string: string;
object: object;
}
export interface MyDefaultObject {
age: number;
name: string;
free?: boolean;
}
export interface MyObject {
/**
* @examples require(".").innerExample
*/
filled: MySubObject;
/**
* @examples require('./examples.ts')
*/
defaultObject: MyDefaultObject;
}
export const innerExample: MySubObject[] = [
{
bool: true,
string: "string",
object: {}
},
];