Not fully understanding the purpose of this project
@nikithauc がすでに取り組んでいます。
2021年4月7日 から。
評価
この issue はまだ評価されていません。
説明
Hi there.
I've been using the microsoft graph client and the types in this repo.
The thing I don't fully understand, is why the types are separate from the microsoft graph client project, and why I need to explicitly typecast. It relies on me, the consumer, knowing the types ahead of time. I don't know the request or response data schema for all the endpoints, so how am I supposed to typecast? This approach seems a little risky to me, I could be typecasting wrong and could be using the wrong data structures.
Can someone clarify the situation and explain the microsoft graph client doesn't just use the types in this repo? It would make consumers's lives a lot better!
The client should provide the types for every endpoint. In the example below, as i consumer, I expect the client to tell me the types it expects:
// `user` should be typed by default
// the return type should be typed by default
client.api(`/users/${id}`).patch(user);
If the types cannot be combined with the client, can i suggest a slightly better approach (imo) for handling types. Instead of typecasting we can use generics:
client.api(`/users/${id}`).patch<RequestType, ResponseType>(user);
AB#8842
- 主要言語
- PowerShell
- スター
- 129
- フォーク
- 35
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-typescript-typings のほかの issue
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
microsoftgraph/msgraph-typescript-typings#756 · リアクション 1 件 ·
-
status:waiting-for-triage type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoftgraph/msgraph-typescript-typings#748 · リアクション 2 件 ·
-
status:waiting-for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
-
status:waiting-for-triage type:feature
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
microsoftgraph/msgraph-typescript-typings#530 · リアクション 1 件 ·