Skip to content

Commit

Permalink
Merge pull request #28 from vidartf/update-api-reports
Browse files Browse the repository at this point in the history
Update API reports
  • Loading branch information
Steven Silvester authored Dec 11, 2019
2 parents 3a68e0a + da92d71 commit 464aac1
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 3 deletions.
1 change: 1 addition & 0 deletions review/api/commands.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export namespace CommandRegistry {
shift: boolean;
}
export function keystrokeForKeydownEvent(event: KeyboardEvent): string;
export function normalizeKeys(options: IKeyBindingOptions): string[];
export function normalizeKeystroke(keystroke: string): string;
export function parseKeystroke(keystroke: string): IKeystrokeParts;
}
Expand Down
40 changes: 37 additions & 3 deletions review/api/coreutils.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,23 @@ export interface JSONArray extends Array<JSONValue> {
export namespace JSONExt {
const emptyObject: ReadonlyJSONObject;
const emptyArray: ReadonlyJSONArray;
export function deepCopy<T extends ReadonlyJSONValue>(value: T): T;
export function deepEqual(first: ReadonlyJSONValue, second: ReadonlyJSONValue): boolean;
export function deepCopy<T extends ReadonlyPartialJSONValue>(value: T): T;
export function deepEqual(first: ReadonlyPartialJSONValue, second: ReadonlyPartialJSONValue): boolean;
export function isArray(value: JSONValue): value is JSONArray;
// (undocumented)
export function isArray(value: ReadonlyJSONValue): value is ReadonlyJSONArray;
// (undocumented)
export function isArray(value: PartialJSONValue): value is PartialJSONArray;
// (undocumented)
export function isArray(value: ReadonlyPartialJSONValue): value is ReadonlyPartialJSONArray;
export function isObject(value: JSONValue): value is JSONObject;
// (undocumented)
export function isObject(value: ReadonlyJSONValue): value is ReadonlyJSONObject;
export function isPrimitive(value: ReadonlyJSONValue): value is JSONPrimitive;
// (undocumented)
export function isObject(value: PartialJSONValue): value is PartialJSONObject;
// (undocumented)
export function isObject(value: ReadonlyPartialJSONValue): value is ReadonlyPartialJSONObject;
export function isPrimitive(value: ReadonlyPartialJSONValue): value is JSONPrimitive;
}

// @public
Expand All @@ -45,6 +53,19 @@ export class MimeData {
types(): string[];
}

// @public
export interface PartialJSONArray extends Array<PartialJSONValue> {
}

// @public
export interface PartialJSONObject {
// (undocumented)
[key: string]: PartialJSONValue | undefined;
}

// @public
export type PartialJSONValue = JSONPrimitive | PartialJSONObject | PartialJSONArray;

// @public
export class PromiseDelegate<T> {
constructor();
Expand All @@ -71,6 +92,19 @@ export interface ReadonlyJSONObject {
// @public
export type ReadonlyJSONValue = JSONPrimitive | ReadonlyJSONObject | ReadonlyJSONArray;

// @public
export interface ReadonlyPartialJSONArray extends ReadonlyArray<ReadonlyPartialJSONValue> {
}

// @public
export interface ReadonlyPartialJSONObject {
// (undocumented)
readonly [key: string]: ReadonlyPartialJSONValue | undefined;
}

// @public
export type ReadonlyPartialJSONValue = JSONPrimitive | ReadonlyPartialJSONObject | ReadonlyPartialJSONArray;

// @public
export class Token<T> {
constructor(name: string);
Expand Down
107 changes: 107 additions & 0 deletions review/api/polling.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
## API Report File for "@lumino/polling"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

import { IDisposable } from '@lumino/disposable';
import { IObservableDisposable } from '@lumino/disposable';
import { ISignal } from '@lumino/signaling';
import { PromiseDelegate } from '@lumino/coreutils';

// @public
export class Debouncer<T = any, U = any> extends RateLimiter<T, U> {
invoke(): Promise<T>;
}

// @public
export interface IPoll<T, U, V extends string> {
readonly disposed: ISignal<this, void>;
readonly frequency: IPoll.Frequency;
readonly isDisposed: boolean;
readonly name: string;
readonly state: IPoll.State<T, U, V>;
readonly tick: Promise<IPoll<T, U, V>>;
readonly ticked: ISignal<IPoll<T, U, V>, IPoll.State<T, U, V>>;
}

// @public
export namespace IPoll {
export type Frequency = {
readonly backoff: boolean | number;
readonly interval: number;
readonly max: number;
};
export type Phase<T extends string> = T | 'constructed' | 'disposed' | 'reconnected' | 'refreshed' | 'rejected' | 'resolved' | 'standby' | 'started' | 'stopped';
export type State<T, U, V extends string> = {
readonly interval: number;
readonly payload: T | U | null;
readonly phase: Phase<V>;
readonly timestamp: number;
};
}

// @public
export interface IRateLimiter<T = any, U = any> extends IDisposable {
invoke(): Promise<T>;
readonly limit: number;
stop(): Promise<void>;
}

// @public
export class Poll<T = any, U = any, V extends string = 'standby'> implements IObservableDisposable, IPoll<T, U, V> {
constructor(options: Poll.IOptions<T, U, V>);
dispose(): void;
readonly disposed: ISignal<this, void>;
frequency: IPoll.Frequency;
readonly isDisposed: boolean;
readonly name: string;
refresh(): Promise<void>;
schedule(next?: Partial<IPoll.State<T, U, V> & {
cancel: (last: IPoll.State<T, U, V>) => boolean;
}>): Promise<void>;
standby: Poll.Standby | (() => boolean | Poll.Standby);
start(): Promise<void>;
readonly state: IPoll.State<T, U, V>;
stop(): Promise<void>;
readonly tick: Promise<this>;
readonly ticked: ISignal<this, IPoll.State<T, U, V>>;
}

// @public
export namespace Poll {
export type Factory<T, U, V extends string> = (state: IPoll.State<T, U, V>) => Promise<T>;
export interface IOptions<T, U, V extends string> {
auto?: boolean;
factory: Factory<T, U, V>;
frequency?: Partial<IPoll.Frequency>;
name?: string;
standby?: Standby | (() => boolean | Standby);
}
export type Standby = 'never' | 'when-hidden';
const IMMEDIATE = 0;
const MAX_INTERVAL = 2147483647;
const NEVER: number;
}

// @public
export abstract class RateLimiter<T, U> implements IRateLimiter<T, U> {
constructor(fn: () => T | Promise<T>, limit?: number);
dispose(): void;
abstract invoke(): Promise<T>;
readonly isDisposed: boolean;
readonly limit: number;
protected payload: PromiseDelegate<T> | null;
protected poll: Poll<T, U, 'invoked'>;
stop(): Promise<void>;
}

// @public
export class Throttler<T = any, U = any> extends RateLimiter<T, U> {
invoke(): Promise<T>;
}


// (No @packageDocumentation comment for this package)

```
2 changes: 2 additions & 0 deletions review/api/widgets.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ export class DockPanel extends Widget {
selectWidget(widget: Widget): void;
spacing: number;
tabBars(): IIterator<TabBar<Widget>>;
tabsMovable: boolean;
widgets(): IIterator<Widget>;
}

Expand All @@ -375,6 +376,7 @@ export namespace DockPanel {
overlay?: IOverlay;
renderer?: IRenderer;
spacing?: number;
tabsMovable?: boolean;
}
export interface IOverlay {
hide(delay: number): void;
Expand Down

0 comments on commit 464aac1

Please sign in to comment.