diff --git a/src/index.ts b/src/index.ts index 7e6eaec8..7fb76ea9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,6 +22,8 @@ export * from './error/service-not-found.error'; export { Handler } from './interfaces/handler.interface'; export { ServiceMetadata } from './interfaces/service-metadata.interface'; export { ServiceOptions } from './interfaces/service-options.interface'; +export { TokenInfer } from './types/token-infer.type'; +export { TokenInferMany } from './types/token-infer-many.type'; export { Constructable } from './types/constructable.type'; export { ServiceIdentifier } from './types/service-identifier.type'; diff --git a/src/types/token-infer-many.type.ts b/src/types/token-infer-many.type.ts new file mode 100644 index 00000000..95cbbb50 --- /dev/null +++ b/src/types/token-infer-many.type.ts @@ -0,0 +1,3 @@ +import { Token } from '../token.class'; + +export type TokenInferMany = T extends Token ? U[] : never; diff --git a/src/types/token-infer.type.ts b/src/types/token-infer.type.ts new file mode 100644 index 00000000..e4d728e7 --- /dev/null +++ b/src/types/token-infer.type.ts @@ -0,0 +1,3 @@ +import { Token } from '../token.class'; + +export type TokenInfer = T extends Token ? U : never;