Enable strict compilation settings in git extension

Enables strict checks in the git extensions
This commit is contained in:
Matt Bierner
2017-11-06 11:38:30 -08:00
parent 00ca96b766
commit b743e245ad
7 changed files with 17 additions and 16 deletions

View File

@@ -84,7 +84,7 @@ export function once(fn: (...args: any[]) => any): (...args: any[]) => any {
};
}
export function assign<T>(destination: T, ...sources: any[]): T {
export function assign<T>(destination: T, ...sources: (keyof T)[]): T {
for (const source of sources) {
Object.keys(source).forEach(key => destination[key] = source[key]);
}
@@ -115,12 +115,12 @@ export function groupBy<T>(arr: T[], fn: (el: T) => string): { [key: string]: T[
}, Object.create(null));
}
export function denodeify<R>(fn: Function): (...args) => Promise<R> {
return (...args) => new Promise<R>((c, e) => fn(...args, (err, r) => err ? e(err) : c(r)));
export function denodeify<R>(fn: Function): (...args: any[]) => Promise<R> {
return (...args) => new Promise<R>((c, e) => fn(...args, (err: any, r: any) => err ? e(err) : c(r)));
}
export function nfcall<R>(fn: Function, ...args): Promise<R> {
return new Promise<R>((c, e) => fn(...args, (err, r) => err ? e(err) : c(r)));
export function nfcall<R>(fn: Function, ...args: any[]): Promise<R> {
return new Promise<R>((c, e) => fn(...args, (err: any, r: any) => err ? e(err) : c(r)));
}
export async function mkdirp(path: string, mode?: number): Promise<boolean> {