diff --git a/types/fastify-favicon/fastify-favicon-tests.ts b/types/fastify-favicon/fastify-favicon-tests.ts new file mode 100644 index 0000000000..fe51b2e837 --- /dev/null +++ b/types/fastify-favicon/fastify-favicon-tests.ts @@ -0,0 +1,9 @@ +import path = require("path"); +import fastify = require("fastify"); +import fastifyFavicon = require("fastify-favicon"); + +const app = fastify(); + +app.register(fastifyFavicon, { + path: path.join(__dirname, "public"), +}); diff --git a/types/fastify-favicon/index.d.ts b/types/fastify-favicon/index.d.ts new file mode 100644 index 0000000000..ea02079d4a --- /dev/null +++ b/types/fastify-favicon/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for fastify-favicon v0.3.0 +// Project: https://github.com/smartiniOnGitHub/fastify-favicon +// Definitions by: Philipp Gfeller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function defaultFaviconPlugin(): void; + +declare namespace fastifyFavicon { + interface FastifyFaviconOptions { + path: string; + } +} + +export = defaultFaviconPlugin; diff --git a/types/fastify-favicon/package.json b/types/fastify-favicon/package.json new file mode 100644 index 0000000000..e8c68ab969 --- /dev/null +++ b/types/fastify-favicon/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "fastify": "^1.11.2" + } +} diff --git a/types/fastify-favicon/tsconfig.json b/types/fastify-favicon/tsconfig.json new file mode 100644 index 0000000000..c5e32bd2d1 --- /dev/null +++ b/types/fastify-favicon/tsconfig.json @@ -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"] +} diff --git a/types/fastify-favicon/tslint.json b/types/fastify-favicon/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fastify-favicon/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }