Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thedillonb/79f3d8a538f4a56d4e42b8078e061659 to your computer and use it in GitHub Desktop.
Save thedillonb/79f3d8a538f4a56d4e42b8078e061659 to your computer and use it in GitHub Desktop.
Server Sent Events TypeScript Definition
declare module 'server-sent-events' {
import express = require('express');
interface Middleware extends express.RequestHandler {}
function MiddlewareFn(): Middleware;
export = MiddlewareFn;
}
declare namespace Express {
export interface ISSEResponse {
sse(value: string): void;
}
export interface Response extends ISSEResponse {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment