Skip to content
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

打包中存在TS类型报错;(An TS error occurs in the package. Procedure) #261

Open
xinFengQi opened this issue Jun 11, 2024 · 1 comment

Comments

@xinFengQi
Copy link

在使用强类型打包中会存在类型错误,目前我的解决方案是

console.log('====================开始处理MindElixir类型报错问题========================'); const isMindElixirTypePath = 'node_modules/mind-elixir/dist/types/types/index.d.ts'; const mindElixirTypeStr = fs.readFileSync(isMindElixirTypePath).toString(); const mindElixirTypeResult = mindElixirTypeStr.replace('bus: ReturnType<typeof Bus.create<EventMap>>', 'bus: ReturnType<Bus.create<any>>'); fs.writeFileSync(isMindElixirTypePath, mindElixirTypeResult); console.log('====================处理MindElixir类型报错问题完成========================');

你看看是否是一个问题;

English version:
There are type errors when using strongly typed packaging, so my current solution is

console.log('====================Start handling the MindElixir type error========================'); const isMindElixirTypePath = 'node_modules/mind-elixir/dist/types/types/index.d.ts'; const mindElixirTypeStr = fs.readFileSync(isMindElixirTypePath).toString(); const mindElixirTypeResult = mindElixirTypeStr.replace('bus: ReturnType<typeof Bus.create<EventMap>>', 'bus: ReturnType<Bus.create<any>>'); fs.writeFileSync(isMindElixirTypePath, mindElixirTypeResult); console.log('====================Handling the MindElixir type error is complete========================');

You see if it's a problem;

@SSShooter
Copy link
Owner

能不能发一下报错信息😂

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

No branches or pull requests

2 participants