Skip to content

Commit

Permalink
feat(typings): allow to preserve config type
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Sep 6, 2022
1 parent 0d44363 commit 60abe2f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/next-transpile-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ const createWebpackMatcher = (modulesToTranspile, logger = createLogger(false))
* @param {{resolveSymlinks?: boolean, debug?: boolean, __unstable_matcher?: (path: string) => boolean}} options
*/
const withTmInitializer = (modules = [], options = {}) => {
/**
* @template T
* @param { T } nextConfig
* @returns { T | undefined }
*/
const withTM = (nextConfig = {}) => {
if (modules.length === 0) return nextConfig;

Expand Down

0 comments on commit 60abe2f

Please sign in to comment.