optional Event parameter in event handlers
RickHoving opened this issue · comments
Wilst implementing strictNullChecks we got some strange errors saying
Error:(213, 13) TS2345:Argument of type '{ target: string; rel: string; href: string; onclick: (evt: Event) => void; }' is not assignable to parameter of type 'VNodeChild'.
Object literal may only specify known properties, and 'target' does not exist in type 'VNodeChild.
This is because in our code the Event property in the onclick handler is mandatory and maquette says its an optional parameter.
Looking at the code the Event parameter is always provided therefore I suggest we make the Event parameters mandatory as they still can be omitted in Typescript.