File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ export class Encoder<ContextType = undefined> {
8484 private readonly forceIntegerToFloat : boolean ;
8585
8686 private pos : number ;
87- private view : DataView ;
88- private bytes : Uint8Array ;
87+ private view : DataView < ArrayBuffer > ;
88+ private bytes : Uint8Array < ArrayBuffer > ;
8989
9090 private entered = false ;
9191
@@ -132,7 +132,7 @@ export class Encoder<ContextType = undefined> {
132132 *
133133 * @returns Encodes the object and returns a shared reference the encoder's internal buffer.
134134 */
135- public encodeSharedRef ( object : unknown ) : Uint8Array {
135+ public encodeSharedRef ( object : unknown ) : Uint8Array < ArrayBuffer > {
136136 if ( this . entered ) {
137137 const instance = this . clone ( ) ;
138138 return instance . encodeSharedRef ( object ) ;
@@ -152,7 +152,7 @@ export class Encoder<ContextType = undefined> {
152152 /**
153153 * @returns Encodes the object and returns a copy of the encoder's internal buffer.
154154 */
155- public encode ( object : unknown ) : Uint8Array {
155+ public encode ( object : unknown ) : Uint8Array < ArrayBuffer > {
156156 if ( this . entered ) {
157157 const instance = this . clone ( ) ;
158158 return instance . encode ( object ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import type { SplitUndefined } from "./context.ts";
1111export function encode < ContextType = undefined > (
1212 value : unknown ,
1313 options ?: EncoderOptions < SplitUndefined < ContextType > > ,
14- ) : Uint8Array {
14+ ) : Uint8Array < ArrayBuffer > {
1515 const encoder = new Encoder ( options ) ;
1616 return encoder . encodeSharedRef ( value ) ;
1717}
You can’t perform that action at this time.
0 commit comments