forked from Distributive-Network/PythonMonkey
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpythonmonkey.pyi
More file actions
47 lines (39 loc) · 1.1 KB
/
pythonmonkey.pyi
File metadata and controls
47 lines (39 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""
stub file for type hints & documentations for the native module
@see https://typing.readthedocs.io/en/latest/source/stubs.html
"""
import typing as _typing
# pylint: disable=redefined-builtin
def eval(code: str, /) -> _typing.Any:
"""
JavaScript evaluator in Python
"""
def collect() -> None:
"""
Calls the spidermonkey garbage collector
"""
@_typing.overload
def asUCS4(utf16_str: str, /) -> str:
"""
Expects a python string in UTF16 encoding, and returns a new equivalent string in UCS4.
Undefined behaviour if the string is not in UTF16.
"""
@_typing.overload
def asUCS4(anything_else: _typing.Any, /) -> _typing.NoReturn: ...
class bigint(int):
"""
Representing JavaScript BigInt in Python
"""
class SpiderMonkeyError(Exception):
"""
Representing a corresponding JS Error in Python
"""
class JSObjectProxy(dict):
"""
JavaScript Object proxy dict
"""
def __init__(self) -> None: ...
null = _typing.Annotated[
_typing.NewType("pythonmonkey.null", object),
"Representing the JS null type in Python using a singleton object",
]