DefinitelyTyped/types/stoppable/stoppable-tests.ts
2017-09-08 16:36:07 -05:00

9 lines
234 B
TypeScript

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();