From 564a326d5053e1acac9bf0209846e5ce2feb5fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Eura=C5=A1?= Date: Thu, 20 Sep 2018 11:00:34 +0200 Subject: [PATCH] Fix typos for onWillClose in usage and types --- docs/usage.md | 4 ++-- index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index bf14ff14..dfb7e4d1 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -218,10 +218,10 @@ unsubscribe(); ### `onWillClose(callback)` -A callback which will be called when Webamp is _about to_ closed. Returns an "unsubscribe" function. The callback will be passed a `cancel` function which you can use to conditionally prevent Webamp from being closed. +A callback which will be called when Webamp is _about to_ close. Returns an "unsubscribe" function. The callback will be passed a `cancel` function which you can use to conditionally prevent Webamp from being closed. ```JavaScript -const unsubscribe = webamp.onClose((cancel) => { +const unsubscribe = webamp.onWillClose((cancel) => { if (!window.confirm("Are you sure you want to close Webamp?")) { cancel(); } diff --git a/index.d.ts b/index.d.ts index 48a580a8..75491739 100644 --- a/index.d.ts +++ b/index.d.ts @@ -161,7 +161,7 @@ export default class Webamp { public onTrackDidChange(callback: (track: Track) => any): () => void; /** - * A callback which will be called when Webamp is _about to_ closed. Returns an + * A callback which will be called when Webamp is _about to_ close. Returns an * "unsubscribe" function. The callback will be passed a `cancel` function * which you can use to conditionally prevent Webamp from being closed. *