refactor(swagger-editor): enable isolated declarations (#1207)
parent
1cdfdbd292
commit
0bda87e4ee
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@hono/swagger-editor': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add explicit `MiddlewareHandler` return type
|
|
@ -1,4 +1,4 @@
|
||||||
import type { Context } from 'hono'
|
import type { Context, MiddlewareHandler } from 'hono'
|
||||||
import type { CustomSwaggerUIOptions } from './types'
|
import type { CustomSwaggerUIOptions } from './types'
|
||||||
|
|
||||||
const DEFAULT_VERSION = '4.13.1'
|
const DEFAULT_VERSION = '4.13.1'
|
||||||
|
@ -136,7 +136,7 @@ export interface SwaggerEditorOptions extends CustomSwaggerUIOptions {
|
||||||
version?: string
|
version?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export function swaggerEditor(options: SwaggerEditorOptions = {}) {
|
export function swaggerEditor(options: SwaggerEditorOptions = {}): MiddlewareHandler {
|
||||||
const url = getUrl()
|
const url = getUrl()
|
||||||
|
|
||||||
options.layout = 'StandaloneLayout'
|
options.layout = 'StandaloneLayout'
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||||
"emitDeclarationOnly": false
|
"emitDeclarationOnly": false,
|
||||||
|
"isolatedDeclarations": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts"],
|
"include": ["src/**/*.ts"],
|
||||||
"exclude": ["**/*.test.ts"],
|
"exclude": ["**/*.test.ts"],
|
||||||
|
|
Loading…
Reference in New Issue