UNPKG

@tinijs/router

Version:

The router module for the TiniJS framework.

44 lines 1.32 kB
import { getRouter, getActiveRoute, getParams, getQuery, getFragment, getNavIndicator, } from './methods.js'; export function UseRouter() { return function (prototype, propertyName) { Object.defineProperty(prototype, propertyName, { get: () => getRouter(), }); }; } export function UseRoute() { return function (prototype, propertyName) { Object.defineProperty(prototype, propertyName, { get: () => getActiveRoute(), }); }; } export function UseParams() { return function (prototype, propertyName) { Object.defineProperty(prototype, propertyName, { get: () => getParams(), }); }; } export function UseQuery() { return function (prototype, propertyName) { Object.defineProperty(prototype, propertyName, { get: () => getQuery(), }); }; } export function UseFragment() { return function (prototype, propertyName) { Object.defineProperty(prototype, propertyName, { get: () => getFragment(), }); }; } export function UseNavIndicator() { return function (prototype, propertyName) { Object.defineProperty(prototype, propertyName, { get: () => getNavIndicator(), }); }; } //# sourceMappingURL=decorators.js.map