-
-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathscripting.d.ts
More file actions
21 lines (19 loc) · 752 Bytes
/
scripting.d.ts
File metadata and controls
21 lines (19 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import type { Context } from './types/core/engine/context.js';
import type { Commands } from './types/core/engine/commands.js';
export { Context as BrowsertimeContext } from './types/core/engine/context.js';
export { Commands as BrowsertimeCommands } from './types/core/engine/commands.js';
/**
* Signature of a Browsertime user script. Annotate the default export of
* your script with this type to get full IntelliSense on `context` and
* `commands`.
*
* @example
* /** @type {import('browsertime').BrowsertimeScript} *\/
* export default async function (context, commands) {
* await commands.measure.start('https://example.org');
* }
*/
export type BrowsertimeScript = (
context: Context,
commands: Commands
) => Promise<unknown>;