From 60abe2f5d8ecf2d53e718d6820227bb88dda6378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Tue, 6 Sep 2022 23:29:07 +0200 Subject: [PATCH] feat(typings): allow to preserve config type --- src/next-transpile-modules.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/next-transpile-modules.js b/src/next-transpile-modules.js index 2fa8a49..164350e 100644 --- a/src/next-transpile-modules.js +++ b/src/next-transpile-modules.js @@ -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;