If you know how to fix the issue, make a pull request instead.
@types/xxxx package and had problems.Definitions by: in index.d.ts) so they can respond.Seems text-encoding type definition is incompatible with TypeScript 2.8.1, I got the compilation error:
(52,13): Subsequent variable declarations must have the same type. Variable 'TextDecoder' must be of type '{ new (label?: string | undefined, options?: TextDecoderOptions | undefined): TextDecoder; protot...', but here has type 'TextDecoderStatic'
both declare var TextDecoder and declare var TextEncoder are erroneous.
btw @pine san, please update the definition by section when fixing this
Finally found out that TS 2.8 has provided built-in TextEncoder and TextDecoder interfaces in lib.dom.d.ts, thus making conflicts.
The solution is to remove @types/text-encoding
Most helpful comment
Finally found out that TS 2.8 has provided built-in
TextEncoderandTextDecoderinterfaces inlib.dom.d.ts, thus making conflicts.The solution is to remove
@types/text-encoding