Additional changes to typescript

This commit is contained in:
Daniël van Noord
2021-04-06 14:47:04 +02:00
parent 2d0b499a14
commit 5cd0613398
19 changed files with 33 additions and 27 deletions

View File

@@ -1,7 +1,7 @@
/** Data copied directly from the game */
/** Array of the names of all fortune cookies obtainable from the ticker */
export const Fortunes = [
export const Fortunes: string[] = [
'Fortune #001',
'Fortune #002',
'Fortune #003',
@@ -28,7 +28,7 @@ export const Fortunes = [
];
/** Array of the names of all Halloween cookies */
export const HalloCookies = [
export const HalloCookies: string[] = [
'Skull cookies',
'Ghost cookies',
'Bat cookies',
@@ -39,7 +39,7 @@ export const HalloCookies = [
];
/** Array of the names of all Christmas cookies */
export const ChristCookies = [
export const ChristCookies: string[] = [
'Christmas tree biscuits',
'Snowflake biscuits',
'Snowman biscuits',
@@ -50,7 +50,7 @@ export const ChristCookies = [
];
/** Array of the names of all Valentine cookies */
export const ValCookies = [
export const ValCookies: string[] = [
'Pure heart biscuits',
'Ardent heart biscuits',
'Sour heart biscuits',
@@ -61,7 +61,7 @@ export const ValCookies = [
];
/** Array of the names of all plant drops */
export const PlantDrops = [
export const PlantDrops: string[] = [
'Elderwort biscuits',
'Bakeberry cookies',
'Duketater cookies',
@@ -72,7 +72,7 @@ export const PlantDrops = [
];
/** All possible effects plants and other items can have with a display-title */
export const Effects = {
export const Effects: { [index: string]: string } = {
buildingCost: 'Building prices',
click: 'Cookies per click',
cps: 'Total CPS',

View File

@@ -1,10 +1,10 @@
/** Data related directly to the scales used by Cookie Monster */
/** Array of abbreviations used in the "Metric" scale */
export const metric = ['', '', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
export const metric: string[] = ['', '', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
/** Array of abbreviations used in the "Short" scale */
export const shortScale = [
export const shortScale: string[] = [
'',
'',
'M',
@@ -34,7 +34,7 @@ export const shortScale = [
];
/** Array of abbreviations used in the "Abbreviated Short" scale */
export const shortScaleAbbreviated = [
export const shortScaleAbbreviated: string[] = [
'',
'K',
'M',

View File

@@ -1,7 +1,7 @@
/** Data related to the display titles of certain sections in menu screens */
/** Display titles of the headers of the Cookie Monster settings section */
export const ConfigGroups = {
export const ConfigGroups: { [index: string]: string } = {
Favourite: 'Favourite Settings',
Calculation: 'Calculation',
Notation: 'Notation',
@@ -14,7 +14,7 @@ export const ConfigGroups = {
};
/** Display titles of the headers of the notification section of the Cookie Monster settings */
export const ConfigGroupsNotification = {
export const ConfigGroupsNotification: { [index: string]: string } = {
NotificationGeneral: 'General Notifications',
NotificationGC: 'Golden Cookie',
NotificationFC: 'Fortune Cookie',

View File

@@ -1,5 +1,7 @@
/** This array describes all default settings */
const ConfigDefault = {
const ConfigDefault: {
[index: string]: string | number | { [index: string]: number };
} = {
CPSMode: 1,
AvgCPSHist: 3,
AvgClicksHist: 0,