Skip to content

Commit

Permalink
fix: avoid using patch in vue types
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Apr 26, 2022
1 parent 47250c3 commit d9a1ca4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 0 additions & 2 deletions packages/frameworks/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@
"valtio": "^1.6.0"
},
"devDependencies": {
"@vue/runtime-dom": "^3.2.21",
"vue": "^3.0.5"
},
"peerDependencies": {
"@vue/runtime-dom": ">=3.2.0",
"vue": ">=3.0.0"
},
"scripts": {
Expand Down
24 changes: 13 additions & 11 deletions packages/frameworks/vue/src/prop-types.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import type { ElementAttrs, HTMLAttributes, NativeElements } from "@vue/runtime-dom"
import * as Vue from "vue"

type ReservedProps = {
key?: string | number | symbol
ref?: string | Vue.Ref | ((ref: Element | Vue.ComponentPublicInstance | null) => void)
}

type Attrs<T> = T & ReservedProps

export type PropTypes = {
button: NativeElements["button"]
input: NativeElements["input"]
output: NativeElements["output"]
textarea: NativeElements["textarea"]
label: NativeElements["label"]
p: NativeElements["p"]
ul: NativeElements["ul"]
ol: NativeElements["ol"]
li: NativeElements["li"]
element: ElementAttrs<HTMLAttributes>
button: Attrs<Vue.ButtonHTMLAttributes>
input: Attrs<Vue.InputHTMLAttributes>
output: Attrs<Vue.OutputHTMLAttributes>
label: Attrs<Vue.LabelHTMLAttributes>
element: Attrs<Vue.HTMLAttributes>
}

0 comments on commit d9a1ca4

Please sign in to comment.