Skip to content

Commit e98a665

Browse files
chore: add dedicated TypeDoc configs for markdown documentation, add typedoc-plugin-frontmatter (#397)
1 parent 66242ab commit e98a665

File tree

27 files changed

+1530
-5
lines changed

27 files changed

+1530
-5
lines changed

typescript/TYPEDOC-README.md

Lines changed: 1131 additions & 0 deletions
Large diffs are not rendered by default.

typescript/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
"check:auth-crypto-imports": "tsx scripts/check-auth-crypto-imports.ts",
1313
"clean": "rm -rf src/_esm src/_cjs src/_types",
1414
"docs": "typedoc --options ./typedoc.json",
15-
"docs:md": "typedoc --plugin typedoc-plugin-markdown --out ./docs-md",
15+
"docs:md": "npm run docs:index && npm run docs:auth && npm run docs:evm && npm run docs:solana && npm run docs:policies && npm run docs:client",
16+
"docs:index": "typedoc --options ./typedoc.index.json",
17+
"docs:auth": "typedoc --options ./typedoc.auth.json",
18+
"docs:evm": "typedoc --options ./typedoc.evm.json",
19+
"docs:solana": "typedoc --options ./typedoc.solana.json",
20+
"docs:policies": "typedoc --options ./typedoc.policies.json",
21+
"docs:client": "typedoc --options ./typedoc.client.json",
1622
"format": "prettier -c .prettierrc --write \"**/*.{ts,js,cjs,json,md}\" && tsx scripts/sort-msw-index.ts",
1723
"format:check": "prettier -c .prettierrc --check \"**/*.{ts,js,cjs,json,md}\"",
1824
"lint": "eslint -c .eslintrc.json \"src/**/*.ts\"",
@@ -47,6 +53,7 @@
4753
"prettier": "^3.2.5",
4854
"tsx": "^4.19.3",
4955
"typedoc": "^0.28.7",
56+
"typedoc-plugin-frontmatter": "^1.3.0",
5057
"typedoc-plugin-markdown": "^4.8.0",
5158
"typescript": "^5.4.5",
5259
"uuid": "^11.1.0",

typescript/pnpm-lock.yaml

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typescript/src/accounts/evm/types.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @module Accounts
3+
*/
4+
15
import {
26
ListTokenBalancesNetworks,
37
RequestFaucetNetworks,
@@ -59,8 +63,8 @@ import type {
5963
WaitForTransactionReceiptParameters,
6064
} from "viem";
6165

62-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
63-
export type DistributedOmit<T, K extends PropertyKey> = T extends any ? Omit<T, K> : never;
66+
/** @internal */
67+
export type DistributedOmit<T, K extends PropertyKey> = T extends any ? Omit<T, K> : never; // eslint-disable-line @typescript-eslint/no-explicit-any
6468

6569
/**
6670
* Base type for any Ethereum account with signing capabilities.
@@ -88,6 +92,8 @@ export type EvmAccount = {
8892

8993
/**
9094
* Known EVM networks supported by the SDK.
95+
*
96+
* @internal
9197
*/
9298
export type KnownEvmNetworks =
9399
| "base"
@@ -104,6 +110,8 @@ export type KnownEvmNetworks =
104110

105111
/**
106112
* Network input that accepts known networks or RPC URLs
113+
*
114+
* @internal
107115
*/
108116
export type NetworkOrRpcUrl = KnownEvmNetworks | (string & {});
109117

@@ -174,6 +182,8 @@ export type EvmSmartAccount = Prettify<EvmSmartAccountProperties & SmartAccountA
174182

175183
/**
176184
* Helper type for network-specific smart account actions
185+
*
186+
* @internal
177187
*/
178188
export type NetworkSpecificSmartAccountActions<Network extends string> = Prettify<
179189
// Always include sendUserOperation, waitForUserOperation and getUserOperation
@@ -257,6 +267,8 @@ export type NetworkSpecificSmartAccountActions<Network extends string> = Prettif
257267

258268
/**
259269
* A network-scoped smart account
270+
*
271+
* @internal
260272
*/
261273
export type NetworkScopedEvmSmartAccount<Network extends string = string> = Prettify<
262274
Omit<EvmSmartAccountProperties, "useNetwork"> &
@@ -274,6 +286,8 @@ type EmptyObject = {};
274286

275287
/**
276288
* Conditional account actions based on network
289+
*
290+
* @internal
277291
*/
278292
export type NetworkSpecificAccountActions<Network extends string> = Prettify<
279293
// Always include sendTransaction, transfer and waitForTransactionReceipt
@@ -349,6 +363,8 @@ export type NetworkSpecificAccountActions<Network extends string> = Prettify<
349363

350364
/**
351365
* A network-scoped server-managed ethereum account
366+
*
367+
* @internal
352368
*/
353369
export type NetworkScopedEvmServerAccount<Network extends string = string> = Prettify<
354370
Omit<EvmServerAccount, keyof AccountActions | "useNetwork"> &
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1+
/**
2+
* @module Accounts
3+
*/
4+
15
import { AccountActions } from "../../actions/solana/types.js";
26
import { SolanaAccount as OpenAPISolanaAccount } from "../../openapi-client/index.js";
37
import { Prettify } from "../../types/utils.js";
48

59
/**
610
* A base Solana account.
11+
*
12+
* @internal
713
*/
814
export type Account = OpenAPISolanaAccount;
915

1016
/**
1117
* A Solana account with actions.
18+
*
19+
* @see {@link OpenAPISolanaAccount}
20+
* @see {@link AccountActions}
1221
*/
1322
export type SolanaAccount = Prettify<OpenAPISolanaAccount & AccountActions>;

typescript/src/actions/evm/spend-permissions/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { SpendPermission } from "../../../spend-permissions/types.js";
77
export type UseSpendPermissionOptions = {
88
/** The spend permission to use */
99
spendPermission: SpendPermission;
10-
/** The amount to spend (must be <= allowance) */
10+
/** The amount to spend (must be &le; allowance) */
1111
value: bigint;
1212
/** The network to execute the transaction on */
1313
network: SpendPermissionNetwork;

typescript/src/actions/evm/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @module Actions
3+
*/
4+
15
import { FundOperationResult } from "../types.js";
26
import {
37
WaitForFundOperationOptions,

typescript/src/actions/solana/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @module Actions
3+
*/
4+
15
import { TransferOptions } from "./transfer.js";
26
import {
37
RequestFaucetOptions,

typescript/src/auth/errors.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @module Errors
3+
*/
4+
15
/**
26
* A class of errors for capturing stack traces.
37
*/

typescript/src/auth/hooks/axios/withAuth.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @module Axios
3+
*/
4+
15
import { AxiosInstance, AxiosHeaders } from "axios";
26

37
import { convertBigIntsToStrings } from "../../../utils/bigint.js";

0 commit comments

Comments
 (0)