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

SpeakerIdの型を作成 #1196

Merged
merged 4 commits into from
Feb 16, 2023
Merged

SpeakerIdの型を作成 #1196

merged 4 commits into from
Feb 16, 2023

Conversation

Hiroshiba
Copy link
Member

内容

SpeakerIdをstringから専用の型にします。

関連 Issue

@Hiroshiba Hiroshiba requested a review from a team as a code owner February 11, 2023 13:45
@Hiroshiba Hiroshiba requested review from y-chan and removed request for a team February 11, 2023 13:45
Comment on lines +11 to +13
export const speakerIdSchema = z.string().uuid().brand<"SpeakerId">();
export type SpeakerId = z.infer<typeof speakerIdSchema>;
export const SpeakerId = (id: string): SpeakerId => speakerIdSchema.parse(id);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

実際の型定義はここです

@@ -112,7 +113,7 @@ export type QuasarDialog = QVueGlobals["dialog"];

export type AudioStoreState = {
characterInfos: Record<EngineId, CharacterInfo[]>;
morphableTargetsInfo: Record<string, MorphableTargetInfoTable>;
morphableTargetsInfo: Record<EngineId, MorphableTargetInfoTable>;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EngineIdのときの変更忘れです

src/store/preset.ts Outdated Show resolved Hide resolved
Copy link
Member

@yamachu yamachu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更漏れはなさそうに見える、良さそうです:+1:

@Hiroshiba
Copy link
Member Author

レビューありがとうございます、助かります!!

マージします!

@Hiroshiba Hiroshiba merged commit ab5b664 into VOICEVOX:main Feb 16, 2023
@Hiroshiba Hiroshiba deleted the SpeakerIdに branch February 16, 2023 03:17
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

Successfully merging this pull request may close these issues.

2 participants