1
0
mirror of https://github.com/svg/svgo.git synced 2025-08-09 02:22:08 +03:00

fix: fix loadConfig types (#2122)

This commit is contained in:
ntnyq
2025-05-06 14:13:05 +08:00
committed by GitHub
parent 60cbbcce9b
commit 52c09479e9

View File

@@ -37,7 +37,7 @@ export * from './svgo.js';
* You can also specify relative or absolute path and customize current working * You can also specify relative or absolute path and customize current working
* directory. * directory.
* *
* @type {<T extends string>(configFile: T | null, cwd?: string) => Promise<T extends string ? import('./svgo.js').Config : import('./svgo.js').Config | null>} * @type {<T extends string>(configFile?: T | null, cwd?: string) => Promise<T extends string ? import('./svgo.js').Config : import('./svgo.js').Config | null>}
*/ */
export const loadConfig = async (configFile, cwd = process.cwd()) => { export const loadConfig = async (configFile, cwd = process.cwd()) => {
if (configFile != null) { if (configFile != null) {