From 5781f52525885a7eaeae84c60c1253e6ad69b170 Mon Sep 17 00:00:00 2001 From: Shigma Date: Fri, 19 Jan 2024 00:58:57 +0800 Subject: [PATCH] feat(element): add typing support for JSX --- packages/element/package.json | 2 +- packages/element/src/index.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/element/package.json b/packages/element/package.json index a81705ca..bbc1a031 100644 --- a/packages/element/package.json +++ b/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", diff --git a/packages/element/src/index.ts b/packages/element/src/index.ts index 660eb979..b8dfc807 100644 --- a/packages/element/src/index.ts +++ b/packages/element/src/index.ts @@ -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 } } }