Skip to content

Commit 2d5c980

Browse files
committed
update docusaurus
1 parent 16f1feb commit 2d5c980

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

website/src/pages/index.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,42 @@ const filteredUsers = frontendFiltering(selectedUsers);
10971097
const frequencies = signal.FFT();
10981098
```
10991099
1100+
#### TSDoc Comments
1101+
1102+
Unlike regular comments, [TSDoc](https://tsdoc.org/) comments are encouraged because they enhance code maintainability and developer experience. They provide structured documentation that tools like IDEs, TypeScript, API generators (Swagger/OpenAPI/GraphQL) can interpret.
1103+
1104+
Use TSDoc comments when documenting APIs, libraries, configuration or reusable code.
1105+
1106+
```ts
1107+
/**
1108+
* Configuration options for the Web3 SDK.
1109+
*/
1110+
export type Web3Config = {
1111+
/**
1112+
* Ethereum network chain ID.
1113+
*/
1114+
chainId: number;
1115+
1116+
/**
1117+
* Gas price strategy for transactions.
1118+
* - `fast`: Higher fees, faster confirmation.
1119+
* - `standard`: Balanced.
1120+
* - `slow`: Lower fees, slower confirmation.
1121+
*/
1122+
gasPriceStrategy: 'fast' | 'standard' | 'slow';
1123+
1124+
/**
1125+
* Maximum gas limit per transaction.
1126+
*/
1127+
maxGasLimit?: number;
1128+
1129+
/**
1130+
* Enables event listening for smart contract interactions.
1131+
*/
1132+
enableEventListener?: boolean;
1133+
};
1134+
```
1135+
11001136
## Source Organization
11011137
11021138
### Code Collocation

0 commit comments

Comments
 (0)