Skip to content

Commit d58ea4a

Browse files
committed
make return type of push() and transform() explicit
1 parent faea38e commit d58ea4a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/processScript/transform.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ export function transform(
3232
file: File,
3333
sourceCode: string,
3434
{ uniqueId = `00000000000`, scriptUser, scriptName, seclevel = 4 }: TransformOptions
35-
) {
35+
): { file: File; seclevel: number, warnings: { message: string }[] } {
36+
const warnings: { message: string }[] = []
3637
const topFunctionName = `_${uniqueId}_SCRIPT_`
3738
let program!: NodePath<t.Program>
3839

src/push.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export async function push(
5454
sourcePath: string,
5555
hackmudPath: string,
5656
{ scripts = [ `*.*` ], onPush = () => {}, minify = true, mangleNames = false, forceQuineCheats }: PushOptions = {}
57-
) {
57+
): Promise<MissingSourceFolderError | MissingHackmudFolderError | NoUsersError | NoScriptsError | Info[]> {
5858
const [ sourceFolder, hackmudFolder ] = await Promise.all([
5959
readDirectoryWithStats(sourcePath).catch(error => {
6060
if (error && (error as NodeJS.ErrnoException).code == "ENOENT")

0 commit comments

Comments
 (0)