remove FakeCommonJSSelf

This commit is contained in:
Johannes Rieken
2019-08-15 16:57:41 +02:00
parent 5e63f6e00f
commit 15496555ea

View File

@@ -108,18 +108,7 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
protected _loadCommonJSModule<T>(module: URI, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
interface FakeCommonJSSelf {
module?: object;
exports?: object;
require?: (module: string) => any;
window?: object;
__dirname: never;
__filename: never;
}
// FAKE commonjs world that only collects exports
const patchSelf: FakeCommonJSSelf = <any>self;
patchSelf.window = self; // <- that's improper but might help extensions that aren't authored correctly
(<any>self).window = self; // <- that's improper but might help extensions that aren't authored correctly
// FAKE require function that only works for the vscode-module
const moduleStack: URI[] = [];