[@types/chrome-apps] has incorrect return type for webview.ClearData() function #69283
Replies: 3 comments 1 reply
-
Thanks for the discussion about "chrome-apps", some useful links for everyone: Pinging the DT module owners: @niikoo, @AdamLay, @mzsm, @RReverser, @pyle, @matthewkimber, @otiai10, @RReverser, @sreimer15. |
Beta Was this translation helpful? Give feedback.
-
I can do a little more digging next week, these are the chromium typings we would have derived this from - https://source.chromium.org/chromium/chromium/src/+/main:tools/typescript/definitions/webview_tag.d.ts;l=300;drc=99ef4a255672675b6593a7c0c1ca079de3927f9f Will need to figure out why there is a discrepancy from typings and runtime. |
Beta Was this translation helpful? Give feedback.
-
I just tested again in Chromium v123 (latest available to nw.js users) and the result is the same. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if I should report this as an issue or just make a PR to fix it, but the type doesn't match the return value at runtime. I have an NW.js application (which is running Chromium 120). I am calling
clearData
function on a<webview>
tag and the return value from clearData function is actually a boolean, though the type definition says it is a void.Link to chrome docs doesn't explain the return type: https://developer.chrome.com/docs/apps/reference/webviewTag#method-clearData
But at runtime the function definitely returns a boolean value, not void.
Beta Was this translation helpful? Give feedback.
All reactions