blob: e0cb82f34448979503145668073a292192e0eeaa (
plain) (
blame)
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
28
29
30
31
32
|
// Hardcoded module "node:trace_events"
// This is a stub! This is not actually implemented yet.
class Tracing {
enabled = false;
categories = "";
}
function ERR_INVALID_ARG_TYPE(name, type, value) {
const err = new TypeError(`The "${name}" argument must be of type ${type}. Received ${value}`);
err.code = "ERR_INVALID_ARG_TYPE";
return err;
}
function createTracing(opts) {
if (typeof opts !== "object" || opts == null) {
// @ts-ignore
throw new ERR_INVALID_ARG_TYPE("options", "Object", opts);
}
// TODO: validate categories
// @ts-ignore
return new Tracing(opts);
}
function getEnabledCategories() {
return "";
}
export default {
createTracing,
getEnabledCategories,
};
|