mirror of
https://github.com/denoland/deno.git
synced 2025-03-09 21:57:40 -04:00
adding explanations to interfaces and functions that dont have them
This commit is contained in:
parent
1e8a6b94b1
commit
f445244d5f
4 changed files with 77 additions and 43 deletions
22
ext/cache/lib.deno_cache.d.ts
vendored
22
ext/cache/lib.deno_cache.d.ts
vendored
|
@ -5,10 +5,21 @@
|
|||
/// <reference no-default-lib="true" />
|
||||
/// <reference lib="esnext" />
|
||||
|
||||
/** @category Cache */
|
||||
/** Returns the CacheStorage object
|
||||
* associated with the current context.
|
||||
*
|
||||
* @category Cache
|
||||
*/
|
||||
declare var caches: CacheStorage;
|
||||
|
||||
/** @category Cache */
|
||||
/** Represents the storage for Cache objects.
|
||||
* The interface maintains a mapping of string names to corresponding
|
||||
* Cache *objects.
|
||||
*
|
||||
* Use CacheStorage.open() to obtain a Cache instance.
|
||||
*
|
||||
* @category Cache
|
||||
*/
|
||||
declare interface CacheStorage {
|
||||
/** Open a cache storage for the provided name. */
|
||||
open(cacheName: string): Promise<Cache>;
|
||||
|
@ -18,7 +29,12 @@ declare interface CacheStorage {
|
|||
delete(cacheName: string): Promise<boolean>;
|
||||
}
|
||||
|
||||
/** @category Cache */
|
||||
/**
|
||||
* Provides a persistent storage mechanism for Request / Response object pairs
|
||||
* that are cached in long lived memory.
|
||||
*
|
||||
* @category Cache
|
||||
*/
|
||||
declare interface Cache {
|
||||
/**
|
||||
* Put the provided request/response into the cache.
|
||||
|
|
6
ext/console/lib.deno_console.d.ts
vendored
6
ext/console/lib.deno_console.d.ts
vendored
|
@ -5,7 +5,11 @@
|
|||
/// <reference no-default-lib="true" />
|
||||
/// <reference lib="esnext" />
|
||||
|
||||
/** @category I/O */
|
||||
/** Provides access to the debugging console.
|
||||
* The specific set of available methods are determined by the environment in
|
||||
* which the script is running.
|
||||
*
|
||||
* @category I/O */
|
||||
declare interface Console {
|
||||
assert(condition?: boolean, ...data: any[]): void;
|
||||
clear(): void;
|
||||
|
|
8
ext/url/lib.deno_url.d.ts
vendored
8
ext/url/lib.deno_url.d.ts
vendored
|
@ -5,7 +5,13 @@
|
|||
/// <reference no-default-lib="true" />
|
||||
/// <reference lib="esnext" />
|
||||
|
||||
/** @category URL */
|
||||
/** Defines utility methods to work with the
|
||||
* query string of a URL. An object implementing URLSearchParams can directly
|
||||
* be used in a `for...of` structure to iterate over key/value pairs in the
|
||||
* same order as they appear in the query string
|
||||
*
|
||||
* @category URL
|
||||
*/
|
||||
declare interface URLSearchParams {
|
||||
/** Appends a specified key/value pair as a new search parameter.
|
||||
*
|
||||
|
|
14
ext/web/lib.deno_web.d.ts
vendored
14
ext/web/lib.deno_web.d.ts
vendored
|
@ -68,7 +68,10 @@ declare var DOMException: {
|
|||
readonly DATA_CLONE_ERR: 25;
|
||||
};
|
||||
|
||||
/** @category Events */
|
||||
/** Specifies the options that can be passed to the constructor of an `Event`
|
||||
* object. The EventInit interface defines three optional properties: `bubbles`, `cancelable`, and `composed`.
|
||||
*
|
||||
* @category Events */
|
||||
declare interface EventInit {
|
||||
bubbles?: boolean;
|
||||
cancelable?: boolean;
|
||||
|
@ -208,12 +211,17 @@ declare var EventTarget: {
|
|||
new(): EventTarget;
|
||||
};
|
||||
|
||||
/** @category Events */
|
||||
/** Represents a function type that can be used as an event listener in various
|
||||
* contexts. Functions matching this type must accept a single parameter, `evt`.
|
||||
*
|
||||
* @category Events */
|
||||
declare interface EventListener {
|
||||
(evt: Event): void | Promise<void>;
|
||||
}
|
||||
|
||||
/** @category Events */
|
||||
/** EventListenerObject interface defines objects that can handle events
|
||||
*
|
||||
* @category Events */
|
||||
declare interface EventListenerObject {
|
||||
handleEvent(evt: Event): void | Promise<void>;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue