Convert gulp files to ts

For #277526

Had to add a few ugly casts in difficult cases but mostly trying to add proper types
This commit is contained in:
Matt Bierner
2025-11-21 15:38:55 -08:00
parent 538db6134e
commit fcfb37c8f8
17 changed files with 217 additions and 274 deletions

View File

@@ -209,7 +209,7 @@ function bundleESMTask(opts: IBundleESMTaskOpts): NodeJS.ReadWriteStream {
}));
}
export interface IBundleESMTaskOpts {
export interface IBundleTaskOpts {
/**
* Destination folder for the bundled files.
*/
@@ -220,7 +220,7 @@ export interface IBundleESMTaskOpts {
esm: IBundleESMTaskOpts;
}
export function bundleTask(opts: IBundleESMTaskOpts): () => NodeJS.ReadWriteStream {
export function bundleTask(opts: IBundleTaskOpts): () => NodeJS.ReadWriteStream {
return function () {
return bundleESMTask(opts.esm).pipe(gulp.dest(opts.out));
};

15
build/lib/typings/gulp-gunzip.d.ts vendored Normal file
View File

@@ -0,0 +1,15 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'gulp-gunzip' {
import type { Transform } from 'stream';
/**
* Gunzip plugin for gulp
*/
function gunzip(): Transform;
export = gunzip;
}

15
build/lib/typings/gulp-untar.d.ts vendored Normal file
View File

@@ -0,0 +1,15 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'gulp-untar' {
import type { Transform } from 'stream';
/**
* Extract TAR files
*/
function untar(): Transform;
export = untar;
}

5
build/lib/typings/rcedit.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
declare module 'rcedit' {
export default function rcedit(exePath, options, cb): Promise<void>;
}