Skip to content

Instantly share code, notes, and snippets.

View AmrAbdulrahman's full-sized avatar

Amr Abdulrahman AmrAbdulrahman

View GitHub Profile
@gund
gund / event-open.ts
Last active August 14, 2019 16:34
Example of extensible type definitions in TypeScript leveraging interface and enum merging feature. REPL: https://repl.it/@gund/Extensible-type-definitions-in-TypeScript
import { registerMeta } from './event';
enum EventKind {
Open = 'open',
}
interface EventMetaRegistry {
[EventKind.Open]: EventOpenMeta;
}