From 866f915fbe5d3cfb4e05b2a2f9ed7c3bb0f44c14 Mon Sep 17 00:00:00 2001 From: Andrew Shepherd Date: Wed, 14 Feb 2018 08:14:06 +1000 Subject: [PATCH] TS7006 error on showNativeTouchCallibration Compiling with `noImplicitAny` set to `true` created the following warning: > node_modules/@types/chrome/chrome-app.d.ts(1192,71): error TS7006: Parameter 'success' implicitly has an 'any' type. The method `showNativeTouchCalibration` is documented here: https://developer.chrome.com/apps/system_display#method-showNativeTouchCalibration It describes callback as such: > If you specify the callback parameter, it should be a function that looks like this: > > `function(boolean success) {...};` --- types/chrome/chrome-app.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/chrome/chrome-app.d.ts b/types/chrome/chrome-app.d.ts index 4ecf1d344a..65d80f3290 100644 --- a/types/chrome/chrome-app.d.ts +++ b/types/chrome/chrome-app.d.ts @@ -1189,7 +1189,7 @@ declare namespace chrome.system.display { * @param {string} id The display's unique identifier. * @param {(success) => void} callback Optional callback to inform the caller that the touch calibration has ended. The argument of the callback informs if the calibration was a success or not. */ - export function showNativeTouchCalibration(id: string, callback: (success) => void): void; + export function showNativeTouchCalibration(id: string, callback: (success: boolean) => void): void; /** * @description Starts custom touch calibration for a display. This should be called when using a custom UX for collecting calibration data. If another touch calibration is already in progress this will throw an error.