1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
ash / webui / common / resources / cr.m.d.ts [blame]
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Note: TypeScript UIs should generally use cr.ts directly, and not rely on
// these definitions. These are checked in so that UIs in transition can keep
// relying on cr.m.js.
/* eslint-disable @typescript-eslint/naming-convention */
export function webUIResponse(
id: string, isSuccess: boolean, response: any): void;
export function sendWithPromise(
methodName: string, ...varArgs: any[]): Promise<any>;
export function webUIListenerCallback(event: string, ..._varArgs: any[]): void;
export interface WebUIListener {
eventName: string;
uid: number;
}
export function addWebUIListener(
eventName: string, callback: Function): WebUIListener;
export function removeWebUIListener(listener: WebUIListener): boolean;