-
创建时间
20年1月19日
-
最后回复
20年1月22日
-
6
回复
-
1.4K
浏览
-
2
用户
我重新在ionic 4下尝试官方文档,这回把var AV =....换成import * as AV from 'leancloud-storage';这样就能通过编译了。但是同样办法在ionic 3下就会报错,而我的代码都是ionic 3写的。报错信息这回和leancloud有关,下面是VS code提示代码。
[app-scripts] [07:48:55] typescript: node_modules/leancloud-realtime/realtime.d.ts, line: 552
[app-scripts] ';' expected.
[app-scripts] L552: declare type EventContext = K extends keyof OptionalContext
[app-scripts] L553: ? OptionalContext[K]
[app-scripts] [07:48:55] typescript: node_modules/leancloud-realtime/realtime.d.ts, line: 552
[app-scripts] ';' expected.
[app-scripts] L552: declare type EventContext = K extends keyof OptionalContext
[app-scripts] L553: ? OptionalContext[K]
[app-scripts] [07:48:55] typescript: node_modules/leancloud-realtime/realtime.d.ts, line: 93
[app-scripts] A rest parameter must be of an array type.
[app-scripts] L92: listener: (payload?: ClientEvent[K]) => any,
[app-scripts] L93: ...context: EventContext
[app-scripts] L94: ): this;
[app-scripts] A rest parameter must be of an array type.
[app-scripts] L99: conversaion?: ConversationBase,
[app-scripts] L100: ...context: EventContext
[app-scripts] L101: ) => any
[app-scripts] A rest parameter must be of an array type.
[app-scripts] L104: event: K,
[app-scripts] L105: listener: (payload?: ClientEvent[K], ...context: EventContext) => any
[app-scripts] L106: ): this;
[app-scripts] A rest parameter must be of an array type.
[app-scripts] L111: conversaion?: ConversationBase,
[app-scripts] L112: ...context: EventContext
[app-scripts] L113: ) => any
[app-scripts] A rest parameter must be of an array type.
[app-scripts] L359: listener: (payload?: T[K]) => any,
[app-scripts] L360: ...context: EventContext
[app-scripts] L361: ): this;
[app-scripts] A rest parameter must be of an array type.
[app-scripts] L365: listener: (payload?: T[K]) => any,
[app-scripts] L366: ...context: EventContext
[app-scripts] L367: ): this;
推荐主题
主题 | 分类 | 回复 | 浏览 | 活动 |
---|---|---|---|---|
Android实时通信SDK报空指针异常 | SDK / API | 4 | 891 | 15-08-11 |
国际版微信小程序上传问题 | SDK / API | 1 | 978 | 19-10-8 |
Local端無法測試登入 | SDK / API | 1 | 682 | 21-09-27 |
npm安装avoscloud 命令行工具的一些Warning | SDK / API | 1 | 2.1K | 16-05-1 |
ionic2 leancloud-realtime 3.5.1 realtime.d.ts 报错 | SDK / API | 0 | 771 | 17-06-29 |