Skip to content

Convert-general-store#489

Open
ryceg wants to merge 2 commits intomasterfrom
Convert-general-store
Open

Convert-general-store#489
ryceg wants to merge 2 commits intomasterfrom
Convert-general-store

Conversation

@ryceg
Copy link
Owner

@ryceg ryceg commented Jan 9, 2021

What does this do?

Converts general store to typescript.

How was this tested? Did you test the changes in the compiled .html file?

Not tested, should be fine.

Is there a GitHub Issue that this is resolving?

No

// @ts-ignore
setup.createRelationship(town, associatedNPC, generalStore.assistant, family,
// @ts-ignore
town.npcRelations[generalStore.assistant.key].filter(r => r.targetNpcKey === associatedNPC.key)[0]?.relation)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract to a variable, since it's such a long line. Or even better, to a function since it's repeated in multiple places.

import { GeneralStore, Town } from '@lib'
import { random } from '../../../lib/src/random'

// @ts-ignore
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use a ts-ignore here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants