This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: invalid server-side method then | |
at server_side_call (app.js:5:9) | |
at Proxy.<anonymous> (app:23:12) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const timeout = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
const server_side_call = async (method, ...args) => { | |
if (!["foo", "bar", "baz"].includes(method)) { | |
throw new Error(`invalid server-side method ${method}`); | |
} | |
console.log(`${method} successfully executed server-side`); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const timeout = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
const server_side_call = async (method, ...args) => { | |
if (!["foo", "bar", "baz"].includes(method)) { | |
throw new Error(`invalid server-side method ${method}`); | |
} | |
console.log(`${method} successfully executed server-side`); | |
}; |