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

Implement a DomainStory model to improve type safety #162

Open
DanielHeckert opened this issue Sep 26, 2024 · 0 comments
Open

Implement a DomainStory model to improve type safety #162

DanielHeckert opened this issue Sep 26, 2024 · 0 comments
Labels
refactoring technical improvement

Comments

@DanielHeckert
Copy link
Contributor

Is your feature request related to a problem? Please describe.

We want to use TypeScript to get more type safety and earlier error detection. Therefore, if possible, we should not use the type “any” in declarations.

Describe the solution you'd like

First, we can introduce a DomainStory as a type (interface), for example. The DomainStory contains an array of BusinessObject as properties, a string that holds the 'Info', and a string that holds the 'Version'.

export interface DomainStory {
businessObjects: BusinessObject[],
info: string,
version: string
}

Next, the import can be adjusted. This means that the DomainStory is filled with the data from the import and used accordingly. We have to keep in mind that older exported version should also work here.

Afterwards, the export can be adjusted.

Describe alternatives you've considered

Additional context

@DanielHeckert DanielHeckert changed the title Implement a DomainStory model to improve the typing of parameters Implement a DomainStory model to improve type safety Sep 26, 2024
@hofstef hofstef added the refactoring technical improvement label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring technical improvement
Projects
None yet
Development

No branches or pull requests

2 participants