We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28646b5 commit 2f52afeCopy full SHA for 2f52afe
packages/ohbug-core/src/client.ts
@@ -101,6 +101,7 @@ implements OhbugClient {
101
'background:#FF6F61; padding: 2px 1px; color: #FFF',
102
'background:transparent',
103
)
104
+ this.__extensions.forEach(extension => extension.onDestroy?.(this))
105
return this.__destroy?.()
106
}
107
packages/ohbug-types/src/extension.d.ts
@@ -4,6 +4,7 @@ import type { OhbugEventWithMethods } from './event'
4
export interface OhbugExtension {
5
name: string
6
onSetup?: (client: OhbugClient) => void
7
+ onDestroy?: (client: OhbugClient) => void
8
onEvent?: <D = any>(
9
event: OhbugEventWithMethods<D>,
10
client: OhbugClient
0 commit comments