Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno/ext/web/lib.deno_web.d.ts>TextEncoder

A modern runtime for JavaScript and TypeScript.
Latest
interface TextEncoder
import { type TextEncoder } from "https://deno.land/x/deno@v1.41.0/ext/web/lib.deno_web.d.ts";

Properties

readonly
encoding: "utf-8"

Returns "utf-8".

Methods

encode(input?: string): Uint8Array

Returns the result of running UTF-8's encoder.

encodeInto(input: string, dest: Uint8Array): TextEncoderEncodeIntoResult
variable TextEncoder
import { TextEncoder } from "https://deno.land/x/deno@v1.41.0/ext/web/lib.deno_web.d.ts";

type

{ readonly prototype: TextEncoder; new (): TextEncoder; }