src/vs/workbench/api/common/extHostTypes.ts/es5ClassCompat
function es5ClassCompat(target: Function): any {
	const interceptFunctions = {
		apply: function () {
			const args = arguments.length === 1 ? [] : arguments[1];
			return Reflect.construct(target, args, arguments[0].constructor);
		},
		call: function () {
			if (arguments.length === 0) {
				return Reflect.construct(target, []);
			} else {
				const [thisArg, ...restArgs] = arguments;
				return Reflect.construct(target, restArgs, thisArg.constructor);
			}
		}
	};
	return Object.assign(target, interceptFunctions);
}