Closed cowwoc closed 3 years ago
gulp-babel: 8.0.0 @types/gulp-babel: 6.1.29
The typescript definition file contains:
declare function babel(options?: { filename?: string, filenameRelative?: string, presets?: string[], plugins?: string[], highlightCode?: boolean, only?: string | string[], ignore?: string | string[], auxiliaryCommentBefore?: any, auxiliaryCommentAfter?: any, sourceMaps?: any, inputSourceMap?: any, sourceMapTarget?: any, sourceFileName?: any, sourceRoot?: any, moduleRoot?: any, moduleIds?: any, moduleId?: any, getModuleId?: any, resolveModuleSource?: any, keepModuleIdExtesions?: boolean, code?: boolean, ast?: boolean, compact?: any, comments?: boolean, shouldPrintComment?: any, env?: any, retainLines?: boolean }): NodeJS.ReadWriteStream;
Notice that presets is expected to be a string[] but according to https://babeljs.io/docs/en/options they should be a PresetEntry[] where PresetEntry is a EntryTarget | [EntryTarget, EntryOptions] | [EntryTarget, EntryOptions, string] | ConfigItem.
string[]
PresetEntry[]
PresetEntry
EntryTarget | [EntryTarget, EntryOptions] | [EntryTarget, EntryOptions, string] | ConfigItem
This should be reported to https://github.com/DefinitelyTyped/DefinitelyTyped, the TS types are not maintained in this repository.
gulp-babel: 8.0.0 @types/gulp-babel: 6.1.29
The typescript definition file contains:
Notice that presets is expected to be a
string[]
but according to https://babeljs.io/docs/en/options they should be aPresetEntry[]
wherePresetEntry
is aEntryTarget | [EntryTarget, EntryOptions] | [EntryTarget, EntryOptions, string] | ConfigItem
.