From da92d710bc4e7c3798b3e87bf4966bd6ad6f5e36 Mon Sep 17 00:00:00 2001 From: Vidar Tonaas Fauske Date: Wed, 11 Dec 2019 14:43:41 +0000 Subject: [PATCH] Update API reports --- review/api/commands.api.md | 1 + review/api/coreutils.api.md | 40 +++++++++++++- review/api/polling.api.md | 107 ++++++++++++++++++++++++++++++++++++ review/api/widgets.api.md | 2 + 4 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 review/api/polling.api.md diff --git a/review/api/commands.api.md b/review/api/commands.api.md index ae234fa89..7ace453b0 100644 --- a/review/api/commands.api.md +++ b/review/api/commands.api.md @@ -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; } diff --git a/review/api/coreutils.api.md b/review/api/coreutils.api.md index f4d997885..77e6180d2 100644 --- a/review/api/coreutils.api.md +++ b/review/api/coreutils.api.md @@ -12,15 +12,23 @@ export interface JSONArray extends Array { export namespace JSONExt { const emptyObject: ReadonlyJSONObject; const emptyArray: ReadonlyJSONArray; - export function deepCopy(value: T): T; - export function deepEqual(first: ReadonlyJSONValue, second: ReadonlyJSONValue): boolean; + export function deepCopy(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 @@ -45,6 +53,19 @@ export class MimeData { types(): string[]; } +// @public +export interface PartialJSONArray extends Array { +} + +// @public +export interface PartialJSONObject { + // (undocumented) + [key: string]: PartialJSONValue | undefined; +} + +// @public +export type PartialJSONValue = JSONPrimitive | PartialJSONObject | PartialJSONArray; + // @public export class PromiseDelegate { constructor(); @@ -71,6 +92,19 @@ export interface ReadonlyJSONObject { // @public export type ReadonlyJSONValue = JSONPrimitive | ReadonlyJSONObject | ReadonlyJSONArray; +// @public +export interface ReadonlyPartialJSONArray extends ReadonlyArray { +} + +// @public +export interface ReadonlyPartialJSONObject { + // (undocumented) + readonly [key: string]: ReadonlyPartialJSONValue | undefined; +} + +// @public +export type ReadonlyPartialJSONValue = JSONPrimitive | ReadonlyPartialJSONObject | ReadonlyPartialJSONArray; + // @public export class Token { constructor(name: string); diff --git a/review/api/polling.api.md b/review/api/polling.api.md new file mode 100644 index 000000000..e57e2526e --- /dev/null +++ b/review/api/polling.api.md @@ -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 extends RateLimiter { + invoke(): Promise; +} + +// @public +export interface IPoll { + readonly disposed: ISignal; + readonly frequency: IPoll.Frequency; + readonly isDisposed: boolean; + readonly name: string; + readonly state: IPoll.State; + readonly tick: Promise>; + readonly ticked: ISignal, IPoll.State>; +} + +// @public +export namespace IPoll { + export type Frequency = { + readonly backoff: boolean | number; + readonly interval: number; + readonly max: number; + }; + export type Phase = T | 'constructed' | 'disposed' | 'reconnected' | 'refreshed' | 'rejected' | 'resolved' | 'standby' | 'started' | 'stopped'; + export type State = { + readonly interval: number; + readonly payload: T | U | null; + readonly phase: Phase; + readonly timestamp: number; + }; +} + +// @public +export interface IRateLimiter extends IDisposable { + invoke(): Promise; + readonly limit: number; + stop(): Promise; +} + +// @public +export class Poll implements IObservableDisposable, IPoll { + constructor(options: Poll.IOptions); + dispose(): void; + readonly disposed: ISignal; + frequency: IPoll.Frequency; + readonly isDisposed: boolean; + readonly name: string; + refresh(): Promise; + schedule(next?: Partial & { + cancel: (last: IPoll.State) => boolean; + }>): Promise; + standby: Poll.Standby | (() => boolean | Poll.Standby); + start(): Promise; + readonly state: IPoll.State; + stop(): Promise; + readonly tick: Promise; + readonly ticked: ISignal>; + } + +// @public +export namespace Poll { + export type Factory = (state: IPoll.State) => Promise; + export interface IOptions { + auto?: boolean; + factory: Factory; + frequency?: Partial; + 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 implements IRateLimiter { + constructor(fn: () => T | Promise, limit?: number); + dispose(): void; + abstract invoke(): Promise; + readonly isDisposed: boolean; + readonly limit: number; + protected payload: PromiseDelegate | null; + protected poll: Poll; + stop(): Promise; +} + +// @public +export class Throttler extends RateLimiter { + invoke(): Promise; +} + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/review/api/widgets.api.md b/review/api/widgets.api.md index d25d06f0e..da5c9d8c9 100644 --- a/review/api/widgets.api.md +++ b/review/api/widgets.api.md @@ -355,6 +355,7 @@ export class DockPanel extends Widget { selectWidget(widget: Widget): void; spacing: number; tabBars(): IIterator>; + tabsMovable: boolean; widgets(): IIterator; } @@ -375,6 +376,7 @@ export namespace DockPanel { overlay?: IOverlay; renderer?: IRenderer; spacing?: number; + tabsMovable?: boolean; } export interface IOverlay { hide(delay: number): void;