-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
review-fix:ハイフンがない郵便番号とハイフンがある郵便場号を区別するよう型を修正
- Loading branch information
1 parent
9b42acd
commit cb19868
Showing
4 changed files
with
19 additions
and
13 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
export type Address<ZipCode extends string> = { | ||
zipcode: ZipCode; | ||
export type UnHyphenatedZipCodeAddress = { | ||
zipcode: string; | ||
pref: string; | ||
city: string; | ||
town: string; | ||
}; | ||
|
||
export type UnHyphenatedZipCode = `${string}`; | ||
export type HyphenatedZipCode = `${string}-${string}`; | ||
export type HyphenatedZipCodeAddress = { | ||
zipcode: `${string}-${string}`; | ||
pref: string; | ||
city: string; | ||
town: string; | ||
}; | ||
|
||
export type UnHyphenatedZipCode = `${number}`; | ||
export type HyphenatedZipCode = `${number}-${number}`; |
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