summaryrefslogtreecommitdiff
path: root/src/jet/models/error-page.ts
blob: 80bcdf51607857dbc0c42cae7b3a44513d06fb7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { GenericPage } from '@jet-app/app-store/api/models';
import type { Opt } from '@jet/environment';

export class ErrorPage extends GenericPage {
    constructor({ error }: { error: Opt<Error> }) {
        super([]);
        this.error = error;
    }

    // Used in our type guards to narrow a `Page` down to a `ErrorPage`
    pageType: string = 'errorPage';

    // The browser `Error`, used to determine which message to display to the user
    error: Opt<Error>;
}