Skip to content

Commit

Permalink
Updated Bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Redfire75369 committed Aug 11, 2024
1 parent af697ed commit 4e8425f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bindings/globals/flow/clone.js.flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// @flow

declare type Transferable = ArrayBuffer;

declare interface StructuredSerializeOptions {
transfer?: Transferable[]
}

declare function structuredClone<T>(value: T, options?: StructuredSerializeOptions): T;
2 changes: 2 additions & 0 deletions bindings/globals/flow/file.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ declare class Blob {
text(): Promise<string>;

arrayBuffer(): Promise<ArrayBuffer>;

bytes(): Promise<Uint8Array>;
}

declare interface FileOptions extends BlobOptions {
Expand Down
4 changes: 4 additions & 0 deletions bindings/globals/flow/url.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ declare class URL {
constructor(url: string, base?: string): URL;

static canParse(url: string, base?: string): boolean;
static parse(url: string, base?: string): URL | null;

static createObjectURL(object: Blob): string;
static revokeObjectURL(url: string): void;

get href(): string;
set href(href: string): void;
Expand Down
7 changes: 7 additions & 0 deletions bindings/globals/typescript/clone.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare type Transferable = ArrayBuffer;

declare interface StructuredSerializeOptions {
transfer?: Transferable[]
}

declare function structuredClone<T>(value: T, options?: StructuredSerializeOptions): T;
2 changes: 2 additions & 0 deletions bindings/globals/typescript/file.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ declare class Blob {
text(): Promise<string>;

arrayBuffer(): Promise<ArrayBuffer>;

bytes(): Promise<Uint8Array>;
}

declare interface FileOptions extends BlobOptions {
Expand Down
6 changes: 6 additions & 0 deletions bindings/globals/typescript/url.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ declare class URL {

static canParse(url: string, base?: string): boolean;

static parse(url: string, base?: string): URL | null

static createObjectURL(object: Blob): string;

static revokeObjectURL(url: string): void;

toString(): string;

toJSON(): string;
Expand Down

0 comments on commit 4e8425f

Please # to comment.