File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 11import { AsyncAdapter, SyncAdapter } from '@stenodb/node'
22import fp from 'fastify-plugin'
33import { StenoPlugin } from './plugin.js'
4- import './types.js'
4+ import type { StenoOptions } from './types.js'
55
66const FastifySteno = fp(StenoPlugin.createInstance, {
77 name: '@stenodb/fastify',
88 fastify: '4.x'
99})
1010
1111export { FastifySteno, AsyncAdapter, SyncAdapter }
12+ export type { StenoOptions }
1213export default StenoPlugin.createInstance
Original file line number Diff line number Diff line change 11import { AsyncAdapter, NodeProvider, SyncAdapter } from '@stenodb/node'
22import { targetConstructorToSchema } from 'class-validator-jsonschema'
3+ import type { StenoOptions } from './types'
34import type { Steno } from '@stenodb/node'
4- import type { IOptions } from 'class-validator-jsonschema/build/options'
55import type { FastifyInstance } from 'fastify'
66
7- export interface StenoOptions extends Steno.NodeProviderOptions {
8- adapters: Steno.NodeAdapter<any>[]
9- entities?: Steno.Entity<any>[]
10- entityOptions?: IOptions
11- }
12-
137export class StenoPlugin {
148 #fastify: FastifyInstance
159 #options: StenoOptions
Original file line number Diff line number Diff line change 11import type { Steno } from '@stenodb/node'
2+ import type { IOptions } from 'class-validator-jsonschema/build/options'
3+
4+ export interface StenoOptions extends Steno.NodeProviderOptions {
5+ adapters: Steno.NodeAdapter<any>[]
6+ entities?: Steno.Entity<any>[]
7+ entityOptions?: IOptions
8+ }
29
310declare module 'fastify' {
411 export interface FastifyInstance {
You can’t perform that action at this time.
0 commit comments