[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' 解决办法

原文地址:https://www.cnblogs.com/ldld/p/10270663.html

时间: 2024-08-29 22:29:35

[ts] Property 'aaa' does not exist on type 'Window' 解决办法的相关文章

vue element-ui typescript tree报错 === Property 'getCheckedNodes' does not exist on type 'Element | Element[] | Vue | Vue[]'.

import { Tree } from 'element-ui' const ref = <Tree>this.$refs.tree ref.getCheckedNodes() vue element-ui typescript tree报错 === Property 'getCheckedNodes' does not exist on type 'Element | Element[] | Vue | Vue[]'. 原文地址:https://www.cnblogs.com/cynthi

mount: unknown filesystem type &#39;ntfs&#39; 解决办法

可以通过ntfs-3g来解决1.wget https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz 2.tar zxvf  ntfs-3g_ntfsprogs-2017.3.23.tgz 3.cd ntfs-3g_ntfsprogs-2017.3.23 4../configure 5.make 6.make install 7.利用mount去挂载这块硬盘,例如我的把/dev/vdb1挂载到/wuyou目录下,使用命令如下 mou

Eclipse Some projects cannot be imported because they already exist in the workspace 解决办法

MyEclipse 或Eclipse 从外部导入工程时,  workspace目录提示 Some projects cannot be imported because they already exist in the workspace finish是灰色的 点击不了下一步,解决办法是: 这种情况基本是以下错误操作造成: 1.手动删除本地磁盘下的工程目录 2.删除时,没有勾选Delete project contents on disk(cannot be undone) 以上2种操作,ec

The method assertEquals(Object, Object) is ambiguous for the type Assert解决办法

该错误意思是方法调用存在歧义,先看下面这个例子: assertEquals(10L, (Long)10); 编译器就会报出The method assertEquals(Object, Object) is ambiguous for the type Assert的错误: 10L是long型,而(Long)10是Long型.而assertEquals()是一个重载的方法,其中就有 assertEquals(Object,Object) assertEquals(Long, Long) 那么问题

org/objectweb/asm/Type异常解决办法

整合SSH的时候遇到了org/objectweb/asm/Type 解决方法1: 原因是Spring中的cglib-nodep-2.x.x.jar与Hibernate中的cglib-2.2.jar相冲突! 两种框架整合时Spring中的cglib-nodep-2.x.x.jar是必须的,取消Hibernate中的cglib-2.2.jar即可 解决方法2: 在Hibernate 3.2.6.中的 cglib 是 cglib-2.1.3.,jar 使用 cglib-2.2.jar 则出现以上问题.

[virsh] error: unknown OS type hvm解决办法

今天在linux服务器上编译安装升级了下qemu,升级命令如下: [email protected]:/opt/qemu-2.0.0# ./configure --prefix=/usr/local/ --target-list=x86_64-softmmu [email protected]:/opt/qemu-2.0.0# make [email protected]:/opt/qemu-2.0.0# make install 顺利编译安装后,去define了一个虚拟机,结果报了如下错误:

Eclipse javax.servlet.jsp.PageContext cannot be resolved to a type 错误解决办法

目前在jsp页面form action中使用${pageContext.request.contextPath }/servlet的写法,但是一直提示有错误,错误如下:javax.servlet.jsp.PageContext cannot be resolved to a type 网上解答过说要缺少jsp-api.jar,导入这个包之后不报错了,但是程序启动访问这个页面的时候出现如下错误: org.apache.jasper.JasperException: Unable to read T

U盘安装CentOS 7提示 “Warning: /dev/root does not exist, could not boot” 解决办法

1.把U盘的Lable(即标签)修改成centos 2.在安装界面上按TAB键,修改启动路径,把"CENTOS\x207\x20x86_64″改成 "centos"

U盘安装redhat7.2提示 “Warning: /dev/root does not exist, could not boot” 解决办法

这个问题是木有找到你的U盘,这个配置是需要在上一步需要完成的,但在上一步我们并不知道U盘的文件名,所以索性在这一步查看一下U盘的设备名,然后再回到上一步完成配置. 在#后面输入:cd  /dev,然后会看到如下界面: sda.sdc是我的硬盘对应的文件名(我机子有两块硬盘),所以sdb就是U盘对应的文件名了,可以看到是sdb4.至此我们重启一下,回到第一个图片所示的界面处,然后按下Tab键,将vmlinuz initrd=initrd.imginst.stage2=hd:LABEL=... qu