Added type definitions for fastify-favicon

This commit is contained in:
Philipp Gfeller
2019-01-23 11:58:24 +07:00
parent 600f91ec2b
commit 592c2aecd0
5 changed files with 46 additions and 0 deletions
@@ -0,0 +1,9 @@
import path = require("path");
import fastify = require("fastify");
import fastifyFavicon = require("fastify-favicon");
const app = fastify();
app.register<fastifyFavicon.FastifyFaviconOptions>(fastifyFavicon, {
path: path.join(__dirname, "public"),
});
+14
View File
@@ -0,0 +1,14 @@
// Type definitions for fastify-favicon v0.3.0
// Project: https://github.com/smartiniOnGitHub/fastify-favicon
// Definitions by: Philipp Gfeller <https://github.com/tuelsch/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function defaultFaviconPlugin(): void;
declare namespace fastifyFavicon {
interface FastifyFaviconOptions {
path: string;
}
}
export = defaultFaviconPlugin;
+6
View File
@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"fastify": "^1.11.2"
}
}
+16
View File
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "fastify-favicon-tests.ts"]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }