mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 06:50:19 +00:00
Add typings for the inert extension to hapi.js
see: https://github.com/hapijs/inert/pull/78
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// Type definitions for inert 4.0
|
||||
// Project: https://github.com/hapijs/inert/
|
||||
// Definitions by: Steve Ognibene <http://github.com/nycdotnet>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// Note: this definition contains only enough to make TypeScript happy (hapi?) when
|
||||
// importing inert. The functionality that importing inert adds to the reply
|
||||
// object and its other features are implemented in the hapi definition on
|
||||
// DefinitelyTyped. The inert object is never actually used in practice except to
|
||||
// be passed as an extension to the server.register() method which already takes
|
||||
// an `any` argument, so just using `any` here is fine.
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
export var inert: any;
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
import * as HapiES6 from 'hapi';
|
||||
import * as InertES6 from 'inert';
|
||||
|
||||
|
||||
const server = new HapiES6.Server({});
|
||||
server.register(InertES6, () => {});
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
const Inert = require('inert');
|
||||
const Hapi = require('hapi');
|
||||
|
||||
|
||||
const server = new Hapi.Server({});
|
||||
server.register(Inert, () => {});
|
||||
|
||||
export var makeThisAModule: any;
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"inert-tests.ts",
|
||||
"inert-tests-es6.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Reference in New Issue
Block a user