-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: optimize static types and make them dynamic
- Loading branch information
1 parent
0fd6c8a
commit 2848ff5
Showing
7 changed files
with
160 additions
and
7,203 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,115 +1,4 @@ | ||
export type ChapterId = | ||
| '1' | ||
| '2' | ||
| '3' | ||
| '4' | ||
| '5' | ||
| '6' | ||
| '7' | ||
| '8' | ||
| '9' | ||
| '10' | ||
| '11' | ||
| '12' | ||
| '13' | ||
| '14' | ||
| '15' | ||
| '16' | ||
| '17' | ||
| '18' | ||
| '19' | ||
| '20' | ||
| '21' | ||
| '22' | ||
| '23' | ||
| '24' | ||
| '25' | ||
| '26' | ||
| '27' | ||
| '28' | ||
| '29' | ||
| '30' | ||
| '31' | ||
| '32' | ||
| '33' | ||
| '34' | ||
| '35' | ||
| '36' | ||
| '37' | ||
| '38' | ||
| '39' | ||
| '40' | ||
| '41' | ||
| '42' | ||
| '43' | ||
| '44' | ||
| '45' | ||
| '46' | ||
| '47' | ||
| '48' | ||
| '49' | ||
| '50' | ||
| '51' | ||
| '52' | ||
| '53' | ||
| '54' | ||
| '55' | ||
| '56' | ||
| '57' | ||
| '58' | ||
| '59' | ||
| '60' | ||
| '61' | ||
| '62' | ||
| '63' | ||
| '64' | ||
| '65' | ||
| '66' | ||
| '67' | ||
| '68' | ||
| '69' | ||
| '70' | ||
| '71' | ||
| '72' | ||
| '73' | ||
| '74' | ||
| '75' | ||
| '76' | ||
| '77' | ||
| '78' | ||
| '79' | ||
| '80' | ||
| '81' | ||
| '82' | ||
| '83' | ||
| '84' | ||
| '85' | ||
| '86' | ||
| '87' | ||
| '88' | ||
| '89' | ||
| '90' | ||
| '91' | ||
| '92' | ||
| '93' | ||
| '94' | ||
| '95' | ||
| '96' | ||
| '97' | ||
| '98' | ||
| '99' | ||
| '100' | ||
| '101' | ||
| '102' | ||
| '103' | ||
| '104' | ||
| '105' | ||
| '106' | ||
| '107' | ||
| '108' | ||
| '109' | ||
| '110' | ||
| '111' | ||
| '112' | ||
| '113' | ||
| '114'; | ||
import { NumberRange, NumberUnionToString } from './utils'; | ||
|
||
type _ChapterId = NumberRange<1, 115>; | ||
export type ChapterId = _ChapterId | NumberUnionToString<_ChapterId>; |
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,61 +1,4 @@ | ||
export type HizbNumber = | ||
| '1' | ||
| '2' | ||
| '3' | ||
| '4' | ||
| '5' | ||
| '6' | ||
| '7' | ||
| '8' | ||
| '9' | ||
| '10' | ||
| '11' | ||
| '12' | ||
| '13' | ||
| '14' | ||
| '15' | ||
| '16' | ||
| '17' | ||
| '18' | ||
| '19' | ||
| '20' | ||
| '21' | ||
| '22' | ||
| '23' | ||
| '24' | ||
| '25' | ||
| '26' | ||
| '27' | ||
| '28' | ||
| '29' | ||
| '30' | ||
| '31' | ||
| '32' | ||
| '33' | ||
| '34' | ||
| '35' | ||
| '36' | ||
| '37' | ||
| '38' | ||
| '39' | ||
| '40' | ||
| '41' | ||
| '42' | ||
| '43' | ||
| '44' | ||
| '45' | ||
| '46' | ||
| '47' | ||
| '48' | ||
| '49' | ||
| '50' | ||
| '51' | ||
| '52' | ||
| '53' | ||
| '54' | ||
| '55' | ||
| '56' | ||
| '57' | ||
| '58' | ||
| '59' | ||
| '60'; | ||
import { NumberRange, NumberUnionToString } from './utils'; | ||
|
||
type _HizbNumber = NumberRange<1, 61>; | ||
export type HizbNumber = _HizbNumber | NumberUnionToString<_HizbNumber>; |
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,31 +1,4 @@ | ||
export type JuzNumber = | ||
| '1' | ||
| '2' | ||
| '3' | ||
| '4' | ||
| '5' | ||
| '6' | ||
| '7' | ||
| '8' | ||
| '9' | ||
| '10' | ||
| '11' | ||
| '12' | ||
| '13' | ||
| '14' | ||
| '15' | ||
| '16' | ||
| '17' | ||
| '18' | ||
| '19' | ||
| '20' | ||
| '21' | ||
| '22' | ||
| '23' | ||
| '24' | ||
| '25' | ||
| '26' | ||
| '27' | ||
| '28' | ||
| '29' | ||
| '30'; | ||
import { NumberRange, NumberUnionToString } from './utils'; | ||
|
||
type _JuzNumber = NumberRange<1, 31>; | ||
export type JuzNumber = _JuzNumber | NumberUnionToString<_JuzNumber>; |
Oops, something went wrong.
2848ff5
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.
Successfully deployed to the following URLs:
quranjs-docs – ./docs
quranjs-docs-git-master-ahmed-riad.vercel.app
quranjs-docs.vercel.app
quranjs-docs-ahmed-riad.vercel.app
2848ff5
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.
Successfully deployed to the following URLs:
api – ./docs
quranjs.vercel.app
api-quranjs.vercel.app
api-git-master-quranjs.vercel.app