Skip to content

[Bug Report] [TypeScript] [time-select] Use the "vue-tsc" command to check ts and report an error: "Cannot find name 'ComponentSize'. type: import("vue").PropType<ComponentSize>;", without "{skipLibCheck: true}" in "tsconfig.ts" #7265

@363797271

Description

@363797271

Bug Type: TypeScript

Environment

  • Vue Version: 3.2.25
  • Element Plus Version: 2.1.8
  • Browser / OS: Microsoft Edge 100.0.1185.44/ Window 10 19044.1586
  • Build Tool: Vite

Reproduction

Related Component

  • el-time-select

Reproduction Link

Element Plus Playground

Steps to reproduce

First of all, the link of reproduction is meaningless. Please ignore it

  1. Vite create Vue application
  2. Use automatic import to import element plus components on demand
  3. run "npm run build"("vue-tsc --noEmit && vite build")

What is Expected?

Run successfully without error

What is actually happening?

node_modules/element-plus/es/components/time-select/index.d.ts:108:38 - error TS2304: Cannot find name 'ComponentSize'.
108         type: import("vue").PropType<ComponentSize>;

node_modules/element-plus/es/components/time-select/index.d.ts:277:38 - error TS2304: Cannot find name 'ComponentSize'.
277         type: import("vue").PropType<ComponentSize>;

node_modules/element-plus/lib/components/time-select/index.d.ts:108:38 - error TS2304: Cannot find name 'ComponentSize'.
108         type: import("vue").PropType<ComponentSize>;

node_modules/element-plus/lib/components/time-select/index.d.ts:277:38 - error TS2304: Cannot find name 'ComponentSize'.
277         type: import("vue").PropType<ComponentSize>;


Found 4 errors in 2 files.

Errors  Files
     2  node_modules/element-plus/es/components/time-select/index.d.ts:108
     2  node_modules/element-plus/lib/components/time-select/index.d.ts:108

Additional comments

I found that the reason is that the node_modules\element-plus\lib\components\time-select\index.d.ts file uses an ComponentSize that was not imported:

type: import("vue").PropType<ComponentSize>;

I found that none of the other components are using it anymore.

At present, I can only temporarily solve this problem by configure {skiplibcheck: true} in tsconfig.ts.

I hope the authorities will find and solve it, or tell me a scientific way

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy