File tree Expand file tree Collapse file tree 3 files changed +6
-14
lines changed Expand file tree Collapse file tree 3 files changed +6
-14
lines changed Original file line number Diff line number Diff line change 1
- export interface ArrayThatIsReadonly {
2
- test : ReadonlyArray < any > ;
3
- }
1
+ export type MyReadOnlyArray = ReadonlyArray < number > ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"$schema" : " http://json-schema.org/draft-04/schema#" ,
3
- "type" : " object" ,
4
- "properties" : {
5
- "test" : {
6
- "type" : " array" ,
7
- "items" : {}
8
- }
9
- },
10
- "required" : [
11
- " test"
12
- ]
3
+ "type" : " array" ,
4
+ "items" : {
5
+ "type" : " number"
6
+ }
13
7
}
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ describe("schema", () => {
68
68
assertSchema ( "string-literals" , "main.ts" , "MyObject" ) ;
69
69
assertSchema ( "string-literals-inline" , "main.ts" , "MyObject" ) ;
70
70
71
- assertSchema ( "array-readonly" , "main.ts" , "ArrayThatIsReadonly " ) ;
71
+ assertSchema ( "array-readonly" , "main.ts" , "MyReadOnlyArray " ) ;
72
72
assertSchema ( "array-types" , "main.ts" , "MyArray" ) ;
73
73
assertSchema ( "map-types" , "main.ts" , "MyObject" ) ;
74
74
You can’t perform that action at this time.
0 commit comments