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
this.context=(optionsas{context: ContextType}|undefined)?.contextasContextType;// needs a type assertion because EncoderOptions has no context property when ContextType is undefined
@@ -235,6 +237,22 @@ export class Decoder<ContextType = undefined> {
this.context=(optionsas{context: ContextType}|undefined)?.contextasContextType;// needs a type assertion because EncoderOptions has no context property when ContextType is undefined
@@ -103,16 +105,49 @@ export class Encoder<ContextType = undefined> {
103
105
this.bytes=newUint8Array(this.view.buffer);
104
106
}
105
107
108
+
privateclone(){
109
+
// Because of slightly special argument `context`,
* This is almost equivalent to {@link Encoder#encode}, but it returns an reference of the encoder's internal buffer and thus much faster than {@link Encoder#encode}.
112
140
*
113
141
* @returns Encodes the object and returns a shared reference the encoder's internal buffer.
0 commit comments