Skip to content

Commit

Permalink
feat(element): add typing support for JSX
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jan 18, 2024
1 parent 4735f29 commit 5781f52
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/element/package.json
@@ -1,7 +1,7 @@
{
"name": "@satorijs/element",
"description": "Element Manipulation",
"version": "3.1.1",
"version": "3.1.2",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"types": "lib/index.d.ts",
Expand Down
13 changes: 13 additions & 0 deletions packages/element/src/index.ts
Expand Up @@ -24,6 +24,19 @@ declare global {
name?: string
avatar?: string
}
img: ResourceElement
audio: ResourceElement
video: ResourceElement
file: ResourceElement
}

interface ResourceElement {
src?: string
title?: string
width?: string | number
height?: string | number
duration?: string | number
poster?: string
}
}
}
Expand Down

0 comments on commit 5781f52

Please sign in to comment.