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

WIP: refactor: refactor types #5483

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

D-Sketon
Copy link
Member

No description provided.

Copy link

How to test

git clone -b test/perf https://github.com/D-Sketon/hexo.git
cd hexo
npm install
npm test

@coveralls
Copy link

coveralls commented Apr 30, 2024

Pull Request Test Coverage Report for Build 8894902314

Details

  • 178 of 179 (99.44%) changed or added relevant lines in 18 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 99.484%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/box/index.ts 9 10 90.0%
Totals Coverage Status
Change from base Build 8875175928: 0.006%
Covered Lines: 9443
Relevant Lines: 9492

💛 - Coveralls

@@ -407,6 +431,11 @@ class Hexo extends EventEmitter {
});
}

/**
* Load configuration and plugins.
* @returns {Promise}
Copy link
Member

Choose a reason for hiding this comment

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

Let's use TypeScript definition only, the JSDoc types can be omitted.

@@ -10,7 +11,7 @@ export = (ctx: Hexo) => {
renderable: {type: Boolean, default: true}
});

Asset.virtual('source').get(function() {
Asset.virtual('source').get(function(this: AssetSchema) {
Copy link
Member

Choose a reason for hiding this comment

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

Let's improve the warehouse's virtual type to infer this here.

@D-Sketon
Copy link
Member Author

D-Sketon commented May 1, 2024

pending: warehouse new release

@yoshinorin
Copy link
Member

yoshinorin commented May 21, 2024

@D-Sketon

pending: warehouse new release

Would you please submit a release PR to warehouse repository? I'll release a new one. Thanks :)

@D-Sketon
Copy link
Member Author

@D-Sketon

pending: warehouse new release

Would you please submit a release PR to warehouse repository? I'll release a new one. Thanks :)

IMHO, it's better to fix hexojs/warehouse#252 for better type support before release a new version. But I'm not sure how to fix it.

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

4 participants