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) {...};`
This commit is contained in:
Andrew Shepherd
2018-02-14 08:14:06 +10:00
committed by GitHub
parent 8f42ac36e7
commit 866f915fbe

View File

@@ -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.