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

Change subject: Chore: use concise syntax for optional methods
......................................................................

Chore: use concise syntax for optional methods

Replace:

  {
    foo?: () => string | undefined;
  }

With:

  {
    foo?(): string | undefined;
  }

Change-Id: If22cb6d7a8917f9e7a8b1b707a01acb7b784c89a
---
M src/common/marshallers/utils.test.ts
M src/common/router/route.ts
M src/common/router/router.ts
3 files changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/36/398536/1

diff --git a/src/common/marshallers/utils.test.ts 
b/src/common/marshallers/utils.test.ts
index 9b35ebe..0266f80 100644
--- a/src/common/marshallers/utils.test.ts
+++ b/src/common/marshallers/utils.test.ts
@@ -1,10 +1,12 @@
 import * as fetch from "node-fetch";
 import { JSONValue } from "../types/json";
 
-export const reviveFile = (
+export function reviveFile(
   filename: string,
   reviver?: (key: any, value: JSONValue) => any
-) => JSON.parse(JSON.stringify(require(filename)), reviver);
+): any {
+  return JSON.parse(JSON.stringify(require(filename)), reviver);
+}
 
 const ETAG_REVISION = 802006980;
 const ETAG_TIME_ID = "4f754377-a235-11e7-a776-efb84f18649a";
diff --git a/src/common/router/route.ts b/src/common/router/route.ts
index 03394f1..69802bb 100644
--- a/src/common/router/route.ts
+++ b/src/common/router/route.ts
@@ -38,7 +38,7 @@
       Component: Partial<AnyComponent<Props, any>>;
 
       /** The document title shown in the browser window's title bar or tab. */
-      title?: (props: Props) => string | undefined;
+      title?(props: Props): string | undefined;
     }
   | {
       getInitialProps?: undefined;
@@ -51,7 +51,7 @@
 
       Component: Partial<AnyComponent<undefined, any>>;
 
-      title?: () => string | undefined;
+      title?(): string | undefined;
     };
 
 export interface PageModule<Params, Props> {
diff --git a/src/common/router/router.ts b/src/common/router/router.ts
index cb3cfd8..a792bad 100644
--- a/src/common/router/router.ts
+++ b/src/common/router/router.ts
@@ -14,7 +14,7 @@
   chunkName?: string;
   status: number;
   Component: AnyComponent<Props, any>;
-  title?: (props: Props) => string | undefined;
+  title?(props: Props): string | undefined;
   props: Props;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If22cb6d7a8917f9e7a8b1b707a01acb7b784c89a
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: Sniedzielski <sniedziel...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to