method TextEncoder.encodeprivateTextEncoder.encode(input?: string): Uint8ArrayDeprecatedTurns a string into binary data (in the form of a Uint8Array) using UTF-8 encoding. Parametersoptionalinput: stringReturn TypeUint8Array