Last active
February 26, 2021 17:04
-
-
Save ericmorand/80dc260072f68f24fff4184e3d1c2f52 to your computer and use it in GitHub Desktop.
NestJS Plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Anonymize<T> = Omit<T, "provide">; | |
export type AnonymousProvider<T = any> = | |
Anonymize<ClassProvider<T>> | | |
Anonymize<ValueProvider<T>> | | |
Anonymize<FactoryProvider<T>> | | |
Anonymize<ExistingProvider<T>>; | |
export type Plugin<T extends Record<string, AnonymousProvider>> = Pick<ModuleMetadata, "imports" | "providers"> & T; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Which allow us to write this: