Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit af4ea8f

Browse files
committed
WIP: emit<T extends object>()
1 parent 7219206 commit af4ea8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/mdc-base/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class MDCComponent<FoundationType extends MDCFoundation> {
103103
* Fires a cross-browser-compatible custom event from the component root of the given type,
104104
* with the given data.
105105
*/
106-
emit<T>(evtType: string, evtData: T, shouldBubble = false) {
106+
emit<T extends object>(evtType: string, evtData: T, shouldBubble = false) {
107107
let evt: CustomEvent<T>;
108108
if (typeof CustomEvent === 'function') {
109109
evt = new CustomEvent<T>(evtType, {

packages/mdc-menu/adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* THE SOFTWARE.
2222
*/
2323

24-
import {MenuItemEventDetail} from './constants';
24+
import {MenuItemEventDetail} from './types';
2525

2626
/**
2727
* Implement this adapter for your framework of choice to delegate updates to

0 commit comments

Comments
 (0)