method TextEncoder.encode Private TextEncoder.encode(input?: string): Uint8Array Turns a string into binary data (in the form of a Uint8Array) using UTF-8 encoding. Parameters optional input: string Return Type Uint8Array