Skip to content

Commit 24a7b61

Browse files
authored
feat: define global variable hexo (#5242)
useful for plugin written in typescript or let IDE detecting it
1 parent 35ceaae commit 24a7b61

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/hexo/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,4 +598,11 @@ Hexo.prototype.core_dir = Hexo.core_dir;
598598
Hexo.version = version;
599599
Hexo.prototype.version = Hexo.version;
600600

601+
// define global variable
602+
// this useful for plugin written in typescript
603+
declare global {
604+
// eslint-disable-next-line one-var
605+
const hexo: Hexo;
606+
}
607+
601608
export = Hexo;

0 commit comments

Comments
 (0)