summaryrefslogtreecommitdiff
path: root/src/types
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-12 15:49:03 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-12 15:49:03 +0100
commit37020d847e66e57913d493716e98f4dcab749262 (patch)
treea6bfa0c49bcec61ff91465f323142db43511a122 /src/types
parent18b85566df437ac932f59e94cbec771a4a331927 (diff)
Applies Prettier
Diffstat (limited to 'src/types')
-rw-r--r--src/types/Date.d.ts37
-rw-r--r--src/types/LallansIssue.d.ts26
-rw-r--r--src/types/LallansIssueNumber.d.ts79
-rw-r--r--src/types/Locale.ts4
-rw-r--r--src/types/Price.d.ts2
-rw-r--r--src/types/Scotsoun.d.ts24
-rw-r--r--src/types/TranslationsDictionary.d.ts8
7 files changed, 132 insertions, 48 deletions
diff --git a/src/types/Date.d.ts b/src/types/Date.d.ts
index 5e1df66..e13ea08 100644
--- a/src/types/Date.d.ts
+++ b/src/types/Date.d.ts
@@ -1,10 +1,37 @@
type Year = `${19 | 20}${Digit}${Digit}`;
type Month = '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12';
type Day =
- '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' |
- '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' |
- '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' |
- '30' | '31';
+ | '01'
+ | '02'
+ | '03'
+ | '04'
+ | '05'
+ | '06'
+ | '07'
+ | '08'
+ | '09'
+ | '10'
+ | '11'
+ | '12'
+ | '13'
+ | '14'
+ | '15'
+ | '16'
+ | '17'
+ | '18'
+ | '19'
+ | '20'
+ | '21'
+ | '22'
+ | '23'
+ | '24'
+ | '25'
+ | '26'
+ | '27'
+ | '28'
+ | '29'
+ | '30'
+ | '31';
type Date = `${Year}-${Month}-${Day}`;
-export default Date; \ No newline at end of file
+export default Date;
diff --git a/src/types/LallansIssue.d.ts b/src/types/LallansIssue.d.ts
index d8339b1..86958f3 100644
--- a/src/types/LallansIssue.d.ts
+++ b/src/types/LallansIssue.d.ts
@@ -2,22 +2,18 @@ import type LallansIssueNumber from './LallansIssueNumber';
import type Price from './Price';
type LallansIssue = {
- issueNumber: LallansIssueNumber,
- issueName: string,
- price: Price,
+ issueNumber: LallansIssueNumber;
+ issueName: string;
+ price: Price;
description: {
- sco: string,
- 'en-GB': string,
- },
- coverArtist?: string,
- trackList?: string[],
-} & (
- { contributors: Contributor[] } |
- { contributions: Contribution[] } |
- Record<string, never>
-);
+ sco: string;
+ 'en-GB': string;
+ };
+ coverArtist?: string;
+ trackList?: string[];
+} & ({ contributors: Contributor[] } | { contributions: Contribution[] } | Record<string, never>);
export type Contributor = string;
-export type Contribution = { author?: string, title: string };
+export type Contribution = { author?: string; title: string };
-export default LallansIssue; \ No newline at end of file
+export default LallansIssue;
diff --git a/src/types/LallansIssueNumber.d.ts b/src/types/LallansIssueNumber.d.ts
index 10d068e..29f07cc 100644
--- a/src/types/LallansIssueNumber.d.ts
+++ b/src/types/LallansIssueNumber.d.ts
@@ -1,12 +1,73 @@
type LallansIssueNumber =
- 21 | 22 | 23 | 24 | 25 | 27 | 29 |
- 30 | 33 | 35 | 36 | 38 | 39 |
- 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 |
- 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 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 | 96 | 97 | 98 | 99 |
- 100 | 101;
+ | 21
+ | 22
+ | 23
+ | 24
+ | 25
+ | 27
+ | 29
+ | 30
+ | 33
+ | 35
+ | 36
+ | 38
+ | 39
+ | 41
+ | 42
+ | 43
+ | 45
+ | 46
+ | 47
+ | 48
+ | 49
+ | 50
+ | 51
+ | 52
+ | 53
+ | 54
+ | 55
+ | 56
+ | 57
+ | 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
+ | 96
+ | 97
+ | 98
+ | 99
+ | 100
+ | 101;
export default LallansIssueNumber;
diff --git a/src/types/Locale.ts b/src/types/Locale.ts
index 2964117..1b2f8c4 100644
--- a/src/types/Locale.ts
+++ b/src/types/Locale.ts
@@ -1,2 +1,2 @@
-type Locale = 'sco' | 'en-GB'
-export default Locale \ No newline at end of file
+type Locale = 'sco' | 'en-GB';
+export default Locale;
diff --git a/src/types/Price.d.ts b/src/types/Price.d.ts
index fc9d9fb..6b8f78d 100644
--- a/src/types/Price.d.ts
+++ b/src/types/Price.d.ts
@@ -1,4 +1,4 @@
-import type Digit from "./Digit";
+import type Digit from './Digit';
type Price = `${bigint | ''}.${Digit}${Digit}`;
diff --git a/src/types/Scotsoun.d.ts b/src/types/Scotsoun.d.ts
index f31a9b5..7ef2f50 100644
--- a/src/types/Scotsoun.d.ts
+++ b/src/types/Scotsoun.d.ts
@@ -4,17 +4,17 @@ import type Locale from './Locale';
import type Price from './Price';
type Scotsoun = {
- 'title': string,
- 'subtitle'?: string,
- 'long-name': string,
- 'author'?: string,
- 'cd-count': number,
- 'price': Price,
- 'scotsoun-id': string,
- 'description'?: { [key in Locale]?: string } & { [key in typeof defaultLocale]: string },
- 'cover-artist'?: string,
- 'track-list'?: string[],
- 'release-date'?: Date,
+ title: string;
+ subtitle?: string;
+ 'long-name': string;
+ author?: string;
+ 'cd-count': number;
+ price: Price;
+ 'scotsoun-id': string;
+ description?: { [key in Locale]?: string } & { [key in typeof defaultLocale]: string };
+ 'cover-artist'?: string;
+ 'track-list'?: string[];
+ 'release-date'?: Date;
};
-export default Scotsoun; \ No newline at end of file
+export default Scotsoun;
diff --git a/src/types/TranslationsDictionary.d.ts b/src/types/TranslationsDictionary.d.ts
index 7ebb952..5a8a251 100644
--- a/src/types/TranslationsDictionary.d.ts
+++ b/src/types/TranslationsDictionary.d.ts
@@ -1,6 +1,6 @@
-import type { defaultLocale } from "../i18n/locales";
-import type Locale from "./Locale";
+import type { defaultLocale } from '../i18n/locales';
+import type Locale from './Locale';
type TranslationsDictionary<Keys> = {
- [key in Keys]: { [key in Locale]?: string } & { [key in typeof defaultLocale]: string }
-}; \ No newline at end of file
+ [key in Keys]: { [key in Locale]?: string } & { [key in typeof defaultLocale]: string };
+};