refactor: py/js entry func name (#31)

This commit is contained in:
sigoden
2024-06-07 16:10:05 +08:00
committed by GitHub
parent 739a832d87
commit e1d895cc9a
9 changed files with 32 additions and 24 deletions
+1 -1
View File
@@ -11,6 +11,6 @@
* @property {string[]} [array_optional] - Define a optional string array property
* @param {Args} args
*/
exports.main = function main(args) {
exports.run = function run(args) {
console.log(args);
}
+1 -1
View File
@@ -1,7 +1,7 @@
from typing import List, Literal, Optional
def main(
def run(
boolean: bool,
string: str,
string_enum: Literal["foo", "bar"],
+1 -1
View File
@@ -4,6 +4,6 @@
* @property {string} code - Javascript code to execute, such as `console.log("hello world")`
* @param {Args} args
*/
exports.main = function main({ code }) {
exports.run = function run({ code }) {
eval(code);
}
+1 -1
View File
@@ -1,4 +1,4 @@
def main(code: str):
def run(code: str):
"""Runs the python code.
Args:
code: Python code to execute, such as `print("hello world")`