-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
932 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* @title Some title here | ||
* @description Some description here | ||
*/ | ||
export interface MyObject { | ||
/** | ||
* @minLength 123 | ||
* @default {"abc": 123} | ||
*/ | ||
validJsDoc: any; | ||
/** | ||
* @minLength ABC | ||
* @default {"abc": ABC} | ||
*/ | ||
invalidJsDoc: any; | ||
/** | ||
* @minLength | ||
* @default | ||
*/ | ||
emptyJsDoc: any; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$ref": "#/definitions/MyObject", | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"definitions": { | ||
"MyObject": { | ||
"additionalProperties": false, | ||
"description": "Some description here", | ||
"title": "Some title here", | ||
"properties": { | ||
"validJsDoc": { | ||
"default": {"abc": 123}, | ||
"minLength": 123 | ||
}, | ||
"invalidJsDoc": {}, | ||
"emptyJsDoc": {} | ||
}, | ||
"required": [ | ||
"validJsDoc", | ||
"invalidJsDoc", | ||
"emptyJsDoc" | ||
], | ||
"type": "object" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
let obj; | ||
export type MyType = typeof obj; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export enum MyType { | ||
ABC = (1 + 2 + 3), | ||
DEF = ("123" + "456") as any, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export enum Enum { | ||
INDEX_1, | ||
INDEX_2, | ||
|
||
NUMBER_1 = 10, | ||
NUMBER_2 = 20, | ||
|
||
BOOL_1 = true as any, | ||
BOOL_2 = false as any, | ||
|
||
STR_1 = "str" as any, | ||
STR_2 = `tpl` as any, | ||
|
||
NULL_1 = null, | ||
NULL_2 = null as any, | ||
|
||
ANY_1 = <any>true, | ||
ANY_2 = <any>100, | ||
ANY_3 = <any>"any", | ||
ANY_4 = <any>null, | ||
|
||
COMPLEX = (<any>"()" as any) as any, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"$ref": "#/definitions/Enum", | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"definitions": { | ||
"Enum": { | ||
"type": [ | ||
"number", | ||
"boolean", | ||
"string", | ||
"null" | ||
], | ||
"enum": [ | ||
0, | ||
1, | ||
10, | ||
20, | ||
true, | ||
false, | ||
"str", | ||
"tpl", | ||
null, | ||
100, | ||
"any", | ||
"()" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
export enum Enum { | ||
A, // = 0 | ||
B = 1, | ||
C = true as any, | ||
D = "str" as any, | ||
E = null, | ||
X = "x", | ||
Y = 100, | ||
} |
Oops, something went wrong.