
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
@type-dom/router
Advanced tools
基于 TypeScript 的轻量级前端路由库,支持声明式路由配置和客户端路由管理,实现单页应用(SPA)的无刷新导航。
bash npm install @type-dom/router
或
yarn add @type-dom/router
import { RouteRecordRaw, createRouter, createHashHistory } from "type-dom/router";
import { HomeView } from './HomeView.ts'
import { AboutView } from './AboutView.ts'
import { UserView } from './UserView.ts'
import { RootApp } from './RootApp.ts'
const routes: RouteRecordRaw[] = [
{ path: "/", component: HomeView, name: "home" },
{ path: "/about", component: AboutView, name: "about" },
{ path: "/user/:id",
component: UserView,
name: "user",
props: (params) => ({ userId: params.id }) // 参数传递
}
];
const router = createRouter({
history: createHashHistory(),
routes,
})
import { RootApp } from './RootApp.ts';
const app = new RootApp().mount('body');
router.install(app);
MIT License
FAQs
基于 TypeScript 的轻量级前端路由库,支持声明式路由配置和客户端路由管理,实现单页应用(SPA)的无刷新导航。
We found that @type-dom/router demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.