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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/hooks/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"composite": true
}
"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

3 changes: 2 additions & 1 deletion packages/use-url-state/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 0 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 警告了

},
"allowSyntheticDefaultImports": true,
Expand Down