Skip to content

Commit

Permalink
feat: define global variable hexo
Browse files Browse the repository at this point in the history
useful for plugin written in typescript or let IDE detecting it
  • Loading branch information
dimaslanjaka committed Jul 17, 2023
1 parent b3b444d commit 70d0c09
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/hexo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,4 +598,11 @@ Hexo.prototype.core_dir = Hexo.core_dir;
Hexo.version = version;
Hexo.prototype.version = Hexo.version;

// define global variable
// this useful for plugin written in typescript
declare global {
// eslint-disable-next-line one-var
const hexo: Hexo;
}

export = Hexo;

0 comments on commit 70d0c09

Please sign in to comment.