mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
Bug 1667061 - Format the perf.d.ts file. r=gregtatum
My editor formats this file automatically when I need to change something here, and it's annoying to exclude these when I need to change something in this file. I guess it doesn't hurt to format it so we won't have to do that again. Differential Revision: https://phabricator.services.mozilla.com/D91266
This commit is contained in:
parent
199f6ebb12
commit
349951062c
82
devtools/client/performance-new/@types/perf.d.ts
vendored
82
devtools/client/performance-new/@types/perf.d.ts
vendored
@ -50,17 +50,22 @@ type MaybePromise<T> = Promise<T> | T;
|
||||
* ActorReadyGeckoProfilerInterface and the PerfFront return promises.
|
||||
*/
|
||||
export interface PerfFront {
|
||||
startProfiler: (options: RecordingStateFromPreferences) => MaybePromise<boolean>;
|
||||
startProfiler: (
|
||||
options: RecordingStateFromPreferences
|
||||
) => MaybePromise<boolean>;
|
||||
getProfileAndStopProfiler: () => Promise<any>;
|
||||
stopProfilerAndDiscardProfile: () => MaybePromise<void>;
|
||||
getSymbolTable: (path: string, breakpadId: string) => Promise<[number[], number[], number[]]>;
|
||||
getSymbolTable: (
|
||||
path: string,
|
||||
breakpadId: string
|
||||
) => Promise<[number[], number[], number[]]>;
|
||||
isActive: () => MaybePromise<boolean>;
|
||||
isSupportedPlatform: () => MaybePromise<boolean>;
|
||||
isLockedForPrivateBrowsing: () => MaybePromise<boolean>;
|
||||
on: (type: string, listener: () => void) => void;
|
||||
off: (type: string, listener: () => void) => void;
|
||||
destroy: () => void,
|
||||
getSupportedFeatures: () => MaybePromise<string[]>
|
||||
destroy: () => void;
|
||||
getSupportedFeatures: () => MaybePromise<string[]>;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -113,7 +118,7 @@ export interface State {
|
||||
objdirs: string[];
|
||||
presetName: string;
|
||||
initializedValues: InitializedValues | null;
|
||||
promptEnvRestart: null | string
|
||||
promptEnvRestart: null | string;
|
||||
}
|
||||
|
||||
export type Selector<T> = (state: State) => T;
|
||||
@ -152,7 +157,7 @@ export interface Library {
|
||||
* reason to maintain a full type definition here.
|
||||
*/
|
||||
export interface MinimallyTypedGeckoProfile {
|
||||
libs: Array<{ debugName: string, breakpadId: string }>;
|
||||
libs: Array<{ debugName: string; breakpadId: string }>;
|
||||
processes: Array<MinimallyTypedGeckoProfile>;
|
||||
}
|
||||
|
||||
@ -166,14 +171,18 @@ export type ReceiveProfile = (
|
||||
getSymbolTableCallback: GetSymbolTableCallback
|
||||
) => void;
|
||||
|
||||
export type SetRecordingPreferences = (settings: RecordingStateFromPreferences) => void;
|
||||
export type SetRecordingPreferences = (
|
||||
settings: RecordingStateFromPreferences
|
||||
) => void;
|
||||
|
||||
/**
|
||||
* This is the type signature for a function to restart the browser with a given
|
||||
* environment variable. Currently only implemented for the popup.
|
||||
*/
|
||||
export type RestartBrowserWithEnvironmentVariable =
|
||||
(envName: string, value: string) => void;
|
||||
export type RestartBrowserWithEnvironmentVariable = (
|
||||
envName: string,
|
||||
value: string
|
||||
) => void;
|
||||
|
||||
/**
|
||||
* This is the type signature for a function to query the browser for an
|
||||
@ -223,14 +232,16 @@ export interface InitializedValues {
|
||||
// Determine the current page context.
|
||||
pageContext: PageContext;
|
||||
// The popup and devtools panel use different codepaths for getting symbol tables.
|
||||
getSymbolTableGetter: (profile: MinimallyTypedGeckoProfile) => GetSymbolTableCallback;
|
||||
getSymbolTableGetter: (
|
||||
profile: MinimallyTypedGeckoProfile
|
||||
) => GetSymbolTableCallback;
|
||||
// The list of profiler features that the current target supports.
|
||||
supportedFeatures: string[]
|
||||
supportedFeatures: string[];
|
||||
// Allow different devtools contexts to open about:profiling with different methods.
|
||||
// e.g. via a new tab, or page navigation.
|
||||
openAboutProfiling?: () => void,
|
||||
openAboutProfiling?: () => void;
|
||||
// Allow about:profiling to switch back to the remote devtools panel.
|
||||
openRemoteDevTools?: () => void,
|
||||
openRemoteDevTools?: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -261,7 +272,7 @@ export type Action =
|
||||
| {
|
||||
type: "CHANGE_FEATURES";
|
||||
features: string[];
|
||||
promptEnvRestart: string | null
|
||||
promptEnvRestart: string | null;
|
||||
}
|
||||
| {
|
||||
type: "CHANGE_THREADS";
|
||||
@ -278,10 +289,12 @@ export type Action =
|
||||
setRecordingPreferences: SetRecordingPreferences;
|
||||
presets: Presets;
|
||||
pageContext: PageContext;
|
||||
openAboutProfiling?: () => void,
|
||||
openRemoteDevTools?: () => void,
|
||||
openAboutProfiling?: () => void;
|
||||
openRemoteDevTools?: () => void;
|
||||
recordingSettingsFromPreferences: RecordingStateFromPreferences;
|
||||
getSymbolTableGetter: (profile: MinimallyTypedGeckoProfile) => GetSymbolTableCallback;
|
||||
getSymbolTableGetter: (
|
||||
profile: MinimallyTypedGeckoProfile
|
||||
) => GetSymbolTableCallback;
|
||||
supportedFeatures: string[];
|
||||
}
|
||||
| {
|
||||
@ -298,7 +311,9 @@ export interface InitializeStoreValues {
|
||||
pageContext: PageContext;
|
||||
recordingPreferences: RecordingStateFromPreferences;
|
||||
supportedFeatures: string[];
|
||||
getSymbolTableGetter: (profile: MinimallyTypedGeckoProfile) => GetSymbolTableCallback;
|
||||
getSymbolTableGetter: (
|
||||
profile: MinimallyTypedGeckoProfile
|
||||
) => GetSymbolTableCallback;
|
||||
openAboutProfiling?: () => void;
|
||||
openRemoteDevTools?: () => void;
|
||||
}
|
||||
@ -406,9 +421,9 @@ export type NumberScaler = (value: number) => number;
|
||||
* A collection of functions to scale numbers.
|
||||
*/
|
||||
export interface ScaleFunctions {
|
||||
fromFractionToValue: NumberScaler,
|
||||
fromValueToFraction: NumberScaler,
|
||||
fromFractionToSingleDigitValue: NumberScaler,
|
||||
fromFractionToValue: NumberScaler;
|
||||
fromValueToFraction: NumberScaler;
|
||||
fromFractionToSingleDigitValue: NumberScaler;
|
||||
}
|
||||
|
||||
export interface PresetDefinition {
|
||||
@ -444,7 +459,7 @@ export type MessageToFrontend =
|
||||
| {
|
||||
type: "ENABLE_MENU_BUTTON_DONE";
|
||||
requestId: number;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* This represents an event channel that can talk to a content page on the web.
|
||||
@ -456,9 +471,16 @@ export type MessageToFrontend =
|
||||
*/
|
||||
export class ProfilerWebChannel {
|
||||
constructor(id: string, url: MockedExports.nsIURI);
|
||||
send: (message: MessageToFrontend, target: MockedExports.WebChannelTarget) => void;
|
||||
send: (
|
||||
message: MessageToFrontend,
|
||||
target: MockedExports.WebChannelTarget
|
||||
) => void;
|
||||
listen: (
|
||||
handler: (idle: string, message: MessageFromFrontend, target: MockedExports.WebChannelTarget) => void
|
||||
handler: (
|
||||
idle: string,
|
||||
message: MessageFromFrontend,
|
||||
target: MockedExports.WebChannelTarget
|
||||
) => void
|
||||
) => void;
|
||||
}
|
||||
|
||||
@ -468,16 +490,16 @@ export class ProfilerWebChannel {
|
||||
*/
|
||||
export interface FeatureDescription {
|
||||
// The name of the feature as shown in the UI.
|
||||
name: string,
|
||||
name: string;
|
||||
// The key value of the feature, this will be stored in prefs, and used in the
|
||||
// nsiProfiler interface.
|
||||
value: string,
|
||||
value: string;
|
||||
// The full description of the preset, this will need to be localized.
|
||||
title: string,
|
||||
title: string;
|
||||
// This will give the user a hint that it's recommended on.
|
||||
recommended?: boolean,
|
||||
recommended?: boolean;
|
||||
// This will give the user a hint that it's an experimental feature.
|
||||
experimental?: boolean,
|
||||
experimental?: boolean;
|
||||
// This will give a reason if the feature is disabled.
|
||||
disabledReason?: string,
|
||||
disabledReason?: string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user