One base for three users
User types can share the fields that every guest needs.
your task
Fix Member and Admin and add Librarian in users.ts. Build their shared fields from Guest and the member type. Both callers must compile with the marked invalid users rejected.
users.ts copies guest fields, misspells one, and lacks the Librarian type the caller needs. Another team owns Guest. A librarian is a member with a numbered desk.
Run checks compiles your file once for each check. Later checks use changed files. Open a file in its row to see what changed. Your code does not run. The exercise is solved when every check passes.
Starter code
or press Ctrl EnterNot run yet
checks
Not run yetOriginal guest fieldsThis check uses the supplied files as they are. A guest has a name and an email.
Expected result: no type errors.
Not run yetGuest with a phone numberThe team that owns base.ts added phone to Guest. The caller now reads phone from all three user types.
Expected result: no type errors.