File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -10,25 +10,27 @@ is important, because the JSON will be much more compact.
1010
1111Here's an example of a tuple definition in TypeScript:
1212
13- ``` typescript
13+ <!-- this code block uses four backticks ```` to workaround https://github.com/Kotlin/kotlinx-knit/issues/57 -->
14+
15+ ```` typescript
1416type StringNumberPair = [str : string , num : number ];
15- ```
17+ ````
1618
1719This would get serialized to a JSON array
1820
19- [ // ] : # ( @formatter:off )
21+ <!-- - @formatter:off -->
2022``` json
2123[" some string value" , 123 ]
2224```
23- [ // ] : # ( @formatter:on )
25+ <!-- - @formatter:on -->
2426
2527which is more compact than an equivalent JSON object, which requires property names.
2628
27- [ // ] : # ( @formatter:off )
29+ <!-- - @formatter:off -->
2830``` json
2931{ "str" : " some string value" , "num" : 123 }
3032```
31- [ // ] : # ( @formatter:on )
33+ <!-- - @formatter:on -->
3234
3335## Tuples in KxsTsGen
3436
You can’t perform that action at this time.
0 commit comments