Skip to content

Commit 19a2dec

Browse files
committed
Chore: add comment to generated SWR or ReactQuery hooks
1 parent 19fddbb commit 19a2dec

File tree

6 files changed

+30
-5
lines changed

6 files changed

+30
-5
lines changed

CHANGELOG.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
This is the log of notable changes to the `tsdk` that are developer-facing.
44

5+
6+
### 0.0.30 2023/12/15
7+
8+
- Chore: add comment to generated `SWR` or `ReactQuery` hooks
9+
510
### 0.0.29 2023/12/11
611

712
- Feat: respect `isGet` is `true` or `false` value

packages/bench/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"checktype": "tsc --noEmit"
1616
},
1717
"dependencies": {
18-
"tsdk-server-adapters": "^0.0.29",
18+
"tsdk-server-adapters": "^0.0.30",
1919
"change-case": "^4.1.2",
2020
"express": "^4.18.2",
2121
"zod": "^3.22.4",

packages/tsdk-server-adapters/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tsdk-server-adapters",
3-
"version": "0.0.29",
3+
"version": "0.0.30",
44
"main": "lib/index.js",
55
"repository": "tsdk-monorepo/tsdk",
66
"bugs": "https://github.com/tsdk-monorepo/tsdk/issues",

packages/tsdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tsdk",
3-
"version": "0.0.29",
3+
"version": "0.0.30",
44
"description": "Type-safe API development and code share tool for TypeScript projects.",
55
"repository": "tsdk-monorepo/tsdk",
66
"bugs": "https://github.com/tsdk-monorepo/tsdk/issues",

packages/tsdk/src/sync-api.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ export async function syncAPI() {
130130
${
131131
isGET
132132
? `
133-
133+
/**
134+
* ${description}
135+
*
136+
* @category ${category}
137+
*/
134138
export function use${name}(
135139
payload: ${name}Req,
136140
options?: SWRConfiguration<${name}Res>,
@@ -147,6 +151,11 @@ return useSWR(
147151
}
148152
`
149153
: `
154+
/**
155+
* ${description}
156+
*
157+
* @category ${category}
158+
*/
150159
export function use${name}(
151160
options?: SWRMutationConfiguration<
152161
${name}Res,
@@ -173,6 +182,11 @@ return useSWR(
173182
${
174183
isGET
175184
? `
185+
/**
186+
* ${description}
187+
*
188+
* @category ${category}
189+
*/
176190
export function use${name}(
177191
payload: ${name}Req,
178192
options?: UndefinedInitialDataOptions<${name}Res, Error>,
@@ -192,6 +206,11 @@ return useSWR(
192206
);
193207
}`
194208
: `
209+
/**
210+
* ${description}
211+
*
212+
* @category ${category}
213+
*/
195214
export function use${name}(
196215
options?: UseMutationOptions<
197216
${name}Res,

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)