Skip to content

Commit 051a7f4

Browse files
authored
Update index.d.ts
Use the right way to add custom element to TypeScript definitions. Sadly, I didn't find any official docs on this matter, only some posts/repos: - https://justinfagnani.com/2019/11/01/how-to-publish-web-components-to-npm/ - https://github.com/runem/lit-analyzer/tree/master/packages/lit-analyzer#-no-unknown-tag-name
1 parent b2202a3 commit 051a7f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default class ImageCropElement extends HTMLElement {
44
}
55

66
declare global {
7-
interface Window {
8-
ImageCropElement: typeof ImageCropElement
7+
interface HTMLElementTagNameMap {
8+
'image-crop': ImageCropElement
99
}
1010
}

0 commit comments

Comments
 (0)