Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit f4339e4

Browse files
author
Chau Tran
committed
fix: remove "dev" property and use throwError directly
1 parent 529721e commit f4339e4

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/automapper.module.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,13 @@ export class AutomapperModule implements OnModuleInit {
2121
*/
2222
static withMapper(
2323
name?: string,
24-
globalSettings?: AutoMapperGlobalSettings & { dev?: boolean }
25-
): DynamicModule;
26-
static withMapper(
27-
globalSettings?: AutoMapperGlobalSettings & { dev?: boolean }
24+
globalSettings?: AutoMapperGlobalSettings
2825
): DynamicModule;
26+
static withMapper(globalSettings?: AutoMapperGlobalSettings): DynamicModule;
2927
static withMapper(...args: any[]): DynamicModule {
3028
const [name, globalSettings] = getWithMapperArgs(args);
3129
const mapper = new AutoMapper();
3230
if (globalSettings != null) {
33-
globalSettings.throwError =
34-
globalSettings.dev != null ? !globalSettings.dev : undefined;
3531
mapper.withGlobalSettings(globalSettings);
3632
}
3733

src/utils/getWithMapperArgs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { AutoMapperGlobalSettings } from '@nartc/automapper';
22

33
export function getWithMapperArgs(
44
args: any[]
5-
): [string, (AutoMapperGlobalSettings & { dev?: boolean })?] {
5+
): [string, AutoMapperGlobalSettings?] {
66
if (!args.length) {
77
return [''];
88
}

0 commit comments

Comments
 (0)