🚀 Feature: Add Typing Support for Query

未关闭
#581 2 条评论 109 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

  • #655 来自 @Suven-p —— 已关闭,未合并

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript

调研方向

未指定源文件或测试。首先跟踪生成的 web SDK 中 TypeScript Query 的定义,以及生成这些定义的 sdk-generator 模板。当 Query 接受模型类型、提示有效属性,并根据所选属性的类型检查每个值时,即表示完成。

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

描述

🔖 Feature description

As a developer, I'd like to be able to have my IDE suggest/autocomplete attribute and check the type of value when creating a Query.

🎤 Pitch

Using the web SDK and TypeScript as an example, it would be cool to be able to do:

type Todo = Models.Document & {
    content: string;
    isComplete: boolean;
  }

Query.equal<Todo>("

and then have my IDE suggest:

image

Then, if I pass a string into the value, it would show an error/warning because it should be a boolean.

image image
👀 Have you spent some time to check if this issue has been raised before?
  • I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
主要语言
Twig
星标
330
派生
212
平均合并
12 小时 3 分钟
30 天内合并 PR
131

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

appwrite/sdk-generator 的其他 Issue

查看 appwrite/sdk-generator 的全部 Issue

相似的 Issue

更多 DevTools Issue

把新 issue 发到你的邮箱

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