mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
8 lines
204 B
TypeScript
8 lines
204 B
TypeScript
|
|
|
|
import RouteRecognizer = require('route-recognizer')
|
|
|
|
var router = new RouteRecognizer<string>();
|
|
router.add([{ path: "/posts", handler: "i am the handler" }]);
|
|
var result = router.recognize("/posts");
|