You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current type definitions of the linked types assumes that a value can be present but have undefined value:
[name: string]: string |undefined// the same as [name: string]: (string | undefined)
It feels weird that, for example, queryParameters can be present, have an actual entry, but have such value undefined. I wonder instead if the goal was to define such types differently, signaling that an event property can either be defined (and have all non-null values) or undefined
{[name: string]: string}|undefined
Even better, since most of those types are then part of other Event types in the form of TheType | null or param? : TheType I would even be tempted to believe that this should be the correct type:
[name: string]: string
Let me know if you agree. If so, I'd gladly provide a pull request fixing it
The text was updated successfully, but these errors were encountered:
DefinitelyTyped/types/aws-lambda/trigger/api-gateway-proxy.d.ts
Lines 111 to 133 in b8d1466
The current type definitions of the linked types assumes that a value can be present but have undefined value:
It feels weird that, for example,
queryParameters
can be present, have an actual entry, but have such valueundefined
. I wonder instead if the goal was to define such types differently, signaling that an event property can either be defined (and have all non-null values) or undefinedEven better, since most of those types are then part of other Event types in the form of
TheType | null
orparam? : TheType
I would even be tempted to believe that this should be the correct type:Let me know if you agree. If so, I'd gladly provide a pull request fixing it
The text was updated successfully, but these errors were encountered: