在插件的index.uts里定义了如下枚举:
export enum EMMAuthType {
trad,
reVerify,
auto
}
定义的类和方法:
export class EMMAuthUtil {
static setAuthType(type : EMMAuthType) {
ESAuthUtil.setAuthType(type.rawValue)
}
static getAuthType() : EMMAuthType {
const rawValue = ESAuthUtil.authType()
return EMMAuthType[rawValue]
}
}
编译时报错:
14:15:49.975 error: method cannot be declared public because its parameter uses an internal type
14:15:49.975 at uni_modules/emm-sdk/utssdk/app-ios/index.uts:72:8
14:15:49.975 70 | }
14:15:49.975 71 |
14:15:49.975 72 | static setAuthType(type : EMMAuthType) {
14:15:49.975 | ^
14:15:49.975 73 | ESAuthUtil.setAuthType(type.rawValue)
14:15:49.975 74 | }
14:15:49.975 method cannot be declared public because its result uses an internal type
14:15:49.975 at uni_modules/emm-sdk/utssdk/app-ios/index.uts:76:8
14:15:49.975 74 | }
14:15:49.975 75 |
14:15:49.975 76 | static getAuthType() : EMMAuthType {
14:15:49.975 | ^
14:15:49.975 77 | const rawValue = ESAuthUtil.authType()
14:15:49.975 78 | return EMMAuthType[rawValue]
14:15:49.975 uni_modules/emm-sdk/utssdk/app-ios/src/index.swift:108:24: error: method cannot be declared public because its parameter uses an internal type
14:15:49.975 uni_modules/emm-sdk/utssdk/app-ios/src/index.swift:111:24: error: method cannot be declared public because its result uses an internal type
1 个回复
g***@qq.com (作者)
但是我发现在interface.uts里定义的export enum仍然无法被访问。