Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aal89
Created April 29, 2019 10:22
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 aal89/481993b7c56653b50792fc1d7f79a611 to your computer and use it in GitHub Desktop.
Save aal89/481993b7c56653b50792fc1d7f79a611 to your computer and use it in GitHub Desktop.
Declaration merging. Swift like extensions for TypeScript. Extending an Express Request object per example.
// tslint:disable
declare namespace Express {
export interface Request {
locals: {
data: unknown;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment