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

chore: solve ts warnings #2339

Merged
merged 1 commit into from Dec 26, 2023
Merged

chore: solve ts warnings #2339

merged 1 commit into from Dec 26, 2023

Conversation

liuyib
Copy link
Collaborator

@liuyib liuyib commented Oct 8, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

Resolve warnings of TypeScript file

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English chore: solve ts warnings
🇨🇳 Chinese chore: 解决 ts 警告

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@@ -9,8 +9,6 @@
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"ahooks": ["./packages/hooks/src/index.ts"],
"ahooks/lib/*": ["./packages/hooks/src/*"],
"@ahooksjs/use-url-state": ["./packages/use-url-state/src/index.ts"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个别名在 use-url-state 中有用到,但是会警告:

image

由于 use-url-state 中安装了 ahooks,所以不需要这个别名了,直接从 node_modules 中查找,就不会有 ts 警告了

"composite": true,
"declaration": true
},
"include": ["src"]
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

解决:
image

@@ -2,5 +2,6 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src"
}
},
"include": ["src"]
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

解决:
image

@crazylxr crazylxr merged commit 527430a into master Dec 26, 2023
15 checks passed
@crazylxr crazylxr deleted the chore_solve_ts_config_warnings branch December 26, 2023 14:18
byethewind pushed a commit to byethewind/hooks that referenced this pull request Feb 26, 2024
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.

None yet

2 participants