Setup Godot example project
Some checks failed
Lint / lint (push) Failing after 9s

This commit is contained in:
Julien Valverdé
2025-12-28 15:37:58 +01:00
parent 30cc8a857c
commit e9a34a2152
27 changed files with 91638 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
declare module "godot.worker" {
import { GAny, GArray, Object as GObject } from "godot";
class JSWorker {
constructor(path: string);
postMessage(message: any, transfer?: GArray | ReadonlyArray<NonNullable<GAny>>): void;
terminate(): void;
onready?: () => void;
onmessage?: (message: any) => void;
//TODO not implemented yet
onerror?: (error: any) => void;
/**
* @deprecated Use onmessage to receive messages sent from postMessage() with transfers included.
* @param obj
*/
ontransfer?: (obj: GObject) => void;
}
// only available in worker scripts
const JSWorkerParent:
| {
onmessage?: (message: any) => void;
close(): void;
/**
* @deprecated Use the transfer parameter of postMessage instead.
* @param obj
*/
transfer(obj: GObject): void;
postMessage(message: any, transfer?: GArray | ReadonlyArray<NonNullable<GAny>>): void;
}
| undefined;
}