我在我的reactjs应用程序中有一个定制的ammo.js构建,我想在类型记录中加载。不幸的是,它不起作用。
我不得不抑制埃林特,更漂亮,不应用它的ammojs api。
reactjs v16
import * as Ammo from './ammo.js';
Ammo().then (console.log('ammojs loaded'));我有一个错误:
编译失败
/home/sancelot/git/courbes-simulation/src/components/Child.tsx
/home/sancelot/git/courbes-simulation/src/components/Child.tsx(10,1):中的TypeScript误差
此表达式不可调用。
输入‘Type no Ammo’没有调用签名。TS2349
8 // @ts-忽略
9\x{e76f}进口*作为Ammo从‘./ammo.js’进口;
10 \ Ammo().then (console.log('ammojs loaded'));
^
第11次
第12次
13型道具={
此错误发生在构建过程中,不能取消。。
发布于 2021-05-06 13:48:33
因为这是一个错误编译,所以添加@ts-忽略解决了问题。
https://stackoverflow.com/questions/67400471
复制相似问题