function promiseWithResolver() {
	let resolve, reject;
	const promise = new Promise((res, rej) => {
		resolve = res;
		reject = rej;
	});
	// @ts-ignore
	return { promise, resolve, reject };
}
Polyfill for Promise.withResolver()
@returns { {promise: Promise<string>, resolve: (value: any)=>void, reject: (reason?: any) => void} }