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

[Bug] declare module 'react-router' 在 3.5.0 之后报错 #12562

Open
crazyair opened this issue Jul 12, 2024 · 1 comment
Open

[Bug] declare module 'react-router' 在 3.5.0 之后报错 #12562

crazyair opened this issue Jul 12, 2024 · 1 comment

Comments

@crazyair
Copy link

crazyair commented Jul 12, 2024

What happens?

在 3.5.0 版本,添加

declare module 'react-router' {
  export interface RouteObject {
    name?: string;
  }
}

会让 routes?.[0].route.name 的 name 报错

Mini Showcase Repository(REQUIRED)

Please provide a minimal reproduction then upload to your GitHub. 请提供 最小重现,并上传到你的 GitHub 仓库

How To Reproduce

https://github.com/crazyair/umi-max-use-model-bug/tree/react-router

Steps to reproduce the behavior: 1. 2.

Expected behavior 1. 2.

Context

  • Umi Version:
  • Node Version:
  • Platform:
@crazyair
Copy link
Author

@fz6m 升级完后,又发现一个 ts 问题

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

1 participant