Skip to content

Commit

Permalink
feat: define global variable hexo (#5242)
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 authored Aug 10, 2023
1 parent 35ceaae commit 24a7b61
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 24a7b61

Please sign in to comment.