Read status text from a page or a locator
A status helper can read from a whole page or a locator within it.
your task
Type seatsText so it accepts the page and the dialog. Reject the caller’s text selector. Keep the return type and supply text even when the status has none. Both valid calls must compile.
The caller reads a status from the whole page and from a dialog. A locator identifies an element such as that dialog. The supplied Playwright types also show that reading text can produce null.
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 yetseats.ts
Expected result: no type errors.