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

Missing exports from index, UnpackrStream, PackrStream #94

Open
Duoquote opened this issue Dec 13, 2022 · 1 comment
Open

Missing exports from index, UnpackrStream, PackrStream #94

Duoquote opened this issue Dec 13, 2022 · 1 comment

Comments

@Duoquote
Copy link

Hello,

I am trying to import UnpackrStream as shown below,

import { UnpackrStream } from "msgpackr";

And I am introduced with this error:

image

Typescript notations do say UnpackrStream exist but is missing in msgpackr/index.js, as well as other exports from stream.js...

image

image

Also missing in source code:

msgpackr/index.js

Lines 1 to 5 in 0c0ade5

export { Packr, Encoder, addExtension, pack, encode, NEVER, ALWAYS, DECIMAL_ROUND, DECIMAL_FIT, REUSE_BUFFER_MODE } from './pack.js'
export { Unpackr, Decoder, C1, unpack, unpackMultiple, decode, FLOAT32_OPTIONS, clearSource, roundFloat32, isNativeAccelerationEnabled } from './unpack.js'
export { decodeIter, encodeIter } from './iterators.js'
export const useRecords = false
export const mapsAsObjects = true

I am using version 1.8.1.

@kriszyp
Copy link
Owner

kriszyp commented Dec 19, 2022

@Duoquote The streaming modules require node functionality, so they are intentionally omitted from the browser/non-node entry point (msgpackr/index.js), and only available on the node platform (or node-like platforms including bun, deno) through the node entry point (msgpackr/node-index.js).

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

2 participants