diff --git a/packages/sequelize/src/lib/types.ts b/packages/sequelize/src/lib/types.ts new file mode 100644 index 000000000..e69de29bb diff --git a/packages/types/src/plugin.ts b/packages/types/src/plugin.ts index e99d05b8a..44d3cbfb2 100644 --- a/packages/types/src/plugin.ts +++ b/packages/types/src/plugin.ts @@ -54,6 +54,17 @@ export interface MapPlugin { destinationObj?: TDestination ): [sourceInstance: TSource, destinationInstance: TDestination]; + /** + * An optional post-map function to post-process the destination after map + * + * @param destination - a key to be used to identify the information about a particular Destination + * @param destinationObj - a plain object that takes the shape of the destination + */ + postMap? = any>( + destination: TKey, + destinationObj?: TDestination + ): TDestination; + /** * An optional pre-mapArray function to prepare the sourceArray before mapArray *