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

chore: type definitions #31

Merged
merged 1 commit into from
Dec 20, 2023
Merged

Conversation

oshinongit
Copy link
Contributor

New complete type definitions
Cleaned up unused types
Rearranged types towards models.ts

@oshinongit oshinongit force-pushed the chore-connection-type-definition branch from adcde80 to 13f1883 Compare December 18, 2023 10:38
@oshinongit oshinongit requested a review from birme December 18, 2023 11:25
Copy link
Contributor

@birme birme left a 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>;
Copy link
Contributor

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


type NewProduction = Static<typeof NewProduction>;
type Production = Static<typeof Production>;
type Line = Static<typeof Line>;
type SmbEndpointDescription = Static<typeof SmbEndpointDescription>;
Copy link
Contributor

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


type NewProduction = Static<typeof NewProduction>;
type Production = Static<typeof Production>;
type SmbEndpointDescription = Static<typeof SmbEndpointDescription>;
Copy link
Contributor

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.

@@ -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>;
Copy link
Contributor

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.

@oshinongit oshinongit force-pushed the chore-connection-type-definition branch from 13f1883 to 0b0f00e Compare December 20, 2023 08:14
@oshinongit oshinongit requested a review from birme December 20, 2023 08:18
Copy link
Contributor

@birme birme left a comment

Choose a reason for hiding this comment

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

Now looks good

@oshinongit oshinongit merged commit 116f6d6 into main Dec 20, 2023
4 checks passed
@oshinongit oshinongit deleted the chore-connection-type-definition branch April 10, 2024 12:55
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