Skip to content

Commit f318e32

Browse files
committed
fix(dom): update OnConnected type to use WithLifecycle for better type safety
1 parent 102dc92 commit f318e32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/dom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ export namespace Lifecycle {
379379
* @param element The element that was connected
380380
* @returns Optional cleanup function that runs on disconnection
381381
*/
382-
export type OnConnected<T extends HTMLElement = HTMLElement> = (element: T) => void | OnDisconnected;
382+
export type OnConnected<T extends HTMLElement = HTMLElement> = (element: WithLifecycle<T>) => void | OnDisconnected;
383383

384384
/**
385385
* Function type to manually remove a connection callback.

0 commit comments

Comments
 (0)