Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefinitelyTyped #18

Open
linonetwo opened this issue Oct 14, 2023 · 2 comments
Open

DefinitelyTyped #18

linonetwo opened this issue Oct 14, 2023 · 2 comments

Comments

@linonetwo
Copy link
Contributor

linonetwo commented Oct 14, 2023

你用 AI 差不多把 API 全都转换过了吗?那就可以提交到 https://github.com/DefinitelyTyped/DefinitelyTyped

用 @types/tiddlywiki 安装的话,就会默认被识别,可以少一个 ts 配置

@Gk0Wk
Copy link
Collaborator

Gk0Wk commented Oct 14, 2023

那还没有,就是把一些utils弄了。

@Gk0Wk
Copy link
Collaborator

Gk0Wk commented Oct 14, 2023

我把prompt留在这


我现在选中的是一个 js 项目的一部分源码,我现在需要编写其 ts 的定义(不需要实现),请生成 ts 的类型定义并包括中英文文档注释,例如:

/**
 * Recursively freeze an object and its properties.
 * @param object - The object to freeze.
 * @description 递归地冻结对象及其属性。
 */
export function deepFreeze(object: any): void;

注意最后 @description 后面跟着函数的中文解释,每个函数的文档注释都要包含 @descirptoin+中文解释

如果文中出现了老的 class 定义方式,请将其转换为新标准的 class 定义方式,类的属性也需要文档注释

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants