Skip to content

Commit 2aa6573

Browse files
committed
fix: dts
1 parent 0f0b4d9 commit 2aa6573

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"sideEffects": false,
4949
"scripts": {
5050
"dev": "tsx playground/main.ts",
51-
"build": "tsup",
51+
"build": "tsup && pnpm run build:types",
52+
"build:types": "tsc --emitDeclarationOnly --declaration",
5253
"docs:build": "typedoc",
5354
"docs:preview": "serve docs",
5455
"lint": "eslint . --ext .js,.ts,.yml,.yaml,.md,.json,.json5",

src/client/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import * as limit from './utils/limit'
2+
export { limit }
3+
14
export * from './client'
25
export * from './user'
36
export * from './post'
47
export type { JikeClientJSON, FollowingUpdatesMoreKey } from './types'
5-
export * as limit from './utils/limit'
68
export { RequestFailureError } from './errors/RequestFailureError'
79
export { AuthorizationError } from './errors/AuthorizationError'
810
export type { PaginatedOption } from './utils/paginate'

src/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import * as ApiOptions from './types/options'
2+
import * as ApiResponses from './types/api-responses'
3+
import * as Entity from './types/entity'
4+
5+
export { ApiOptions, ApiResponses, Entity }
6+
17
export type { BeforeRequestHook } from 'ky'
28

39
export {
@@ -11,9 +17,6 @@ export {
1117
export * from './api'
1218
export * from './api-client'
1319
export * from './client'
14-
export * as ApiOptions from './types/options'
15-
export * as ApiResponses from './types/api-responses'
16-
export * as Entity from './types/entity'
1720
export type {
1821
ApiConfig,
1922
ApiConfigResolved,

tsup.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export default defineConfig(() => {
2323
esbuildOptions: (options) => {
2424
options.outExtension = {}
2525
},
26-
dts: true,
2726
},
2827
{
2928
...common,

0 commit comments

Comments
 (0)