mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 02:37:41 -05:00
Adding JS Types (#1749)
Added types for some exceptions, config objects, and sleep()
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
export default {
|
||||
/**
|
||||
* 'Sleep' for the given number of seconds. Used to implement Python's time.sleep in Worker threads.
|
||||
* @param {number} seconds The number of seconds to sleep.
|
||||
*/
|
||||
sleep(seconds) {
|
||||
return new Promise(($) => setTimeout($, seconds * 1000));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user