Skip to content

Commit 26c7b8f

Browse files
committed
docs: remove unused declarations in code samples
1 parent 6c980e8 commit 26c7b8f

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

website/pages/docs/rules/no-leaked-conditional-rendering.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ function MyComponent({ items }: MyComponentProps) {
9393
// ^^^^^^^^^^^^
9494
// - Potential leaked value 'items.length' that might cause unintentionally rendered values or rendering crashes.
9595
}
96-
97-
declare const List: React.ComponentType<{ items: string[] }>;
9896
```
9997

10098
```tsx twoslash
@@ -109,8 +107,6 @@ function MyComponent({ items }: MyComponentProps) {
109107
// ^^^^^^^^
110108
// - Potential leaked value 'items[0]' that might cause unintentionally rendered values or rendering crashes.
111109
}
112-
113-
declare const List: React.ComponentType<{ items: string[] }>;
114110
```
115111

116112
```tsx twoslash
@@ -128,8 +124,6 @@ function MyComponent({ numberA, numberB }: MyComponentProps) {
128124
// - Potential leaked value '(numberA || numberB)' that might cause unintentionally rendered values or rendering crashes.
129125
);
130126
}
131-
132-
declare const Results: React.ComponentType<React.PropsWithChildren>;
133127
```
134128

135129
### Passing
@@ -196,8 +190,6 @@ interface MyComponentProps {
196190
function MyComponent({ items }: MyComponentProps) {
197191
return <div>{!!items.length && <List items={items} />}</div>;
198192
}
199-
200-
declare const List: React.ComponentType<{ items: string[] }>;
201193
```
202194

203195
```tsx twoslash
@@ -210,8 +202,6 @@ interface MyComponentProps {
210202
function MyComponent({ items }: MyComponentProps) {
211203
return <div>{Boolean(items.length) && <List items={items} />}</div>;
212204
}
213-
214-
declare const List: React.ComponentType<{ items: string[] }>;
215205
```
216206

217207
```tsx twoslash
@@ -224,8 +214,6 @@ interface MyComponentProps {
224214
function MyComponent({ items }: MyComponentProps) {
225215
return <div>{items.length > 0 && <List items={items} />}</div>;
226216
}
227-
228-
declare const List: React.ComponentType<{ items: string[] }>;
229217
```
230218

231219
```tsx twoslash
@@ -238,8 +226,6 @@ interface MyComponentProps {
238226
function MyComponent({ items }: MyComponentProps) {
239227
return <div>{items.length ? <List items={items} /> : null}</div>;
240228
}
241-
242-
declare const List: React.ComponentType<{ items: string[] }>;
243229
```
244230

245231
```tsx twoslash
@@ -252,9 +238,6 @@ interface MyComponentProps {
252238
function MyComponent({ items }: MyComponentProps) {
253239
return <div>{items.length ? <List items={items} /> : <EmptyList />}</div>;
254240
}
255-
256-
declare const List: React.ComponentType<{ items: string[] }>;
257-
declare const EmptyList: React.ComponentType;
258241
```
259242

260243
## Implementation

website/pages/docs/rules/no-missing-key.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ function MyComponent({ items }: MyComponentProps) {
5151
</ul>
5252
);
5353
}
54-
55-
declare const Todo: React.ComponentType<{ id: number; name: string }>;
5654
```
5755

5856
### Passing
@@ -71,8 +69,6 @@ function MyComponent({ items }: MyComponentProps) {
7169
</ul>
7270
);
7371
}
74-
75-
declare const Todo: React.ComponentType<{ id: number; name: string }>;
7672
```
7773

7874
## Implementation

0 commit comments

Comments
 (0)