Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessagePack types error fixed by adding more flexible type definitions. #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

itsfuad
Copy link

@itsfuad itsfuad commented Apr 17, 2024

  • encode.ts
    On line 70

Argument of type 'string' is not assignable to parameter of type 'never'.

Fix - change const keys = []; to const keys: any[] = []; on line 63

On line 328

Fixed error: Type 'ArrayBufferLike' is not assignable to type 'ArrayBuffer | undefined'.
Property 'resize' is missing in type 'SharedArrayBuffer' but required in type 'ArrayBuffer'.

Fix - change _bin?: ArrayBuffer; to _bin?: ArrayBuffer | ArrayBufferLike; on like 49

  • decode.ts
    On line 56

Type 'ArrayBufferLike' is not assignable to type 'ArrayBuffer'.
Property 'resize' is missing in type 'SharedArrayBuffer' but required in type 'ArrayBuffer'

Fix - change private readonly _buffer: ArrayBuffer; to private readonly _buffer: ArrayBuffer | SharedArrayBuffer; on line 47.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant