简体   繁体   English

TypeScript 2.8中的MSApp等效项

[英]MSApp equivalent in Typescript 2.8

I use TypeScript in my WinJS-Application. 我在WinJS-Application中使用TypeScript。
I just updated my TypeScript version to 2.8. 我刚刚将TypeScript版本更新为2.8。 After the update I was not able to compile my project, because with the update to 2.8 some MS-specific tpyes are removed from the lib.d.ts . 更新之后,我无法编译我的项目,因为在更新到2.8时,从lib.d.ts中删除了一些特定于MSlib.d.ts Unfortunately I use one of these types [MSApp] and I can´t find any hint, what to use instead. 不幸的是,我使用了其中一种类型[MSApp],但找不到任何提示,而是要使用什么。
I use the type for the function getHtmlPrintDocumentSourceAsync . 我将类型用于函数getHtmlPrintDocumentSourceAsync
So how can I use this type again? 那么如何再次使用此类型? Do I need another .d.ts? 我是否需要另一个.d.ts?

A possible workaround is to take the declaration of the MSApp interface of the lib.d.ts of typescript 2.7. 一个可能的解决方法是采用打字稿2.7的lib.d.tsMSApp接口的声明。 This is possible, because the implementation of this interface didn't change. 这是可能的,因为此接口的实现未更改。 Only the declaration is missing. 仅缺少声明。 You can find the lib.d.ts on the GitHub page of typescript in the branch release-2.7 . 您可以在分支release-2.7中lib.d.tsGitHub页面上找到lib.d.ts
Here is a direct link to the lib.dt.ts . 这是指向lib.dt.ts的直接链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM