Merge pull request #19644 from EricByers/master

Adding stoppable type definitions
This commit is contained in:
Nathan Shively-Sanders
2017-09-09 08:32:44 -07:00
committed by GitHub
4 changed files with 42 additions and 0 deletions
+11
View File
@@ -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;
+8
View File
@@ -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();
+22
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }