chrome窗口api扩展window.performance.memory的类型 [英] typings for chrome window api extention window.performance.memory

查看:67
本文介绍了chrome窗口api扩展window.performance.memory的类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在打字稿中获取window.performance.memory的句柄?有非标准api的定义吗?

How do I get a handle on window.performance.memory in typescript? Is there a definition for the non standard api stuff?

谢谢

推荐答案

是否有非标准api的定义

Is there a definition for the non standard api stuff

您可以轻松地自己声明它:

You can declare it yourself quite easily:

interface Performance{
    memory:any
}

window.performance.memory; // No error

更多

Lib.d.ts扩展名: https://basarat.gitbooks.io/typescript/docs/types/lib.d.ts.html

这篇关于chrome窗口api扩展window.performance.memory的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆