-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Body type is not assignable to type string error #12
Comments
Having the same issue over here:
|
Looking at the tests for this project, the call to createEvent is defined in a more lax way. This way worked for me over the examples shown in the README. Lines 39 to 44 in 074ef29
|
Cool but having to cast it as 'any' seems a bit awkward? I've hit a similar issue today and I'm left in a situation where I might as well just mock out the entire event myself and ditch this library. |
Casting to any will work but I believe this issue is because the type of the https://github.com/serverless/event-mocks/blob/master/lib/index.ts#L51 body: typeof dictionary[T], could instead be defined as body: Partial<typeof dictionary[T]>, Even then that's not quite accurate since it'll make all of the properties optional. Even better would be to let the |
…ependabot identified vulnerabilities
The API Gateway example doesn't compile in TypeScript:
The body is expected to be a string.
The text was updated successfully, but these errors were encountered: