forked from googleapis/cloud-trace-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
30 lines (29 loc) · 1.13 KB
/
types.d.ts
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
declare namespace NodeJS {
export interface Global {
_google_trace_agent: any;
}
export interface Process {
_preload_modules: string[];
}
export namespace Module {
// According to https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19612,
// NodeModule will be removed in favor of NodeJS.Module.
// Currently, neither depends on the other, though NodeJS.Module's interface is
// a superset of NodeModule.
function _resolveFilename(request: string, parent?: Module | NodeModule): string;
function _load(request: string, parent?: Module | NodeModule, isMain?: boolean): any;
function _resolveLookupPaths(request: string, parent?: Module | NodeModule): string;
}
}
declare module 'require-in-the-middle' {
namespace hook {
type Options = {
internals?: boolean;
};
type OnRequireFn = <T>(exports: T, name: string, basedir?: string) => T;
}
function hook(modules: string[]|null, options: hook.Options|null, onRequire: hook.OnRequireFn): void;
function hook(modules: string[]|null, onRequire: hook.OnRequireFn): void;
function hook(onRequire: hook.OnRequireFn): void;
export = hook;
}