2024-04-25 20:49:38 +08:00
|
|
|
import 'elexis';
|
2024-10-02 00:58:23 +08:00
|
|
|
import { $Router } from './lib/$Router';
|
|
|
|
import { $Route } from './lib/$Route';
|
2024-04-25 20:49:38 +08:00
|
|
|
declare module 'elexis' {
|
|
|
|
export namespace $ {
|
2024-10-02 00:58:23 +08:00
|
|
|
export interface TagNameElementMap {
|
|
|
|
'router': typeof $Router;
|
|
|
|
'route': typeof $Route;
|
|
|
|
}
|
|
|
|
export function open(path: string | URL | undefined): typeof $Router;
|
|
|
|
export function replace(path: string | URL | undefined): typeof $Router;
|
|
|
|
export function back(): typeof $Router;
|
2024-04-25 20:49:38 +08:00
|
|
|
}
|
|
|
|
}
|
2024-10-02 00:58:23 +08:00
|
|
|
$.registerTagName('router', $Router);
|
|
|
|
$.registerTagName('route', $Route);
|
2024-04-25 20:49:38 +08:00
|
|
|
|
|
|
|
Object.assign($, {
|
2024-10-02 00:58:23 +08:00
|
|
|
open(path: string | URL | undefined) { return $Router.open(path) },
|
|
|
|
replace(path: string | URL | undefined) { return $Router.replace(path) },
|
|
|
|
back() { return $Router.back() }
|
2024-04-25 20:49:38 +08:00
|
|
|
})
|
|
|
|
|
2024-10-02 00:58:23 +08:00
|
|
|
export * from './lib/$Route';
|
2024-10-02 01:03:31 +08:00
|
|
|
export * from './lib/$Router';
|