Skip to content

Commit

Permalink
fix: dts
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Apr 16, 2023
1 parent 0f0b4d9 commit 2aa6573
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"sideEffects": false,
"scripts": {
"dev": "tsx playground/main.ts",
"build": "tsup",
"build": "tsup && pnpm run build:types",
"build:types": "tsc --emitDeclarationOnly --declaration",
"docs:build": "typedoc",
"docs:preview": "serve docs",
"lint": "eslint . --ext .js,.ts,.yml,.yaml,.md,.json,.json5",
Expand Down
4 changes: 3 additions & 1 deletion src/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import * as limit from './utils/limit'
export { limit }

export * from './client'
export * from './user'
export * from './post'
export type { JikeClientJSON, FollowingUpdatesMoreKey } from './types'
export * as limit from './utils/limit'
export { RequestFailureError } from './errors/RequestFailureError'
export { AuthorizationError } from './errors/AuthorizationError'
export type { PaginatedOption } from './utils/paginate'
Expand Down
9 changes: 6 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import * as ApiOptions from './types/options'
import * as ApiResponses from './types/api-responses'
import * as Entity from './types/entity'

export { ApiOptions, ApiResponses, Entity }

export type { BeforeRequestHook } from 'ky'

export {
Expand All @@ -11,9 +17,6 @@ export {
export * from './api'
export * from './api-client'
export * from './client'
export * as ApiOptions from './types/options'
export * as ApiResponses from './types/api-responses'
export * as Entity from './types/entity'
export type {
ApiConfig,
ApiConfigResolved,
Expand Down
1 change: 0 additions & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default defineConfig(() => {
esbuildOptions: (options) => {
options.outExtension = {}
},
dts: true,
},
{
...common,
Expand Down

0 comments on commit 2aa6573

Please sign in to comment.