Skip to content

[06.modules.02.solution.private-side-effects] Align types with tests and instructions#15

Open
vasilii-kovalev wants to merge 1 commit into
epicweb-dev:mainfrom
vasilii-kovalev:main
Open

[06.modules.02.solution.private-side-effects] Align types with tests and instructions#15
vasilii-kovalev wants to merge 1 commit into
epicweb-dev:mainfrom
vasilii-kovalev:main

Conversation

@vasilii-kovalev
Copy link
Copy Markdown

In a properly configured project, TypeScript throws an error in the "returns null if no user was found" test when passing null to queryTableMock.mockResolvedValue because the type of the queryTableMock function does not include null. Also, the generic type passed to queryTable inside the authorize function does not hint that the function can return null.

What was changed in 06.modules/02.solution.private-side-effects folder:

  • Properly configured TypeScript in the folder
  • Adjusted the types in
    • Test file
    • File with authorize function
    • Instructions
  • (Bonus) Fixed the telemetry.record function's signature. The issue surfaced because of the changed TypeScript config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant