File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " simple-tsx" ,
3
- "version" : " 1.1 .0" ,
3
+ "version" : " 1.2 .0" ,
4
4
"description" : " A simple way to write tsx files. No babel required!" ,
5
5
"main" : " dist/index.js" ,
6
6
"type" : " commonjs" ,
Original file line number Diff line number Diff line change 1
- import { AttributesType } from "./types" ;
1
+ import { AttributeValueType , AttributesType } from "./types" ;
2
2
3
3
export default class Element {
4
4
element : HTMLElement ;
5
5
6
+ // This will allow you to use this class for IntrinsicElements. I know this is a hacky way to do things but I don't have anything better.
7
+ [ name : string ] : AttributeValueType | HTMLElement ;
8
+
6
9
constructor (
7
10
tagName : string ,
8
11
attributes : AttributesType | null ,
Original file line number Diff line number Diff line change
1
+ export type AttributeValueType = string | ( ( event : Event ) => unknown ) ;
2
+
1
3
export type AttributesType = {
2
- [ key : string ] : string | ( ( event : Event ) => unknown ) ;
4
+ [ key : string ] : AttributeValueType ;
3
5
} ;
You can’t perform that action at this time.
0 commit comments