Skip to content

v10.62.1

Latest

Choose a tag to compare

@sunnylqm sunnylqm released this 19 Oct 07:52
19ae03d

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's tsc with two errors: TS6133 in src/client.ts (an unused private emitError) and TS2349 in src/clientDownload.ts (addListener called on a union of event emitters). Both are fixed. Runtime behaviour is unchanged.

This is a JS-only release: no native rebuild is needed.

Full changelog

中文

发布类型声明,不再发布 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,无需重新编译原生代码。

完整变更