@@ -38,7 +38,7 @@ export type StrictSchema<Target = any, Source = any> = {
38
38
| ActionFunction < Target , Source , Target [ destinationProperty ] >
39
39
| ActionAggregator < Source >
40
40
| ActionSelector < Source , Target [ destinationProperty ] >
41
- | StrictSchema < Target [ destinationProperty ] , Source >
41
+ | StrictSchema < Target [ destinationProperty ] , Source > ;
42
42
} & { [ SCHEMA_OPTIONS_SYMBOL ] ?: SchemaOptions < Target > } ;
43
43
export type Schema < Target = any , Source = any > = {
44
44
/** `destinationProperty` is the name of the property of the target object you want to produce */
@@ -47,7 +47,7 @@ export type Schema<Target = any, Source = any> = {
47
47
| ActionFunction < Target , Source , Target [ destinationProperty ] >
48
48
| ActionAggregator < Source >
49
49
| ActionSelector < Source , Target [ destinationProperty ] >
50
- | Schema < Target [ destinationProperty ] , Source >
50
+ | Schema < Target [ destinationProperty ] , Source > ;
51
51
} & { [ SCHEMA_OPTIONS_SYMBOL ] ?: SchemaOptions < Target | any > } ;
52
52
53
53
export type Actions < Target , Source > = ActionFunction < Target , Source > | ActionAggregator | ActionString < Target > | ActionSelector < Source > ;
@@ -172,6 +172,6 @@ export type DestinationFromSchema<T> = T extends StrictSchema<infer U> | Schema<
172
172
export type ResultItem < TSchema extends Schema > = DestinationFromSchema < TSchema > ;
173
173
174
174
export interface Mapper < TSchema extends Schema | StrictSchema , TResult = ResultItem < TSchema > > {
175
- ( data : SourceFromSchema < TSchema > [ ] ) : TResult [ ] ;
176
- ( data : SourceFromSchema < TSchema > ) : TResult ;
175
+ ( data ? : SourceFromSchema < TSchema > [ ] | null ) : TResult [ ] ;
176
+ ( data ? : SourceFromSchema < TSchema > | null ) : TResult ;
177
177
}
0 commit comments