diff --git a/lib/hexo/index.ts b/lib/hexo/index.ts index e8c06b83d4..21c14183fb 100644 --- a/lib/hexo/index.ts +++ b/lib/hexo/index.ts @@ -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;