msgpack / msgpack-javascript

@msgpack/msgpack - MessagePack for JavaScript / msgpack.org[JavaScript/TypeScript/ECMA-262]

Home Page:https://msgpack.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find name 'BufferSource'

baloian opened this issue · comments

I am having an issue to use the library. When I run I get the following:

Screenshot from 2021-10-05 14-13-28

This may not directly be the library issue, but any of you having the same problem?

I provided the following in tsconfig.json file but it didn't help.

"types": ["node"],
"typeRoots": ["node_modules/@types"]

I am closing the issue, after doing some research I found that I had to add "dom" and "es6" in in the compilerOptions:

{
  "compilerOptions": {
    "lib": [
      "dom",
      "es6"
    ],
	...
}

Thank you for the report. I've mentioned to BufferSource in README.md: 0290734

FYI I recommend to use the latest ES version in tsconfig.lib, e.g. "ES2021" instead of "ES6" (a.k.a. "ES2015").