-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
json-schema配下の最新化 #12312
Merged
syuilo
merged 17 commits into
misskey-dev:develop
from
samunohito:enhance/update-jsonschema
Nov 21, 2023
Merged
json-schema配下の最新化 #12312
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e979743
user.ts、page.ts、drive-folder.tsを各EntityServiceの戻り値をもとに最新化
samunohito fac1d27
再確認
samunohito 273dbea
fix error
samunohito 0b533c9
note以外の残りのファイルを対応
samunohito 700008b
Merge branch 'develop' into enhance/update-jsonschema
samunohito 09c564b
fix CHANGELOG.md
samunohito ff1676c
fix CHANGELOG.md
samunohito 1e505a2
fix user.ts
samunohito 219354f
fix user.ts
samunohito 7630cbe
コメント対応
samunohito b16fe1e
Merge branch 'develop' into enhance/update-jsonschema
samunohito 123f3d7
Merge branch 'develop' into enhance/update-jsonschema
samunohito 14a3eba
Merge branch 'develop' into enhance/update-jsonschema
samunohito 5f2d680
Merge branch 'develop' into enhance/update-jsonschema
samunohito 6b22253
Merge branch 'develop' into enhance/update-jsonschema
samunohito 3a50c7f
Merge branch 'develop' into enhance/update-jsonschema
samunohito f1dfd31
fix note.ts
samunohito File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hint.packedUsers.get(userId)
からundefinedを引き剥がすための対応です。!
マークで対応することも可能でしたが、lintの警告が出てしまったためこのような形になりました。不都合あれば戻しますので、お手数ですがその際はご指摘願います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Misskeyのバックエンド見ていただければわかりますが普通に
!
は使われている(lintを無視している)のでどっちでもいい気がいたします)(方針に関してはしゅいろ氏あたりに聞いてみてください)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ifで弾く書き方だと、読み手に「undefinedが入る可能性があるのか」と思わせかねないのでそのような可能性がないことが明らかな場合は
!
で書くようにしてますね(とはいえ気軽には使いたくないのでlintのwarnは出すようにしてます)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここはundefinedになる可能性が十分あるので(packedUsersそのものも、packedUsersのなかにuserIdがない可能性もありえる)、今の実装でも良いのかなと思いつつ…
どうしたら良いのか分からなくなりつつあるので、方針を確認させて下さい:pray:
①このまま
②もとに戻す(ただしjson-schemaの型と合わない)
③もとに戻しつつ、
hint.packedUsers.get(userId)!
として型を合わせる④json-schema側をundefined許容にする
⑤③をより安全にする(
packedUsers
のnullチェックだけじゃなく、hasでuserIdの有無を見る)