我有一个非常奇怪的问题,那就是typescript和react-scripts
Line 5:16: Parsing error: Unexpected token
3 | class AutoUpdateBase<TBinding> implements IAutoUpdate<TBinding>{
4 |
> 5 | protected binding?: (arg: TBinding) => void;
| ^
6 |
7 | resolveValue(): TBinding{ throw new Error('Not implements'); };
8 | reciveValue(value: TBinding): void{ throw new Error('Not implements'); };...That可能正在发生??
发布于 2021-04-04 05:38:03
几乎可以肯定的是,您的环境没有正确地设置为加载或转换typescript,并且您看到的错误是因为它试图将typescript解释为javascript (它没有受保护的关键字)。
然而,由于您的问题几乎不包括回答它所需的任何上下文,例如运行的是什么构建命令导致了错误,在什么工具中,在什么react托管环境中,几乎不可能提供更具体的指导。
https://stackoverflow.com/questions/66933464
复制相似问题