-
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[altair-fastify-plugin] Add nodenext compatible typings and exports
- Loading branch information
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { FastifyPluginCallback } from 'fastify'; | ||
import type { AltairFastifyPluginOptions as PluginOptions } from './dist/index'; | ||
|
||
type FastifyAltair = FastifyPluginCallback<PluginOptions>; | ||
|
||
namespace fastifyAltairPlugin { | ||
export type AltairFastifyPluginOptions = PluginOptions; | ||
export const fastifyAltairPlugin: FastifyAltair; | ||
export { fastifyAltairPlugin as default }; | ||
} | ||
|
||
declare function fastifyAltairPlugin( | ||
...params: Parameters<FastifyAltair> | ||
): ReturnType<FastifyAltair>; | ||
|
||
export = fastifyAltairPlugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const fastifyAltairPlugin = require('./dist/index.js').default; | ||
|
||
module.exports = fastifyAltairPlugin; | ||
module.exports.default = fastifyAltairPlugin; | ||
module.exports.fastifyAltairPlugin = fastifyAltairPlugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters