SFC Playground does not report type errors in `App.vue` with `lang="ts"` until refresh

Đang mở
#321 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

@oumoussa98 đang làm issue này rồi.

Từ ngày 21/4/2025.

  • #334 của @oumoussa98 — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
devtools, frontend

Hướng nghiên cứu

Reproduce the issue in the Vue SFC Playground using App.vue with script setup lang="ts", then compare its behavior with a newly created component and a .ts file. Trace the refresh-triggered type-checking path; done means the type error on '' satisfies number appears immediately without refreshing.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

p2-edge-case
Vue version

Any version available on Playground

Link to minimal reproduction

https://play.vuejs.org

Steps to reproduce
  1. Open a fresh Vue SFC Playground.
  2. Modify the starter code of App.vue as follows:
- <script setup>
+ <script setup lang="ts">
import { ref } from 'vue'

const msg = ref('Hello World!')
+ '' satisfies number
</script>
What is expected?

Type error to be reported on line '' satisfies number.

What is actually happening?

Type error does not get reported, until refreshing the playground.

System Info

Any additional comments?

The issue seems to specifically affect App.vue, as it is not reproducible with the same steps but on a newly created component (or a .ts file).

Ngôn ngữ chính
TypeScript
Star
1.1k
Fork
222
Merge trung bình
2 giờ 10 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của vuejs/repl

Tất cả issue của vuejs/repl

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.