Fixing build

This commit is contained in:
Gareth Parker
2018-03-24 09:57:13 +00:00
parent 8037f2788a
commit 95c06982eb
3 changed files with 28 additions and 32 deletions

View File

@@ -15,6 +15,6 @@ const manifest: Glue.Manifest = {
}
]
}
}
};
Glue.compose(manifest);
Glue.compose(manifest);

54
types/glue/index.d.ts vendored
View File

@@ -1,35 +1,31 @@
// Type definitions for glue
// Project: https://github.com/hapijs/glue
// Definitions by: Gareth Parker
// Definitions by: Gareth Parker <https://github.com/garfty>
// 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;
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;

View File

@@ -21,6 +21,6 @@
},
"files": [
"index.d.ts",
"hapi-glue-test.ts"
"glue-tests.ts"
]
}