mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
cleanup
This commit is contained in:
3
src/effects.js
vendored
3
src/effects.js
vendored
@@ -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
43
x.js
@@ -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())
|
||||
Reference in New Issue
Block a user