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

refactor(server): session interface types #8977

Merged
merged 1 commit into from
Apr 21, 2024

Conversation

jrasm91
Copy link
Contributor

@jrasm91 jrasm91 commented Apr 20, 2024

No description provided.

@jrasm91 jrasm91 added the tech-debt Technical debt label Apr 20, 2024
Copy link

cloudflare-pages bot commented Apr 20, 2024

Deploying immich with  Cloudflare Pages  Cloudflare Pages

Latest commit: 65ef3a4
Status: ✅  Deploy successful!
Preview URL: https://4118d772.immich.pages.dev
Branch Preview URL: https://refactor-session-interface-t.immich.pages.dev

View logs

Copy link
Member

@bo0tzz bo0tzz left a comment

Choose a reason for hiding this comment

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

Can this pattern be extended to other repos?

@jrasm91
Copy link
Contributor Author

jrasm91 commented Apr 20, 2024

Definitely, but not today :-)

@@ -2,10 +2,12 @@ import { SessionEntity } from 'src/entities/session.entity';

export const ISessionRepository = 'ISessionRepository';

type E = SessionEntity;
Copy link
Member

Choose a reason for hiding this comment

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

That was necessary lmao

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was considering making all interfaces implement a BaseInterface that has the correct typings for create, update, delete, and get. It would be something like BaseInterface<E> and then the methods would indeed reference E.

@jrasm91 jrasm91 force-pushed the refactor/session-interface-types branch from 9631dcf to 65ef3a4 Compare April 20, 2024 21:08
@jrasm91 jrasm91 merged commit a93534f into main Apr 21, 2024
23 checks passed
@jrasm91 jrasm91 deleted the refactor/session-interface-types branch April 21, 2024 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt Technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants