1 | import * as fp from '../fastify-plugin';
|
2 | import * as fastify from 'fastify';
|
3 |
|
4 | export const testPlugin = fp(function (fastify: fastify.FastifyInstance, options: {}, next: fp.nextCallback) {
|
5 | fastify.decorate('utility', () => { })
|
6 | next();
|
7 | }, '>=1');
|
8 |
|
9 | export 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 | });
|