Skip to content

tsconfig缺少依赖 #3

@wangguolong0

Description

@wangguolong0

在tsconfig.json中缺少依赖@uni-helper/uni-app-types,导致缺失view、text标签的类型提示,在你的uni-app.d.ts中我看到定义了view、text等的类型为any,可以把该模板的依赖更新一下吗,下载上@uni-helper/uni-app-types后并删除
export interface GlobalComponents {
// UniApp core/native tags
view: any;
'scroll-view': any;
swiper: any;
'swiper-item': any;
image: any;
'rich-text': any;
canvas: any;
block: any;

  // Basic HTML shims often used by uni-app compiler
  text: any;

}
这一段代码,类型提示就正确了

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions