Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
delphiactual committed Nov 30, 2023
1 parent 5cdcafe commit 9b62464
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion output/symbol-name-sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ export const symbolData: {
},
];
const translateManually = [57618, 57665, 57495, 57654, 57671] as const;
export type TranslateManually = typeof translateManually[number];
export type TranslateManually = (typeof translateManually)[number];

/*
* Could not find a source for (did the definitions disappear?):
Expand Down
2 changes: 1 addition & 1 deletion src/generate-bounty-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { KillType, matchTable } from '../data/bounties/bounty-config.js';
import { ItemCategoryHashes } from '../data/generated-enums.js';
import { writeFile } from './helpers.js';

type Ruleset = typeof matchTable[number];
type Ruleset = (typeof matchTable)[number];
type BountyMetadata = Ruleset['assign'];
type AssignmentCategory = keyof BountyMetadata;

Expand Down
10 changes: 5 additions & 5 deletions src/generate-enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const enumSources = [
{ name: 'ProgressionHashes', data: someProgressions },
{ name: 'TraitHashes', data: allTraits },
];
type Data = typeof enumSources[number]['data'][number];
type Data = (typeof enumSources)[number]['data'][number];

enumSources.forEach(({ name, data }) => {
// our output data goes here
Expand Down Expand Up @@ -170,7 +170,7 @@ function tryToGetAdditionalStringContent(thing: Data) {
const labels: string[] = [];

// for item categories, try using its granted types as labels
const thingAsItemCategory = thing as typeof allItemCategories[number];
const thingAsItemCategory = thing as (typeof allItemCategories)[number];
if (thingAsItemCategory.grantDestinyItemType !== undefined) {
if (thingAsItemCategory.grantDestinyItemType) {
labels.push(DestinyItemTypeLookup[thingAsItemCategory.grantDestinyItemType]);
Expand All @@ -181,7 +181,7 @@ function tryToGetAdditionalStringContent(thing: Data) {
}

// for socket categories, try using its granted types as labels
const thingAsSocketCategory = thing as typeof allSocketCategories[number];
const thingAsSocketCategory = thing as (typeof allSocketCategories)[number];
if (thingAsSocketCategory.categoryStyle !== undefined) {
if (thingAsSocketCategory.categoryStyle) {
labels.push(DestinySocketCategoryStyleLookup[thingAsSocketCategory.categoryStyle]);
Expand Down Expand Up @@ -214,12 +214,12 @@ function tryToGetAdditionalStringContent(thing: Data) {
}
}
// for buckets, try using its category as labels
const thingAsBucket = thing as typeof allBuckets[number];
const thingAsBucket = thing as (typeof allBuckets)[number];
if (thingAsBucket.category !== undefined) {
labels.push(BucketCategoryLookup[thingAsBucket.category]);
}

const thingAsTrait = thing as typeof allTraits[number];
const thingAsTrait = thing as (typeof allTraits)[number];
if (thingAsTrait.displayHint !== undefined) {
const discriminator = traitDiscriminators.find((str) =>
thing.displayProperties.description.includes(str)
Expand Down

0 comments on commit 9b62464

Please sign in to comment.