tsc: 3.0.3
vscode: 1.27.2
I have a library (we will call it my-module). I am including it in my JavaScript app for testing with JavaScript, I am trying to typedoc a module.exports which just exports an object literal. Adding JSDoc to it doesn't validate the object like I was expecting.
I have this TS interface:
export interface AppSettings {
port: number;
// other settings
}
This works, it throws an error saying that port is missing.
/** @type {import('my-module').AppSettings} */
let settings = {}
module.exports = settings
So, I tried it on the object, but it doesn't work, port is missing but there is no error.
/** @type {import('my-module').AppSettings} */
module.exports = {}
I have tried multiple doctypes, and none of them work such as:
This one is similar to how it is described on the jsdoc website
/**
* @namespace
* @property {import('my-module').AppSettings} exports
*/
module.exports = {}
module = {
/** @type {import('my-module').AppSettings} */
exports: {}
}
tsc: 3.0.3
vscode: 1.27.2
I have a library (we will call it
my-module). I am including it in my JavaScript app for testing with JavaScript, I am trying to typedoc amodule.exportswhich just exports an object literal. Adding JSDoc to it doesn't validate the object like I was expecting.I have this TS interface:
This works, it throws an error saying that
portis missing.So, I tried it on the object, but it doesn't work,
portis missing but there is no error.I have tried multiple doctypes, and none of them work such as:
This one is similar to how it is described on the jsdoc website