I have write js code with in ts. But now I have some lint error link this.
4:1 error ES2015 module syntax is preferred over custom TypeScript modules and namespaces typescript/no-namespace
4:1 error Use 'namespace' instead of 'module' to declare custom TypeScript modules typescript/prefer-namespace-keyword
I have declare like this
declare global {
interface Window {
aa: any;
}
}
and use like, it will be ok, but only call lint error
if (typeof window.aa !== 'undefined') {
// dosth
}
I can't understand the error message, and I have read the doc, but still confuse with it