UNPKG

485 BPlain TextView Raw
1import * as fp from '../fastify-plugin';
2import * as fastify from 'fastify';
3
4export const testPlugin = fp(function (fastify: fastify.FastifyInstance, options: {}, next: fp.nextCallback) {
5 fastify.decorate('utility', () => { })
6 next();
7}, '>=1');
8
9export const testPluginWithAsync = fp(async function (fastify: fastify.FastifyInstance) {
10 fastify.decorate('utility', () => { })
11}, {
12 fastify: '>=1',
13 name: 'TestPlugin',
14 decorators: {
15 request: ['log']
16 }
17 });