Fixing Typescript error: error TS2430: Interface ‘NodeBuffer’ incorrectly extends interface ‘Uint8Array

If you recently upgraded Typescript, you’ll get an error like this:

typings/main/ambient/node/index.d.ts(426,11): error TS2430: Interface 'NodeBuffer' incorrectly extends interface 'Uint8Array'.
  Types of property 'fill' are incompatible.
    Type '(value: any, offset?: number, end?: number) => Buffer' is not assignable to type '(value: number, start?: number, end?: number) => this'.
      Type 'Buffer' is not assignable to type 'this'.

The fix to this is to re-install the Node type bindings:

typings install 'dt!node' --save --global
rm -rf typings/
typings install

Interested in JavaScript? I send out weekly, personalized emails with articles and conference talks. Click here to see an example and subscribe.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *