Skip to content

Commit

Permalink
Merge pull request #10 from front-of-house/types
Browse files Browse the repository at this point in the history
feat: fix jsx types
  • Loading branch information
estrattonbailey committed Feb 7, 2023
2 parents b88e470 + 4bc37bf commit 2fe7a98
Show file tree
Hide file tree
Showing 5 changed files with 543 additions and 431 deletions.
12 changes: 12 additions & 0 deletions jsx.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type Properties = keyof import('csstype').Properties

declare namespace JSX {
type Element = string
interface IntrinsicElements {
[elemName: string]: Partial<{
id: string
className: string
style: { [property in Properties]?: string | number }
}>
}
}
2 changes: 2 additions & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference path="../jsx.d.ts" />

import { Properties as CSSProperties } from 'csstype'

type CSSPropertyNames = keyof CSSProperties
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
"@commitlint/config-conventional": "^15.0.0",
"@semantic-release/git": "^10.0.1",
"baretest": "^2.0.0",
"c8": "^7.10.0",
"c8": "^7.12.0",
"commitlint": "^15.0.0",
"esbuild": "^0.14.7",
"esbuild-register": "^3.2.1",
"esbuild": "^0.14.54",
"esbuild-register": "^3.4.2",
"husky": "^7.0.4",
"is-ci": "^3.0.1",
"prettier": "^2.5.1",
"prettier": "^2.8.3",
"semantic-release": "^18.0.1",
"typescript": "^4.5.4",
"uvu": "^0.5.2"
"typescript": "^4.9.5",
"uvu": "^0.5.6"
},
"dependencies": {
"csstype": "^3.0.10"
"csstype": "^3.1.1"
}
}

0 comments on commit 2fe7a98

Please sign in to comment.