Skip to content

Commit 078ae5e

Browse files
fix: fix global declaration
1 parent 039fac4 commit 078ae5e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: src/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import { ElementInternals } from './element-internals';
22
import { CustomStateSet } from './CustomStateSet';
33
import './element-internals';
4+
import { IElementInternals } from './types';
45
export * from './types';
56

67
declare global {
78
interface Window {
89
CustomStateSet: typeof CustomStateSet;
910
ElementInternals: typeof ElementInternals;
1011
}
11-
interface Element {
12+
interface HTMLElement {
1213
/**
1314
* Attaches an ElementInternals instance to a custom element. Calling this method
1415
* on a built-in element will throw an error.
1516
*/
16-
attachInternals?: () => ElementInternals
17+
attachInternals(): ElementInternals&IElementInternals;
1718
}
1819
}

0 commit comments

Comments
 (0)