Degenerify MithrilRoutes
The routes type doesn't need to be parametrized. It's far too restricting and technically incorrect.
This commit is contained in:
parent
0c8ac06e89
commit
6a160dc10f
1 changed files with 3 additions and 3 deletions
6
mithril.d.ts
vendored
6
mithril.d.ts
vendored
|
|
@ -250,7 +250,7 @@ declare module _mithril {
|
||||||
<T extends MithrilController>(
|
<T extends MithrilController>(
|
||||||
rootElement: Element,
|
rootElement: Element,
|
||||||
defaultRoute: string,
|
defaultRoute: string,
|
||||||
routes: MithrilRoutes<T>
|
routes: MithrilRoutes
|
||||||
): void;
|
): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -668,12 +668,12 @@ declare module _mithril {
|
||||||
/**
|
/**
|
||||||
* This represents a key-value mapping linking routes to components.
|
* This represents a key-value mapping linking routes to components.
|
||||||
*/
|
*/
|
||||||
interface MithrilRoutes<T extends MithrilController> {
|
interface MithrilRoutes {
|
||||||
/**
|
/**
|
||||||
* The key represents the route. The value represents the corresponding
|
* The key represents the route. The value represents the corresponding
|
||||||
* component.
|
* component.
|
||||||
*/
|
*/
|
||||||
[key: string]: MithrilComponent<T>;
|
[key: string]: MithrilComponent<MithrilController>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue