mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix(api): apply feedback + enhance typing
This commit is contained in:
parent
027d610578
commit
d2b9c1248c
@ -36,11 +36,10 @@ type buildTestingMocksProps<
|
|||||||
| {
|
| {
|
||||||
providers: NonNullable<P>;
|
providers: NonNullable<P>;
|
||||||
controllers: NonNullable<C>;
|
controllers: NonNullable<C>;
|
||||||
autoInjectFrom?: 'all'[];
|
autoInjectFrom: 'all'[];
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
providers: NonNullable<P>;
|
providers: NonNullable<P>;
|
||||||
controllers?: undefined;
|
|
||||||
autoInjectFrom?: 'providers'[];
|
autoInjectFrom?: 'providers'[];
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
@ -188,7 +187,7 @@ export const buildTestingMocks = async ({
|
|||||||
? [
|
? [
|
||||||
MongooseModule.forFeature([
|
MongooseModule.forFeature([
|
||||||
...getModels(models),
|
...getModels(models),
|
||||||
...(!!autoInjectFrom
|
...(autoInjectFrom
|
||||||
? getNestedModels(nestedProviders, 'Repository')
|
? getNestedModels(nestedProviders, 'Repository')
|
||||||
: []),
|
: []),
|
||||||
]),
|
]),
|
||||||
|
Loading…
Reference in New Issue
Block a user