@RoutingKey(‘abc’) class Foo { public name: string | undefined; public age: number | undefined; public gender: string | undefined; constructor(init?: Partial<Foo>) { if (init) { Object.assign(this, init); } } } const foo = new Foo({ name: ‘something’ }); https://stackoverflow.com/a/72028371/1515209 Read more →