Add logic for resolving route handlers

This commit is contained in:
2021-03-08 11:08:56 -06:00
parent a9ffa771dc
commit 9747d40659
8 changed files with 80 additions and 14 deletions

View File

@@ -1,8 +1,9 @@
import {ErrorWithContext} from "@extollo/util";
import {Route} from "./Route";
import {ResolvedRouteHandler, Route} from "./Route";
export class ActivatedRoute {
public readonly params: {[key: string]: string}
public readonly handler: ResolvedRouteHandler
constructor(
public readonly route: Route,
@@ -19,5 +20,6 @@ export class ActivatedRoute {
}
this.params = params
this.handler = route.resolveHandler()
}
}