@cloudflare/workers-types 4.20230814.0 → 4.20230830.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -878,8 +878,11 @@ declare class TextDecoder {
878
878
  }
879
879
  declare class TextEncoder {
880
880
  constructor();
881
- encode(input?: string): Uint8Array;
882
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
881
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
882
+ encodeInto(
883
+ input: string,
884
+ buffer: ArrayBuffer | ArrayBufferView
885
+ ): TextEncoderEncodeIntoResult;
883
886
  readonly encoding: string;
884
887
  }
885
888
  declare interface TextDecoderConstructorOptions {
@@ -880,8 +880,11 @@ export declare class TextDecoder {
880
880
  }
881
881
  export declare class TextEncoder {
882
882
  constructor();
883
- encode(input?: string): Uint8Array;
884
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
883
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
884
+ encodeInto(
885
+ input: string,
886
+ buffer: ArrayBuffer | ArrayBufferView
887
+ ): TextEncoderEncodeIntoResult;
885
888
  readonly encoding: string;
886
889
  }
887
890
  export interface TextDecoderConstructorOptions {
@@ -865,8 +865,11 @@ declare class TextDecoder {
865
865
  }
866
866
  declare class TextEncoder {
867
867
  constructor();
868
- encode(input?: string): Uint8Array;
869
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
868
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
869
+ encodeInto(
870
+ input: string,
871
+ buffer: ArrayBuffer | ArrayBufferView
872
+ ): TextEncoderEncodeIntoResult;
870
873
  get encoding(): string;
871
874
  }
872
875
  declare interface TextDecoderConstructorOptions {
@@ -867,8 +867,11 @@ export declare class TextDecoder {
867
867
  }
868
868
  export declare class TextEncoder {
869
869
  constructor();
870
- encode(input?: string): Uint8Array;
871
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
870
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
871
+ encodeInto(
872
+ input: string,
873
+ buffer: ArrayBuffer | ArrayBufferView
874
+ ): TextEncoderEncodeIntoResult;
872
875
  get encoding(): string;
873
876
  }
874
877
  export interface TextDecoderConstructorOptions {
@@ -871,8 +871,11 @@ declare class TextDecoder {
871
871
  }
872
872
  declare class TextEncoder {
873
873
  constructor();
874
- encode(input?: string): Uint8Array;
875
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
874
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
875
+ encodeInto(
876
+ input: string,
877
+ buffer: ArrayBuffer | ArrayBufferView
878
+ ): TextEncoderEncodeIntoResult;
876
879
  get encoding(): string;
877
880
  }
878
881
  declare interface TextDecoderConstructorOptions {
@@ -873,8 +873,11 @@ export declare class TextDecoder {
873
873
  }
874
874
  export declare class TextEncoder {
875
875
  constructor();
876
- encode(input?: string): Uint8Array;
877
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
876
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
877
+ encodeInto(
878
+ input: string,
879
+ buffer: ArrayBuffer | ArrayBufferView
880
+ ): TextEncoderEncodeIntoResult;
878
881
  get encoding(): string;
879
882
  }
880
883
  export interface TextDecoderConstructorOptions {
@@ -871,8 +871,11 @@ declare class TextDecoder {
871
871
  }
872
872
  declare class TextEncoder {
873
873
  constructor();
874
- encode(input?: string): Uint8Array;
875
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
874
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
875
+ encodeInto(
876
+ input: string,
877
+ buffer: ArrayBuffer | ArrayBufferView
878
+ ): TextEncoderEncodeIntoResult;
876
879
  get encoding(): string;
877
880
  }
878
881
  declare interface TextDecoderConstructorOptions {
@@ -873,8 +873,11 @@ export declare class TextDecoder {
873
873
  }
874
874
  export declare class TextEncoder {
875
875
  constructor();
876
- encode(input?: string): Uint8Array;
877
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
876
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
877
+ encodeInto(
878
+ input: string,
879
+ buffer: ArrayBuffer | ArrayBufferView
880
+ ): TextEncoderEncodeIntoResult;
878
881
  get encoding(): string;
879
882
  }
880
883
  export interface TextDecoderConstructorOptions {
@@ -871,8 +871,11 @@ declare class TextDecoder {
871
871
  }
872
872
  declare class TextEncoder {
873
873
  constructor();
874
- encode(input?: string): Uint8Array;
875
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
874
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
875
+ encodeInto(
876
+ input: string,
877
+ buffer: ArrayBuffer | ArrayBufferView
878
+ ): TextEncoderEncodeIntoResult;
876
879
  get encoding(): string;
877
880
  }
878
881
  declare interface TextDecoderConstructorOptions {
@@ -1778,10 +1781,10 @@ declare class URLSearchParams {
1778
1781
  );
1779
1782
  get size(): number;
1780
1783
  append(name: string, value: string): void;
1781
- delete(name: string, value?: string): void;
1784
+ delete(name: string): void;
1782
1785
  get(name: string): string | null;
1783
1786
  getAll(name: string): string[];
1784
- has(name: string, value?: string): boolean;
1787
+ has(name: string): boolean;
1785
1788
  set(name: string, value: string): void;
1786
1789
  sort(): void;
1787
1790
  entries(): IterableIterator<[key: string, value: string]>;
@@ -873,8 +873,11 @@ export declare class TextDecoder {
873
873
  }
874
874
  export declare class TextEncoder {
875
875
  constructor();
876
- encode(input?: string): Uint8Array;
877
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
876
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
877
+ encodeInto(
878
+ input: string,
879
+ buffer: ArrayBuffer | ArrayBufferView
880
+ ): TextEncoderEncodeIntoResult;
878
881
  get encoding(): string;
879
882
  }
880
883
  export interface TextDecoderConstructorOptions {
@@ -1783,10 +1786,10 @@ export declare class URLSearchParams {
1783
1786
  );
1784
1787
  get size(): number;
1785
1788
  append(name: string, value: string): void;
1786
- delete(name: string, value?: string): void;
1789
+ delete(name: string): void;
1787
1790
  get(name: string): string | null;
1788
1791
  getAll(name: string): string[];
1789
- has(name: string, value?: string): boolean;
1792
+ has(name: string): boolean;
1790
1793
  set(name: string, value: string): void;
1791
1794
  sort(): void;
1792
1795
  entries(): IterableIterator<[key: string, value: string]>;
@@ -875,8 +875,11 @@ declare class TextDecoder {
875
875
  }
876
876
  declare class TextEncoder {
877
877
  constructor();
878
- encode(input?: string): Uint8Array;
879
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
878
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
879
+ encodeInto(
880
+ input: string,
881
+ buffer: ArrayBuffer | ArrayBufferView
882
+ ): TextEncoderEncodeIntoResult;
880
883
  get encoding(): string;
881
884
  }
882
885
  declare interface TextDecoderConstructorOptions {
@@ -1781,10 +1784,10 @@ declare class URLSearchParams {
1781
1784
  );
1782
1785
  get size(): number;
1783
1786
  append(name: string, value: string): void;
1784
- delete(name: string, value?: string): void;
1787
+ delete(name: string): void;
1785
1788
  get(name: string): string | null;
1786
1789
  getAll(name: string): string[];
1787
- has(name: string, value?: string): boolean;
1790
+ has(name: string): boolean;
1788
1791
  set(name: string, value: string): void;
1789
1792
  sort(): void;
1790
1793
  entries(): IterableIterator<[key: string, value: string]>;
@@ -877,8 +877,11 @@ export declare class TextDecoder {
877
877
  }
878
878
  export declare class TextEncoder {
879
879
  constructor();
880
- encode(input?: string): Uint8Array;
881
- encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
880
+ encode(input?: string): ArrayBuffer | ArrayBufferView;
881
+ encodeInto(
882
+ input: string,
883
+ buffer: ArrayBuffer | ArrayBufferView
884
+ ): TextEncoderEncodeIntoResult;
882
885
  get encoding(): string;
883
886
  }
884
887
  export interface TextDecoderConstructorOptions {
@@ -1786,10 +1789,10 @@ export declare class URLSearchParams {
1786
1789
  );
1787
1790
  get size(): number;
1788
1791
  append(name: string, value: string): void;
1789
- delete(name: string, value?: string): void;
1792
+ delete(name: string): void;
1790
1793
  get(name: string): string | null;
1791
1794
  getAll(name: string): string[];
1792
- has(name: string, value?: string): boolean;
1795
+ has(name: string): boolean;
1793
1796
  set(name: string, value: string): void;
1794
1797
  sort(): void;
1795
1798
  entries(): IterableIterator<[key: string, value: string]>;