mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge pull request #19644 from EricByers/master
Adding stoppable type definitions
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// Type definitions for stoppable 1.0
|
||||
// Project: https://github.com/hunterloftis/stoppable
|
||||
// Definitions by: Eric Byers <https://github.com/EricByers>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
import { Server } from 'http';
|
||||
|
||||
declare function stoppable(server: Server, grace?: number): Server;
|
||||
|
||||
export = stoppable;
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as http from 'http';
|
||||
import stoppable = require('stoppable');
|
||||
|
||||
const server: http.Server = stoppable(http.createServer());
|
||||
server.close();
|
||||
|
||||
const server2: http.Server = stoppable(http.createServer(), 10000);
|
||||
server2.close();
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"stoppable-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user