| 1 |
## API Report File for "@lumino/coreutils" |
| 2 |
|
| 3 |
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). |
| 4 |
|
| 5 |
```ts |
| 6 |
|
| 7 |
// @public |
| 8 |
export interface IPlugin<T, U> { |
| 9 |
activate: (app: T, ...args: any[]) => U | Promise<U>; |
| 10 |
autoStart?: boolean | 'defer'; |
| 11 |
deactivate?: ((app: T, ...args: any[]) => void | Promise<void>) | null; |
| 12 |
description?: string; |
| 13 |
id: string; |
| 14 |
optional?: Token<any>[]; |
| 15 |
provides?: Token<U> | null; |
| 16 |
requires?: Token<any>[]; |
| 17 |
} |
| 18 |
|
| 19 |
// @public |
| 20 |
export interface JSONArray extends Array<JSONValue> { |
| 21 |
} |
| 22 |
|
| 23 |
// @public |
| 24 |
export namespace JSONExt { |
| 25 |
const emptyObject: ReadonlyJSONObject; |
| 26 |
const emptyArray: ReadonlyJSONArray; |
| 27 |
export function deepCopy<T extends ReadonlyPartialJSONValue>(value: T): T; |
| 28 |
export function deepEqual(first: ReadonlyPartialJSONValue, second: ReadonlyPartialJSONValue): boolean; |
| 29 |
export function isArray(value: JSONValue): value is JSONArray; |
| 30 |
// (undocumented) |
| 31 |
export function isArray(value: ReadonlyJSONValue): value is ReadonlyJSONArray; |
| 32 |
// (undocumented) |
| 33 |
export function isArray(value: PartialJSONValue): value is PartialJSONArray; |
| 34 |
// (undocumented) |
| 35 |
export function isArray(value: ReadonlyPartialJSONValue): value is ReadonlyPartialJSONArray; |
| 36 |
export function isObject(value: JSONValue): value is JSONObject; |
| 37 |
// (undocumented) |
| 38 |
export function isObject(value: ReadonlyJSONValue): value is ReadonlyJSONObject; |
| 39 |
// (undocumented) |
| 40 |
export function isObject(value: PartialJSONValue): value is PartialJSONObject; |
| 41 |
// (undocumented) |
| 42 |
export function isObject(value: ReadonlyPartialJSONValue): value is ReadonlyPartialJSONObject; |
| 43 |
export function isPrimitive(value: ReadonlyPartialJSONValue): value is JSONPrimitive; |
| 44 |
} |
| 45 |
|
| 46 |
// @public |
| 47 |
export interface JSONObject { |
| 48 |
// (undocumented) |
| 49 |
[key: string]: JSONValue; |
| 50 |
} |
| 51 |
|
| 52 |
// @public |
| 53 |
export type JSONPrimitive = boolean | number | string | null; |
| 54 |
|
| 55 |
// @public |
| 56 |
export type JSONValue = JSONPrimitive | JSONObject | JSONArray; |
| 57 |
|
| 58 |
// @public |
| 59 |
export class MimeData { |
| 60 |
clear(): void; |
| 61 |
clearData(mime: string): void; |
| 62 |
getData(mime: string): any | undefined; |
| 63 |
hasData(mime: string): boolean; |
| 64 |
setData(mime: string, data: unknown): void; |
| 65 |
types(): string[]; |
| 66 |
} |
| 67 |
|
| 68 |
// @public |
| 69 |
export interface PartialJSONArray extends Array<PartialJSONValue> { |
| 70 |
} |
| 71 |
|
| 72 |
// @public |
| 73 |
export interface PartialJSONObject { |
| 74 |
// (undocumented) |
| 75 |
[key: string]: PartialJSONValue | undefined; |
| 76 |
} |
| 77 |
|
| 78 |
// @public |
| 79 |
export type PartialJSONValue = JSONPrimitive | PartialJSONObject | PartialJSONArray; |
| 80 |
|
| 81 |
// @public |
| 82 |
export class PluginRegistry<T = any> { |
| 83 |
constructor(options?: PluginRegistry.IOptions); |
| 84 |
activatePlugin(id: string): Promise<void>; |
| 85 |
activatePlugins(kind: 'startUp' | 'defer', options?: PluginRegistry.IStartOptions): Promise<void>; |
| 86 |
get application(): T; |
| 87 |
set application(v: T); |
| 88 |
deactivatePlugin(id: string): Promise<string[]>; |
| 89 |
get deferredPlugins(): string[]; |
| 90 |
deregisterPlugin(id: string, force?: boolean): void; |
| 91 |
getPluginDescription(id: string): string; |
| 92 |
hasPlugin(id: string): boolean; |
| 93 |
isPluginActivated(id: string): boolean; |
| 94 |
listPlugins(): string[]; |
| 95 |
registerPlugin(plugin: IPlugin<T, any>): void; |
| 96 |
registerPlugins(plugins: IPlugin<T, any>[]): void; |
| 97 |
resolveOptionalService<U>(token: Token<U>): Promise<U | null>; |
| 98 |
resolveRequiredService<U>(token: Token<U>): Promise<U>; |
| 99 |
} |
| 100 |
|
| 101 |
// @public |
| 102 |
export namespace PluginRegistry { |
| 103 |
export interface IOptions { |
| 104 |
validatePlugin?: (plugin: IPlugin<any, any>) => boolean; |
| 105 |
} |
| 106 |
export interface IStartOptions { |
| 107 |
ignorePlugins?: string[]; |
| 108 |
startPlugins?: string[]; |
| 109 |
} |
| 110 |
} |
| 111 |
|
| 112 |
// @public |
| 113 |
export class PromiseDelegate<T> { |
| 114 |
constructor(); |
| 115 |
readonly promise: Promise<T>; |
| 116 |
reject(reason: unknown): void; |
| 117 |
resolve(value: T | PromiseLike<T>): void; |
| 118 |
} |
| 119 |
|
| 120 |
// @public |
| 121 |
export namespace Random { |
| 122 |
const // Warning: (ae-forgotten-export) The symbol "fallbackRandomValues" needs to be exported by the entry point index.d.ts |
| 123 |
getRandomValues: typeof fallbackRandomValues; |
| 124 |
} |
| 125 |
|
| 126 |
// @public |
| 127 |
export interface ReadonlyJSONArray extends ReadonlyArray<ReadonlyJSONValue> { |
| 128 |
} |
| 129 |
|
| 130 |
// @public |
| 131 |
export interface ReadonlyJSONObject { |
| 132 |
// (undocumented) |
| 133 |
readonly [key: string]: ReadonlyJSONValue; |
| 134 |
} |
| 135 |
|
| 136 |
// @public |
| 137 |
export type ReadonlyJSONValue = JSONPrimitive | ReadonlyJSONObject | ReadonlyJSONArray; |
| 138 |
|
| 139 |
// @public |
| 140 |
export interface ReadonlyPartialJSONArray extends ReadonlyArray<ReadonlyPartialJSONValue> { |
| 141 |
} |
| 142 |
|
| 143 |
// @public |
| 144 |
export interface ReadonlyPartialJSONObject { |
| 145 |
// (undocumented) |
| 146 |
readonly [key: string]: ReadonlyPartialJSONValue | undefined; |
| 147 |
} |
| 148 |
|
| 149 |
// @public |
| 150 |
export type ReadonlyPartialJSONValue = JSONPrimitive | ReadonlyPartialJSONObject | ReadonlyPartialJSONArray; |
| 151 |
|
| 152 |
// @public |
| 153 |
export class Token<T> { |
| 154 |
constructor(name: string, description?: string); |
| 155 |
readonly description?: string; |
| 156 |
readonly name: string; |
| 157 |
} |
| 158 |
|
| 159 |
// @public |
| 160 |
export namespace UUID { |
| 161 |
const uuid4: () => string; |
| 162 |
} |
| 163 |
|
| 164 |
``` |