Skip to content

Commit 326a0f2

Browse files
committed
update tuples.md to workaround Knit bug
1 parent 61d8e90 commit 326a0f2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/tuples.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,27 @@ is important, because the JSON will be much more compact.
1010

1111
Here'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
1416
type StringNumberPair = [str: string, num: number];
15-
```
17+
````
1618

1719
This 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

2527
which 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

0 commit comments

Comments
 (0)