You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the only way to know how to even use the JS API is to dig into the Rust code. The generated documentation at https://deno.land/x/[email protected]/mod.ts is completely useless.
I think the following changes should be made:
Make Parser wrap InternalParser, rather than extend it.
Since all of the methods of (Internal)Parser return promises, make the Parser constructor synchronous and initialize the wasm module on the first method call. We can still keep createInstance for backward compatibility.
Can we make Parser::parse take a ReadableStream<Uint8Array> and have it acquire a BYOB reader, rather than take the BYOB reader? Or maybe have the JS-side parse method wrapper take a ReadableStream<Uint8Array> | ReadableStreamByobReader.
Making Parser a wrapper class would take care of having the methods and their argument/return types in the documentation, but there needs to be more documentation on top of that.
The text was updated successfully, but these errors were encountered:
It seems like the only way to know how to even use the JS API is to dig into the Rust code. The generated documentation at https://deno.land/x/[email protected]/mod.ts is completely useless.
I think the following changes should be made:
Parser
wrapInternalParser
, rather than extend it.(Internal)Parser
return promises, make theParser
constructor synchronous and initialize the wasm module on the first method call. We can still keepcreateInstance
for backward compatibility.Parser::parse
take aReadableStream<Uint8Array>
and have it acquire a BYOB reader, rather than take the BYOB reader? Or maybe have the JS-sideparse
method wrapper take aReadableStream<Uint8Array> | ReadableStreamByobReader
.Parser
a wrapper class would take care of having the methods and their argument/return types in the documentation, but there needs to be more documentation on top of that.The text was updated successfully, but these errors were encountered: