Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert-general-store #489

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Convert-general-store #489

wants to merge 2 commits into from

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

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.

None yet

2 participants