Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit ca61022

Browse files
shellingfordlysxzz
andauthored
fix(playground): import type error (#219)
Co-authored-by: 三咲智子 Kevin Deng <[email protected]>
1 parent b5ecb72 commit ca61022

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

playground/src/refs.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup lang="ts">
2-
import { Data } from '@vue/shared'
2+
import type { Data } from '@vue/runtime-shared'
33
import { ref, onMounted } from 'vue/vapor'
44
5-
const inputRef = ref()
6-
const buttonRef = ref()
5+
const inputRef = ref<HTMLInputElement>()
6+
const buttonRef = ref<HTMLButtonElement>()
77
88
function handleSetRef(el: HTMLButtonElement, refs: Data) {
99
buttonRef.value = el
@@ -18,6 +18,7 @@ onMounted(() => {
1818
<template>
1919
<div>
2020
<input type="text" ref="inputRef" />
21+
<!-- @vue-expect-error TODO fix types -->
2122
<button :ref="handleSetRef">Button</button>
2223
</div>
2324
</template>

playground/src/todo-mvc.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const remaining = computed(() => {
1313
return tasks.value.filter(task => !task.completed).length
1414
})
1515
16-
function handleAdd(evt: MouseEvent) {
16+
function handleAdd(evt: KeyboardEvent | MouseEvent) {
1717
console.log(evt)
1818
tasks.value.push({
1919
title: value.value,

0 commit comments

Comments
 (0)