之前没遇到这个问题,2023年了还有这个问题吗, 最后都是咋解决的呢。
急急急!getApp() 突然undefined,已发布小程序全部执行不下去?[图片]
2023-02-20我这报node_modules/miniprogram-api-typings/types/wx/lib.wx.api.d.ts:3853:19 - error TS2304: Cannot find name 'current'.
TypeSrcipt模板更新添加miniprogram-api-typings编译出错。求助官方?[图片][图片] [图片] 之前TypeSrcipt 模板里面 package.json 中dependencies 里面没有 miniprogram-api-typings。 npm install miniprogram-api-typings 之后在 tsconfig.json 中修改 typeRoots : [ "./node_modules/miniprogram-api-typings" ] 1.编译出现 错误 miniprogram/pages/auc/special/special.ts:62:3 - error TS2345: Argument of type '{ data: { curPage: number; pageSize: number; specials: never[]; session: {}; sesCode: string; loading: false; footer: false; showmask: false; loadAfresh: false; }; onLoad(options: any): void; onPullDownRefresh(): void; ... 4 more ...; handleTapLots(event: any): void; }' is not assignable to parameter of type 'Options<{ curPage: number; pageSize: number; specials: never[]; session: {}; sesCode: string; loading: boolean; footer: boolean; showmask: boolean; loadAfresh: boolean; }, {}>'. Object literal may only specify known properties, and 'eventLoadAfresh' does not exist in type 'Options<{ curPage: number; pageSize: number; specials: never[]; session: {}; sesCode: string; loading: boolean; footer: boolean; showmask: boolean; loadAfresh: boolean; }, {}>'. 62 eventLoadAfresh() { 2.miniprogram-api-typings 文件里面也出现错误 node_modules/miniprogram-api-typings/types/wx/lib.wx.api.d.ts:15775:15 - error TS2451: Cannot redeclare block-scoped variable 'console'. 15775 declare const console: WechatMiniprogram.Console ~~~~~~~ node_modules/typescript/lib/lib.dom.d.ts:17510:13 17510 declare var console: Console; ~~~~~~~ 'console' was also declared here.
2021-01-26