How to solve typescript node definition of compilation errors?

In the node.d.ts file installed by tsd tool, I am getting the following compilation error: -

';' expected

      

for lines that look like this: -

read(size?: number): string|Buffer;

      

the | is highlighted as a problem.

how can i fix this?

+3


source to share


1 answer


how can i fix this?



You are probably using an older version of the TypeScript compiler. |

denotes the type of union, and those that ship with TypeScript 1.4

and above.

+2


source







All Articles