Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Loading.Task

import { Loading } from "https://raw.githubusercontent.com/i-xi-dev/bytes.es/4.4.2/deps.ts"; 

const { Task } = Loading;
abstract

The loading task.

abstract class Task<T> extends EventTarget {
protected constructor(options?: Options);
protected _loaded: SafeInteger;
protected readonly _signal?: AbortSignal;
protected _status: Loading.Status;
get total(): SafeInteger;
get indeterminate(): boolean;
get status(): Status;
get loaded(): SafeInteger;
 
protected _notifyProgress(name: _ProgressEventName): void;
abstract run(): Promise<T>;
}

§Type Parameters

§Extends

§
EventTarget
[src]

§Constructors

§
new Task(options?: Options) protected
[src]
@param options
  • The loading options.

§Properties

§

The read length.

§
_signal: AbortSignal
[src]

The AbortSignal to abort loading.

§

The loading status.

§
total: SafeInteger readonly
[src]

The total length of loading.

§
indeterminate: boolean readonly
[src]

Whether the loading has no computable length.

§
status: Status readonly
[src]

The loading status.

§
loaded: SafeInteger readonly
[src]

The read length.

§Methods

§
_notifyProgress(name: _ProgressEventName): void protected
[src]

Dispatch the ProgressEvent to notify progress.

@param name
  • The name of ProgressEvent.
§
run(): Promise<T> abstract
[src]

Run this loading task.

@return

The Promise that fulfills with a read value.