-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: Flow to TypeScript migration.
- Loading branch information
Showing
17 changed files
with
193 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
{ | ||
"extends": [ | ||
"canonical", | ||
"canonical/flowtype" | ||
"canonical/typescript" | ||
], | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"root": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @flow | ||
|
||
import Roarr from 'roarr'; | ||
|
||
export default Roarr.child({ | ||
|
10 changes: 5 additions & 5 deletions
10
src/factories/createHttpTerminator.js → src/factories/createHttpTerminator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export { | ||
default as createHttpTerminator, | ||
} from './factories/createHttpTerminator'; | ||
export type { | ||
HttpTerminator, | ||
} from './types'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import type { | ||
Server as HttpServer, | ||
} from 'http'; | ||
import type { | ||
Server as HttpsServer, | ||
} from 'https'; | ||
import type { | ||
Socket, | ||
} from 'net'; | ||
import type { | ||
Merge, | ||
} from 'type-fest'; | ||
|
||
/** | ||
* @property gracefulTerminationTimeout Number of milliseconds to allow for the active sockets to complete serving the response (default: 5000). | ||
* @property server Instance of http.Server. | ||
*/ | ||
export type HttpTerminatorConfigurationInput = { | ||
readonly gracefulTerminationTimeout?: number, | ||
readonly server: HttpServer | HttpsServer, | ||
}; | ||
|
||
/** | ||
* @property terminate Terminates HTTP server. | ||
*/ | ||
export type HttpTerminator = { | ||
readonly terminate: () => Promise<void>, | ||
}; | ||
|
||
export type InternalHttpTerminator = Merge<HttpTerminator, { | ||
readonly secureSockets: Set<Socket>, | ||
readonly sockets: Set<Socket>, | ||
}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.