-
创建时间
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;
推荐主题
主题 | 分类 | 回复 | 浏览 | 活动 |
---|---|---|---|---|
短信REST API 错误代码Code:1 | SDK / API | 1 | 478 | 20-09-18 |
怎么判断超出了数据,应该用商用版 | SDK / API | 3 | 1.2K | 18-03-1 |
LeanChat手机注册API : 无效的手机号码 | SDK / API | 3 | 1.1K | 15-12-7 |
react native 打包失败 | SDK / API | 1 | 892 | 19-06-12 |
错误码【Invalid op: Batch.】 | SDK / API | 6 | 964 | 16-03-3 |