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

TextEncoder / TextDecoder are missing #82

Open
ecofi opened this issue Mar 13, 2024 · 3 comments
Open

TextEncoder / TextDecoder are missing #82

ecofi opened this issue Mar 13, 2024 · 3 comments

Comments

@ecofi
Copy link

ecofi commented Mar 13, 2024

util.TextEncoder and util.TextDecoder are missing. Any chance for including this?

@ljharb
Copy link
Member

ljharb commented Mar 13, 2024

I’d love to review a PR.

@bcruddy
Copy link

bcruddy commented May 22, 2024

It looks like they're there now but typescript doesn't like the TextDecoder implementation

Type 'typeof TextDecoder' is not assignable to type '{ new (label?: string | undefined, options?: TextDecoderOptions | undefined): TextDecoder; prototype: TextDecoder; }'.
  The types of 'prototype.decode' are incompatible between these types.
    Type '(input?: ArrayBufferView | ArrayBuffer | null | undefined, options?: { stream?: boolean | undefined; } | undefined) => string' is not assignable to type '(input?: AllowSharedBufferSource | undefined, options?: TextDecodeOptions | undefined) => string'.
      Types of parameters 'input' and 'input' are incompatible.
        Type 'AllowSharedBufferSource | undefined' is not assignable to type 'ArrayBufferView | ArrayBuffer | null | undefined'.
          Type 'ArrayBufferView' is not assignable to type 'ArrayBufferView | ArrayBuffer | null | undefined'.
            Type 'ArrayBufferView' is missing the following properties from type 'DataView': getFloat32, getFloat64, getInt8, getInt16, and 17 more.ts(2322)

@ljharb
Copy link
Member

ljharb commented May 22, 2024

@bcruddy this package still doesn't have them, node does.

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

No branches or pull requests

3 participants