Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/387327 )

Change subject: Chore: remove unused Router interface
......................................................................

Chore: remove unused Router interface

Move the Router typing into the implementation since the interface isn't
used anywhere else and the typing is light.

Change-Id: I08999dc4c6b591a83d16bff3be6e5ca9b2d46c23
---
M src/common/routers/router.ts
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/27/387327/1

diff --git a/src/common/routers/router.ts b/src/common/routers/router.ts
index cc5e4f8..8e68b3a 100644
--- a/src/common/routers/router.ts
+++ b/src/common/routers/router.ts
@@ -14,10 +14,6 @@
   props: Props;
 }
 
-export interface Router {
-  route(path: string): Promise<RouteResponse<any>>;
-}
-
 function getInitialProps<Params extends RouteParams | undefined, Props>(
   module: PageModule<Params, Props>,
   params: Params
@@ -41,9 +37,9 @@
   );
 }
 
-export const newRouter = (routes: AnyRoute[]): Router => {
+export const newRouter = (routes: AnyRoute[]) => {
   return {
-    route(path) {
+    route(path: string): Promise<RouteResponse<any>> {
       for (const route of routes) {
         const params = route.toParams(path);
         if (params) {

-- 
To view, visit https://gerrit.wikimedia.org/r/387327
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08999dc4c6b591a83d16bff3be6e5ca9b2d46c23
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <[email protected]>
Gerrit-Reviewer: Sniedzielski <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to