godotjs / godotjs/javascript

generate strong types for engine signals and connections

未关闭
#30 4 条评论 0 个 reaction 已指派 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 未指出文件、测试或类型生成入口点,仅提供了一个暂定示例。首先定位 Godot 引擎信号和连接当前的暴露方式,然后确定生成范围,并定义测试以验证代表性信号和连接所对应的 TypeScript 类型。

由索引模型根据 Issue 内容生成。

评估

技术栈
godot, typescript
领域
developer-experience, game-dev
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。