Keep the type through the helper
A search result should keep the type of the items being searched.
your task
Use a type parameter to connect the list, the callback, and the result. Allow for a missing match. Keep the function body. Valid calls must compile and all three marked lines must be rejected.
The caller searches rooms and guests with findFirst. The starter accepts fields from the wrong item type. It also lets the caller assume that every search finds a match.
Check types asks the compiler to read your file. It lists each type error with its line. Your code does not run. The exercise is solved when there are no type errors.
Starter code
or press Ctrl EnterNot run yet
type check
Not run yetfind.ts
Expected result: no type errors.