Starting with TypeScript 2.9, which is built into the new VS codes, this is possible using syntax importin JSDoc, for example,
/**
* @typedef {import("koa").Context} Context
*
* @typedef {Object} BodyparserOptions
* @prop {(ctx: Context) => boolean} [detectJSON] Custom json request detect function. Default 'null'.
*/
VS Code , .