Closed
Description
index.js
import {MyType} from "./MyType";
/**
* @param {MyType} article
*/
function test(article) {
article.custom; // error TS2339: Property 'custom' does not exist on type '{ src: string; }'.
}
MyType.js
/**
* @typedef {{src: string}}
*/
let MyType;
/**
* @param {MyType} article
*/
function test(article) {
article.custom; // unknown type, no error
}
export {
MyType,
}