如何对块使用`@ts-ignore` [英] How to use `@ts-ignore` for a block

查看:31
本文介绍了如何对块使用`@ts-ignore`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

//@ts-ignore 注释使 TypeScript 编译器能够忽略它下面的行.

The // @ts-ignore comment enables the TypeScript compiler to ignore the line below it.

如何使用 TypeScript 忽略一整块代码?

How can one ignore a whole block of code with TypeScript?

推荐答案

你不能.这是 TypeScript 中的一个开放问题:https://github.com/Microsoft/TypeScript/issues/19573

You can't. This is an open issue in TypeScript: https://github.com/Microsoft/TypeScript/issues/19573

这篇关于如何对块使用`@ts-ignore`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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