mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add sticky session typing * Add sticky-session to types * Solve package json issue and updated the project to latest commit * Added readonly to options, optional where required and added env option * Remove unused import
24 lines
664 B
TypeScript
24 lines
664 B
TypeScript
// Type definitions for sticky-session 1.1
|
|
// Project: https://github.com/indutny/sticky-session
|
|
// Definitions by: Giovanni Barbaro <https://github.com/vanny96>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference types="node" />
|
|
|
|
import { Server } from "http";
|
|
|
|
/**
|
|
* Method to create the sticky session
|
|
* @param server Server used to create the session
|
|
* @param port Port where the app will be listening at
|
|
* @param options Options to customize the sticky session
|
|
*/
|
|
export function listen(
|
|
server: Server,
|
|
port?: number,
|
|
options?: {
|
|
readonly workers?: number,
|
|
readonly env?: any
|
|
}
|
|
): boolean;
|