-
Notifications
You must be signed in to change notification settings - Fork 2
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
chore: type definitions #31
Conversation
adcde80
to
13f1883
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think it is good to have the static typedef in the same file as the type objects
src/smb.ts
Outdated
id: string; | ||
content: string; | ||
} | ||
type SmbEndpointDescription = Static<typeof SmbEndpointDescription>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to move the static typedef to the models.ts as well. Then they are all stored at the same place
src/production_manager.ts
Outdated
|
||
type NewProduction = Static<typeof NewProduction>; | ||
type Production = Static<typeof Production>; | ||
type Line = Static<typeof Line>; | ||
type SmbEndpointDescription = Static<typeof SmbEndpointDescription>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Propose to move these static typedef to models.ts
src/production_manager.test.ts
Outdated
|
||
type NewProduction = Static<typeof NewProduction>; | ||
type Production = Static<typeof Production>; | ||
type SmbEndpointDescription = Static<typeof SmbEndpointDescription>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Propose to move these to models.ts instead.
src/api_productions.ts
Outdated
@@ -12,6 +18,8 @@ dotenv.config(); | |||
type NewProduction = Static<typeof NewProduction>; | |||
type Production = Static<typeof Production>; | |||
type Line = Static<typeof Line>; | |||
type SmbEndpointDescription = Static<typeof SmbEndpointDescription>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the static typedef to models.ts to avoid having duplicated code.
13f1883
to
0b0f00e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now looks good
New complete type definitions
Cleaned up unused types
Rearranged types towards models.ts