We've announced VuePress 1.9 that takes full TypeScript Support for Config File, while VuePress 1.9.2 ships with TS Support for VuePress Plugin and Theme:
Quick Start
In order to make the plugin developer not dependent on VuePress for development, we provide a completely independent type package @vuepress/types:
npm i @vuepress/types -D
@vuepress/types exports four functions:
defineConfig
defineConfig4CustomTheme
defineTheme
definePlugin
Note that using @vuepress/types is equivalent to using vuepress/config.
Plugin Type
If you already have some VuePress plugins written in JS, you can leverage your IDE's intellisense with jsdoc type hints:
It is worth noting that, unlike the site configuration, i.e. .vuepress/config.js, if you use TypeScript to write theme or plugin, you still need to compile it into JavaScript before publishing it to NPM.