Skip to content

Commit d8e03ff

Browse files
committed
feat(typing): add isCompilableUnit and internalBinding API typings
1 parent 72956f2 commit d8e03ff

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

python/pythonmonkey/pythonmonkey.pyi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ def eval(code: str, evalOpts: EvalOptions = {}, /) -> _typing.Any:
2222
JavaScript evaluator in Python
2323
"""
2424

25+
def isCompilableUnit(code: str) -> bool:
26+
"""
27+
Hint if a string might be compilable Javascript without actual evaluation
28+
"""
29+
30+
def internalBinding(namespace: str) -> JSObjectProxy:
31+
"""
32+
INTERNAL USE ONLY
33+
34+
See function declarations in ./builtin_modules/internal-binding.d.ts
35+
"""
36+
2537
def collect() -> None:
2638
"""
2739
Calls the spidermonkey garbage collector

0 commit comments

Comments
 (0)