-
Notifications
You must be signed in to change notification settings - Fork 309
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
StyleIdをブランド型にする #1211
The head ref may contain hidden characters: "StyleId\u3092\u30D6\u30E9\u30F3\u30C9\u578B\u306B\u3059\u308B"
StyleIdをブランド型にする #1211
Conversation
export const styleIdSchema = z.number().brand<"StyleId">(); | ||
export type StyleId = z.infer<typeof styleIdSchema>; | ||
export const StyleId = (id: number): StyleId => styleIdSchema.parse(id); |
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.
ここが型の定義箇所です
@@ -73,7 +74,7 @@ function parseTextFile( | |||
initVoice?: Voice | |||
): AudioItem[] { | |||
const name2Voice = new Map<string, Voice>(); | |||
const uuid2Voice = new Map<string, Voice>(); | |||
const uuid2Voice = new Map<SpeakerId, Voice>(); |
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.
SpeakerId時の変更漏れ
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.
LGTM!
コンフリクト発生してますね。。後で直しておきます! |
多分大丈夫だと思うのでマージします! |
内容
StyleIdをブランド型にしました。
これでVoiceの中身は全部Brand型になります。
関連 Issue
close: #1148
スクリーンショット・動画など
その他