@osaedasia/oresume
Version:
A user-friendly library for generating complete Single Page Applications (SPAs)
25 lines (24 loc) • 1.07 kB
TypeScript
import { QueryParamTypeMap } from "../../../domain/definitions/types/QueryParam";
import { Fragment } from "../../Fragment";
import { IUrlRoute } from "../../../domain/models/UrlRoute";
/**
* Interface representing a page in an application.
* Defines the contract for page-level functionality including routing and content management.
* @template TAppRoute The type representing the structure of expected navigation endpoints.
* @template TParamTypeMap Configuration for query parameter types supported by this page.
*/
export interface IPage<TAppRoute extends string, TParamTypeMap extends QueryParamTypeMap = never> {
/**
* Manages URL routing and navigation functionality for the page.
* Handles URL transitions and query parameter management.
*/
readonly route: IUrlRoute<TAppRoute, TParamTypeMap>;
/**
* @returns The display name of the page.
*/
get name(): string;
/**
* @returns The DOM fragment container managing the page's content and event handling.
*/
get fragment(): Fragment<TAppRoute>;
}