[ts] Property 'aaa' does not exist on type 'Window' 解决办法
Posted ldld
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[ts] Property 'aaa' does not exist on type 'Window' 解决办法相关的知识,希望对你有一定的参考价值。
第一种:
(window as any).aaa
第二种:
declare global { interface Window { aaa: any; } } window.aaa = window.aaa || {};
第三种:
interface MyWindow extends Window { aaa(): void; } declare var window: MyWindow;
以上是关于[ts] Property 'aaa' does not exist on type 'Window' 解决办法的主要内容,如果未能解决你的问题,请参考以下文章
There is no getter for property named 'XXX' in class 'aaa.bbb.ccc'(终极骚操作的解决方法)
error TS2339: Property '$route' does not exist on type
Cannot read property 'flags' of undefined TSINTERNAL ERROR
如何使用 ts 和 vue-property-decorator 热重载组件