From 99369243d875967eca19b2cfc18390189495539b Mon Sep 17 00:00:00 2001 From: vchimev Date: Thu, 23 Nov 2017 10:24:20 +0200 Subject: [PATCH] fix(ts): cast setTimeout() to avoid TS errors ERROR in [at-loader] ./app/examples/conference-agenda/conference-agenda-example.ts:63:5 TS2322: Type 'Timer' is not assignable to type 'number'. ERROR in [at-loader] ./app/examples/conference-agenda/conference-agenda-example.ts:71:9 TS2322: Type 'Timer' is not assignable to type 'number'. ERROR in [at-loader] ./app/examples/user-profile/user-profile-example.ts:89:5 TS2322: Type 'Timer' is not assignable to type 'number'. ERROR in [at-loader] ./app/examples/user-profile/user-profile-example.ts:97:9 TS2322: Type 'Timer' is not assignable to type 'number'. Caused by https://github.com/tj/commander.js/pull/646. Related to https://github.com/tj/commander.js/issues/719. --- app/examples/conference-agenda/conference-agenda-example.ts | 4 ++-- app/examples/user-profile/user-profile-example.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/examples/conference-agenda/conference-agenda-example.ts b/app/examples/conference-agenda/conference-agenda-example.ts index 325b2420..52f5fb67 100644 --- a/app/examples/conference-agenda/conference-agenda-example.ts +++ b/app/examples/conference-agenda/conference-agenda-example.ts @@ -60,7 +60,7 @@ export function inputTap(args) { if (closeTimeout) { clearTimeout(closeTimeout); } - closeTimeout = setTimeout(() => { + closeTimeout = setTimeout(() => { closeTimeout = 0; }, 20); } @@ -68,7 +68,7 @@ export function inputTap(args) { export function tap(args: EventData) { var page = (args.object).page; if (!closeTimeout) { - closeTimeout = setTimeout(() => { + closeTimeout = setTimeout(() => { page.getViewById("search").dismissSoftInput(); closeTimeout = 0; }, 20); diff --git a/app/examples/user-profile/user-profile-example.ts b/app/examples/user-profile/user-profile-example.ts index 41361021..bf0c7bcd 100644 --- a/app/examples/user-profile/user-profile-example.ts +++ b/app/examples/user-profile/user-profile-example.ts @@ -86,7 +86,7 @@ export function onTextInputTapped(args: EventData) { if (closeTimeout) { clearTimeout(closeTimeout); } - closeTimeout = setTimeout(() => { + closeTimeout = setTimeout(() => { closeTimeout = 0; }, 20); } @@ -94,7 +94,7 @@ export function onTextInputTapped(args: EventData) { export function onPageTapped(args: EventData) { var page = args.object; if (!closeTimeout) { - closeTimeout = setTimeout(() => { + closeTimeout = setTimeout(() => { page.getViewById("username").dismissSoftInput(); page.getViewById("email").dismissSoftInput(); page.getViewById("password").dismissSoftInput();