DefinitelyTyped/types/stoppable/index.d.ts
John Plusje e3c335e16e Add call to server.close() in order to show that http.Server is properly extended.
Added a StoppableServer type for typing the created server instance.
2018-11-26 19:48:57 +01:00

19 lines
603 B
TypeScript

// Type definitions for stoppable 1.1
// Project: https://github.com/hunterloftis/stoppable
// Definitions by: Eric Byers <https://github.com/EricByers>
// John Plusjé <https://github.com/jplusje>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { Server } from 'http';
declare namespace stoppable {
interface StoppableServer extends Server {
stop(callback?: (e: Error, gracefully: boolean) => void): void;
}
}
declare function stoppable(server: Server, grace?: number): stoppable.StoppableServer;
export = stoppable;