godotjs / godotjs/javascript

generate strong types for engine signals and connections

オープン
#30 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
C++
スター
1.1k
フォーク
80
PR マージ指標
30日以内にマージされた PR はありません

説明

is there any interest in generating strong types for connections such as:

(this is probably a poor example, I'd need to dig in and make a PR to do it correctly)

```ts
declare module godot {
interface SceneTree implements MainLoop {
//overload 1 for network_peer_connected signal
function connect(
signal: "network_peer_connected",
target: T,
method: Extract | (...args: Parameters) => void, //could use e.g. MethodOf,
binds: Tail>,
flags: number = 0,
): number;
// more overloads, one per signal for discriminating union
}
}
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。