mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Created Glue project
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import * as Glue from "glue";
|
||||
import * as Hapi from "hapi";
|
||||
|
||||
const manifest: Glue.Manifest = {
|
||||
server: {
|
||||
port: 3000
|
||||
},
|
||||
register: {
|
||||
plugins: [
|
||||
{
|
||||
plugin: "./test",
|
||||
routes: {
|
||||
prefix: "test"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Glue.compose(manifest);
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
// Type definitions for glue
|
||||
// Project: https://github.com/hapijs/glue
|
||||
// Definitions by: Gareth Parker
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
declare module "glue" {
|
||||
|
||||
import { Server, ServerOptions } from "hapi";
|
||||
|
||||
export interface Options {
|
||||
relativeTo: string;
|
||||
preConnections?: (Server:Server, next:(err:any)=>void ) => void;
|
||||
preRegister?: (Server:Server, next:(err:any)=>void ) => void;
|
||||
}
|
||||
|
||||
interface Plugin {
|
||||
plugin: string | {
|
||||
register:string;
|
||||
options?:any;
|
||||
};
|
||||
options?: any;
|
||||
routes?: any
|
||||
}
|
||||
|
||||
interface Manifest {
|
||||
server: ServerOptions;
|
||||
register?: {
|
||||
plugins: Array<Plugin>
|
||||
}
|
||||
}
|
||||
|
||||
export function compose(manifest: Manifest, options?: Options): Server;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2017",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"experimentalDecorators": true,
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"hapi-glue-test.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// This package uses the Function type, and it will take effort to fix.
|
||||
"ban-types": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user