-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
适配新版本IDE 5.0.1 #27
base: main
Are you sure you want to change the base?
适配新版本IDE 5.0.1 #27
Conversation
ohos_rs_example/build-profile.json5
Outdated
@@ -7,6 +7,8 @@ | |||
{ | |||
"name": "default", | |||
"signingConfig": "default", | |||
"compatibleSdkVersion": "4.0.0(10)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是否应该迁移到 API12?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
支持12的。
log.info(n.toString()); | ||
}) | ||
Button("Get Undefined").onClick(() => { | ||
const u = basic.getUndefined(); | ||
const u :undefined= basic.getUndefined(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类型完善的情况下,是否可以移除这些类型声明
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经移除。
"name": "libarray.so", | ||
"version": "1.0.0", | ||
"description": "Please describe the basic information.", | ||
"main": "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里没有 type 字段?看起来加了类型没什么实际的意义。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因 使用新版 IDE报错无法编译运行项目才手动添加的类型。
export const mutateInt16Array: (a: Int16Array) => undefined; | ||
export const mutateFloat32Array: (a: Float32Array) => undefined; | ||
export const mutateFloat64Array: (a: Float64Array) => undefined; | ||
export const mutateI64Array: (a: BigInt64Array) => undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类型用自动生成的吧,不要手写。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohos能自动生成类型? 我没找到相关文档,要是能自动生成这个PR就可以关了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohrs 对于使用 napi 修饰的宏会自动生成类型包。也不完全关闭,工程升级到 12 还是有必要的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohrs 对于使用 napi 修饰的宏会自动生成类型包。也不完全关闭,工程升级到 12 还是有必要的。
ohrs 对于使用 napi 修饰的宏会自动生成类型包。 请教下, 这个我没看到?如何操作才会生成类型文件?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://ohos.rs/docs/basic/quick-start.html
通过 ohrs 构建之后在 dist 文件夹有对应的类型文件,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
升级项目,按官方要求进行项目迁移。