TypeScript experts: how do you normally patch a type that is missing something you need? I have a few examples in the codebase I& #39;m working on, and I just keep adding ts-ignore& #39;s until I can get around to them
https://abs.twimg.com/emoji/v2/... draggable="false" alt="😅" title="Lächelndes Gesicht mit offenem Mund und Angstschweiß" aria-label="Emoji: Lächelndes Gesicht mit offenem Mund und Angstschweiß">
Example: types/express-session adds a Session interface for req.session. However, it& #39;s not indexed by string so `req.session["key"]` is an error. I tried:
namespace express {
export interface Request {
session: { [k: string]: string }
}
}
but that overwrites it entirely
namespace express {
export interface Request {
session: { [k: string]: string }
}
}
but that overwrites it entirely