如何在玩笑中忽略打字稿错误

时间:2021-07-27 08:39:59

标签: typescript jestjs expo

如何在使用 jest 运行测试时忽略一些打字稿错误?

我曾尝试使用 // @ts-ignore 评论,但仍然无法开玩笑。

我正在使用内部使用 jest-expojest@25.0.2

const styles = Stylesheet.create({
   header: {
     // here is the typescript error
     position: "sticky"
   }
})

此处 position: "sticky" 未在 Stylesheet 类型中定义,我想抑制此错误

0 个答案:

没有答案