mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
TSLint fixes
This commit is contained in:
4
types/stoppable/index.d.ts
vendored
4
types/stoppable/index.d.ts
vendored
@@ -3,6 +3,8 @@
|
||||
// Definitions by: Eric Byers <https://github.com/EricByers>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function stoppable(server:http.Server, grace?:number): http.Server;
|
||||
import * as http from 'http';
|
||||
|
||||
declare function stoppable(server: http.Server, grace?: number): http.Server;
|
||||
|
||||
export = stoppable;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import http = require('http');
|
||||
import * as http from 'http';
|
||||
import stoppable = require('stoppable');
|
||||
|
||||
const server:http.Server = stoppable(http.createServer());
|
||||
const server: http.Server = stoppable(http.createServer());
|
||||
server.stop();
|
||||
|
||||
const server2:http.Server = stoppable(http.createServer(), 10000);
|
||||
const server2: http.Server = stoppable(http.createServer(), 10000);
|
||||
server2.stop();
|
||||
|
||||
Reference in New Issue
Block a user