Skip to content

Conversation

@mackwang112
Copy link
Collaborator

@mackwang112 mackwang112 commented Aug 21, 2025

  • 修复文档错误
  • 导出store中类型更多声明,以解决三方项目使用ts编写store代码,在开启declaration时执行tsc出现错误,例如
import { createStoreWithThis } from "@mpxjs/store"

export default createStoreWithThis({})

在 tsc --declaration后产出的.d.ts如下

declare const _default: import("@mpxjs/store").StoreWithThis<{}, {}, {}, {}, {}>;
export default _default;

如果 @mpxjs/store 中未导出 StoreWithThis 类型,会出现报错。

采用的解决方案为将@mpxjs/store中所有导出的方法使用到的类型声明均一起导出,即可修复

  • 补充options.disableMemo与components的ts类型

8e231ab

@mackwang112 mackwang112 changed the title docs: 文档修改 ts Sep 22, 2025
@mackwang112 mackwang112 changed the title ts ts 类型导出,修复 declaration 模式下类型报错 Sep 22, 2025
@hiyuki hiyuki merged commit 150cee0 into master Oct 10, 2025
6 checks passed
@hiyuki hiyuki deleted the fix-rn-docs branch October 10, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants