From acd0e1cb6de77123798368dbcf48d62a9f1d5006 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Wed, 6 Feb 2019 13:10:33 +0100 Subject: [PATCH 1/2] platform: The parse and toString methods are not maybe present, they are definitely present. --- types/platform/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/platform/index.d.ts b/types/platform/index.d.ts index b0f640d522..c1db7431f3 100644 --- a/types/platform/index.d.ts +++ b/types/platform/index.d.ts @@ -18,8 +18,8 @@ declare interface Platform { version?: string; toString(): string; }; - parse?(ua: string): Platform; - toString?(): string; + parse(ua: string): Platform; + toString(): string; } declare var platform: Platform; From 8ab3765a87c465c8273308ea09ace21281ee4c40 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Wed, 6 Feb 2019 13:20:10 +0100 Subject: [PATCH 2/2] platform: fixed the tests --- types/platform/platform-tests.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/platform/platform-tests.ts b/types/platform/platform-tests.ts index 65433ffb13..ce8648e876 100644 --- a/types/platform/platform-tests.ts +++ b/types/platform/platform-tests.ts @@ -16,7 +16,8 @@ var tests: TestContainer = { prerelease: null, product: null, ua: "Mozilla/5.0 (Linux; U; Android 4.0.3; zh-cn; HTC Sensation XE with Beats Audio Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.77 Mobile Safari/535.7", - version: "16.0.912.77" + version: "16.0.912.77", + parse: function () {throw new Error()} }, 'WebKit Nightly 528.4 (like Safari 4.x) on Mac OS X 10.4.11': { description: "WebKit Nightly 528.4 (like Safari 4.x) on Mac OS X 10.4.11", @@ -31,7 +32,8 @@ var tests: TestContainer = { prerelease: "alpha", product: null, ua: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; tr) AppleWebKit/528.4+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2", - version: "528.4" + version: "528.4", + parse: function () {throw new Error()} } };