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

reduce duplication and remove unnecessary code #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

VictorAugDB
Copy link
Contributor

Create an interface to repeatable type and use destructuring with deafult value to remove unnecessary code

@VictorAugDB VictorAugDB changed the title reduce duplcation and remove unnecessary code reduce duplication and remove unnecessary code May 17, 2022
Create an interface to repeatable type and use destructuring with deafult value to remove unnecessary code
@@ -1,39 +1,35 @@
import { Application, HookFn, makeApp } from '@/_lib/Application';

type EntrypointFn<T extends Record<string | symbol, any>> = (arg: Context<T>) => Promise<void>;
type RecordAny<T extends string | symbol = string | symbol> = Record<T, any>

Choose a reason for hiding this comment

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

Just for curiosity but this is a kind of thing we should place as a shared type? cc/ @talyssonoc

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