We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7fa200 commit 64d7c9aCopy full SHA for 64d7c9a
src/types/index.d.ts
@@ -0,0 +1,11 @@
1
+/* eslint-disable @typescript-eslint/no-unused-vars */
2
+// Must have to let TSC knows we're merging the module 'fastify'
3
+import * as fastify from 'fastify';
4
+
5
+// Using declaration merging, add your plugin props to the appropriate
6
+// fastify interfaces.
7
+declare module 'fastify' {
8
+ interface FastifyInstance {
9
+ exampleProperty: string; // replace this with your props
10
+ }
11
+}
tsconfig.json
@@ -11,6 +11,10 @@
"strictNullChecks": true,
12
"strictPropertyInitialization": true,
13
"moduleResolution": "node",
14
+ "typeRoots": [
15
+ "./node_modules/@types",
16
+ "./src/types"
17
+ ],
18
"outDir": "dist",
19
"baseUrl": ".",
20
"paths": {
0 commit comments