This commit is contained in:
Dmitry Vasilev
2023-01-15 20:38:44 +08:00
parent 1aff130785
commit 659f5c11cd
2 changed files with 1 additions and 45 deletions

3
src/effects.js vendored
View File

@@ -128,8 +128,7 @@ export const render_initial_state = (ui, state) => {
ui.editor.switch_session(state.current_module)
}
// TODO remove async
export const render_common_side_effects = async (prev, next, command, ui) => {
export const render_common_side_effects = (prev, next, command, ui) => {
if(
prev.project_dir != next.project_dir
||

43
x.js
View File

@@ -1,43 +0,0 @@
const delay = () => new Promise(resolve => {
setTimeout(resolve, 1000)
})
await [1,2,3,4,5].reduce(
async (acc, x) => {
console.log('wait')
await acc
await delay()
console.log('wait finish')
},
Promise.resolve(),
)
/*
await delay
console.log('x')
export const x = 1
*/
/*
const p = {then: y => y(3)}
async function test() {
return await p
}
*/
// TODO remove
//const x = new Promise((resolve, reject) => resolve(10))
//const x = Promise.reject(10)
//const x = Promise.resolve(10)
//console.log('x', x.status)
//x.catch(e => {
// console.log('x', x.status)
//})
//const x = new Promise((resolve, reject) => setTimeout(() => resolve(10), 1000))
//console.log('x', x.status)
//x.then(() => {
// console.log('x', x.status)
//})
//console.log(await test())