brainstorming typescript
This commit is contained in:
		
							
								
								
									
										67
									
								
								src/types.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								src/types.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,67 @@ | ||||
| type DominionText = string; | ||||
|  | ||||
| type DominionColor = { | ||||
| 	color: string; | ||||
| 	priority: number; // highest priority is "primary", second highest is "secondary". | ||||
| 	overridesAction: boolean; | ||||
| }; | ||||
|  | ||||
| type DominionBasicCardType = { | ||||
| 	typeType: "basic"; | ||||
| 	name: "Action" | "Treasure" | "Victory" | "Reaction" | "Duration" | "Reserve" | "Night" | "Attack" | "Command"; | ||||
| 	color: null | DominionColor; | ||||
| }; | ||||
| type DominionBasicLandscapeType = { | ||||
| 	typeType: "basic"; | ||||
| 	name: "Event" | "Landmark" | "Project" | "Way" | "Trait"; | ||||
| 	color: null | DominionColor; | ||||
| }; | ||||
|  | ||||
| type DominionCardType = DominionBasicCardType | DominionCustomCardType; | ||||
| type DominionLandscapeType = DominionBasicLandscapeType | DominionCustomLandscapeType; | ||||
|  | ||||
| type DominionCard = { | ||||
| 	orientation: "card"; | ||||
| 	title: string; | ||||
| 	description: DominionText; | ||||
| 	type: Array<DominionCardType>; | ||||
| 	image: string; | ||||
| 	artist: string; | ||||
| 	author: string; | ||||
| 	version: string; | ||||
| 	price: DominionText; | ||||
| 	preview: DominionText; | ||||
| } | { | ||||
| 	orientation: "landscape"; | ||||
| 	title: string; | ||||
| 	description: DominionText; | ||||
| 	type: Array<DominionLandscapeType>; | ||||
| 	image: string; | ||||
| 	artist: string; | ||||
| 	author: string; | ||||
| 	version: string; | ||||
| 	price: DominionText; | ||||
| }; | ||||
|  | ||||
| type DominionCustomSymbol = { | ||||
| 	image: string; | ||||
| }; | ||||
|  | ||||
| type DominionCustomCardType = { | ||||
| 	typeType: "custom"; | ||||
| 	name: string; | ||||
| 	color: DominionColor | ||||
| }; | ||||
| type DominionCustomLandscapeType = { | ||||
| 	typeType: "custom"; | ||||
| 	name: string; | ||||
| 	color: DominionColor | ||||
| }; | ||||
|  | ||||
| type DominionExpansion = { | ||||
| 	cards: Array<DominionCard>; | ||||
| 	icon: string; | ||||
| 	customSymbols: Array<DominionCustomSymbol>; | ||||
| 	customCardTypes: Array<DominionCustomCardType>; | ||||
| 	customLandscapeTypes: Array<DominionCustomLandscapeType>; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 dylan
					dylan