mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Git - remove the usages of any (#270179)
* Git - remove the usages of `any` * Remove debug message
This commit is contained in:
@@ -42,11 +42,6 @@ export function combinedDisposable(disposables: IDisposable[]): IDisposable {
|
||||
|
||||
export const EmptyDisposable = toDisposable(() => null);
|
||||
|
||||
export function fireEvent<T>(event: Event<T>): Event<T> {
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
return (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]) => event(_ => (listener as any).call(thisArgs), null, disposables);
|
||||
}
|
||||
|
||||
export function mapEvent<I, O>(event: Event<I>, map: (i: I) => O): Event<O> {
|
||||
return (listener: (e: O) => any, thisArgs?: any, disposables?: Disposable[]) => event(i => listener.call(thisArgs, map(i)), null, disposables);
|
||||
}
|
||||
@@ -115,8 +110,8 @@ export function once(fn: (...args: any[]) => any): (...args: any[]) => any {
|
||||
|
||||
export function assign<T>(destination: T, ...sources: any[]): T {
|
||||
for (const source of sources) {
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
Object.keys(source).forEach(key => (destination as any)[key] = source[key]);
|
||||
Object.keys(source).forEach(key =>
|
||||
(destination as Record<string, unknown>)[key] = source[key]);
|
||||
}
|
||||
|
||||
return destination;
|
||||
|
||||
Reference in New Issue
Block a user