Skip to content

Commit 1b5c34c

Browse files
committed
feat: trick to force TS Type highlighting
1 parent 6157216 commit 1b5c34c

File tree

4 files changed

+28
-12
lines changed

4 files changed

+28
-12
lines changed

index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
@import 'tailwindcss';
22

3+
/* hide dummy lines used to force TypeScript Type highlighting */
4+
code.nextra-code span[data-highlighted-line-id="hideDummyLine"] {
5+
display: none;
6+
}
7+
38
.ac-splitter {
49
margin-top: 2rem;
510
margin-bottom: 2rem;

pages/documents/bridge/client.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
The notify function below receives a table with the following structure:
66

7-
```ts
7+
```ts {1}#hideDummyLine
8+
type DUMMY =
89
{
910
title: string; // main text
1011
description?: string; // additional text

pages/documents/presets/fields.mdx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## Shared options
44
The following options are available and same for all field types.
55
Type specific options are supposed to be added among these.
6-
```ts
6+
```ts {1}#hideDummyLine
7+
type DUMMY =
78
{
89
label: string; // input label
910
placeholder?: string; // describes expected value
@@ -28,7 +29,8 @@ This is how the options are written in your standard Lua table.
2829
2930
3031
## Text
31-
```ts
32+
```ts {1}#hideDummyLine
33+
type DUMMY =
3234
{
3335
type: 'text';
3436
value?: string; // default value
@@ -41,7 +43,8 @@ For unlimited number of characters, set `max` to `-1` - although it's not recomm
4143
4244
4345
## Textarea
44-
```ts
46+
```ts {1}#hideDummyLine
47+
type DUMMY =
4548
{
4649
type: 'textarea';
4750
value?: string; // default value
@@ -57,7 +60,8 @@ For unlimited number of characters, set `max` to `-1` - although it's not recomm
5760
5861
5962
## Number
60-
```ts
63+
```ts {1}#hideDummyLine
64+
type DUMMY =
6165
{
6266
type: 'number';
6367
value?: number; // default value
@@ -73,7 +77,8 @@ For unlimited number of characters, set `max` to `-1` - although it's not recomm
7377
7478
7579
## Date
76-
```ts
80+
```ts {1}#hideDummyLine
81+
type DUMMY =
7782
{
7883
type: 'date';
7984
value?: string; // default value (only MM.DD.YYYY or MM/DD/YYYY format)
@@ -85,7 +90,8 @@ For unlimited number of characters, set `max` to `-1` - although it's not recomm
8590
8691
8792
## Signature
88-
```ts
93+
```ts {1}#hideDummyLine
94+
type DUMMY =
8995
{
9096
type: 'signature';
9197
value?: string; // default value
@@ -96,7 +102,8 @@ If you don't want the signature font pad to be visible, you can use the [`text`]
96102
97103
98104
## Select
99-
```ts
105+
```ts {1}#hideDummyLine
106+
type DUMMY =
100107
{
101108
type: 'select';
102109
value?: string; // default value (must be one of the options values)
@@ -112,12 +119,13 @@ data = {'Bob', 'John', 'George'}
112119
```
113120
114121
or an array of objects with the following structure.
115-
```ts
122+
```ts {1}#hideDummyLine
123+
type DUMMY =
116124
{
117125
value: string; // value that will be returned as an user input
118126
label?: string; // label that will be displayed in the select dropdown [default: value]
119127
disabled?: boolean; // whether the option is disabled
120-
group?: string; // group name
128+
group?: string; // group name
121129
}
122130
```
123131
```lua filename="Lua"

pages/scoreboard/config.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ Individual group rows shown in scoreboard.
175175
**Accepted values**
176176
`table[]` with the following structure:
177177

178-
```ts
178+
```ts {1}#hideDummyLine
179+
type DUMMY =
179180
{
180181
label: string; // Name of the group row shown in scoreboard
181182
groups: string[]; // Array of groups to include in this row's total count
@@ -192,7 +193,8 @@ To learn how to change the state of these indicators, see the guide [here](./gui
192193
**Accepted values**
193194
`table[]` with the following structure:
194195
195-
```ts
196+
```ts {1}#hideDummyLine
197+
type DUMMY =
196198
{
197199
id: string; // Unique identifier for the status indicator, used in your exports to change the state
198200
label: string; // Label visible in the hover tooltip

0 commit comments

Comments
 (0)