In a file named 'some-file.ts' I want to do this:
global.someProp = someVar;
while global
is a predefined object of type NodeJS.Global
which is defined in node.d.ts.
How can I make this interface partial?
I've tried all of the following to no avail:
interface Global {
someProp: string;
}
global.someProp = someVar;
interface NodeJS.Global {
someProp: string;
}
global.someProp = someVar;
namespace NodeJS{
interface Global {
someProp: string;
}
}
global.someProp = someVar;
I keep getting:
TS339: Property 'someProp' does not exist on type 'Global'
How can I fix it?