method TextEncoder.encode TextEncoder.encode(input?: string): Uint8Array Returns the result of running UTF-8's encoder. Parameters optional input: string Return Type Uint8Array