Repository navigation
English
Type declarations instead of TypeScript sources
The package now ships compiled declarations (lib/typescript/*.d.ts), and package.json types points at them instead of src/index.ts. Apps running tsc --noEmit no longer type-check this package's sources: skipLibCheck applies again, and the app's own compiler options (noUnusedLocals and similar) and React Native type versions no longer produce errors inside react-native-update.
Fixes
- With React Native 0.88 types and
noUnusedLocals, 10.62.0 failed an app'stscwith two errors: TS6133 insrc/client.ts(an unused privateemitError) and TS2349 insrc/clientDownload.ts(addListenercalled on a union of event emitters). Both are fixed. Runtime behaviour is unchanged.
This is a JS-only release: no native rebuild is needed.
中文
发布类型声明,不再发布 TS 源码
包里现在附带编译好的类型声明(lib/typescript/*.d.ts),package.json 的 types 指向它,不再指向 src/index.ts。应用跑 tsc --noEmit 时不会再检查本包源码:skipLibCheck 重新生效,应用自己的编译选项(如 noUnusedLocals)和 React Native 类型版本的差异,都不会再在 react-native-update 里报错。
修复
- 在 React Native 0.88 类型、开启
noUnusedLocals的情况下,10.62.0 会让应用的tsc报两个错误:src/client.ts的 TS6133(未使用的私有emitError)和src/clientDownload.ts的 TS2349(对事件发射器的联合类型调用addListener)。两处均已修复,运行时行为不变。
本次仅涉及 JS,无需重新编译原生代码。