fix(types): cast from number to string explicitly#5342
Merged
yoshinorin merged 1 commit intomasterfrom Nov 2, 2023
Merged
Conversation
- fix `TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.` error
|
Publish flamegraph to https://98a38e86ecc0f039a07dece2e29f0dcaaffc98fa-16-hexo.surge.sh/flamegraph.html |
Pull Request Test Coverage Report for Build 6709541831
💛 - Coveralls |
Member
|
what circumstances does this problem occur. I can't reproduce it. |
SukkaW
approved these changes
Nov 1, 2023
Member
Author
Checkout |
Member
|
I try node@20.5.1 and still can't reproduce. tsc 4.6.4
$ npx tsc -v
Version 4.6.4
$ npm run build
> hexo@7.0.0 build
> tsc -b
lib/box/index.ts:60:3 - error TS4055: Return type of public method from exported class has or is using private name '_File'.
60 _createFileClass() {
~~~~~~~~~~~~~~~~
lib/hexo/index.ts:463:3 - error TS4055: Return type of public method from exported class has or is using private name 'Locals'.
463 _generateLocals() {
~~~~~~~~~~~~~~~
lib/hexo/router.ts:17:27 - error TS4020: 'extends' clause of exported class 'RouteStream' has or is using private name 'Readable'.
17 class RouteStream extends Readable {
~~~~~~~~
Found 3 errors. |
uiolee
approved these changes
Nov 1, 2023
Member
|
v4.6.4 found 3 errors |
Member
Author
Can we specify which version of |
Member
|
I think we can follow the latest version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does it do?
fix
TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.error. I ignore them with@ts-ignorewhen I publishedv7.0.0.Screenshots
N/A
Pull request tasks