mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-28 11:10:12 +08:00
refactor(@ngtools/webpack): adjust types to support strict mode
This commit is contained in:
parent
e852b62fce
commit
823a8beaa3
@ -18,7 +18,7 @@ export function workaroundResolve(path: Path | string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function flattenArray<T>(value: Array<T | T[]>): T[] {
|
export function flattenArray<T>(value: Array<T | T[]>): T[] {
|
||||||
return [].concat.apply([], value);
|
return ([] as T[]).concat.apply([], value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TS represents paths internally with '/' and expects paths to be in this format.
|
// TS represents paths internally with '/' and expects paths to be in this format.
|
||||||
|
@ -60,7 +60,7 @@ export class VirtualFileSystemDecorator implements InputFileSystem {
|
|||||||
(this._inputFileSystem as any).readJson(path, callback);
|
(this._inputFileSystem as any).readJson(path, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
readlink(path: string, callback: (err: Error, linkString: string) => void): void {
|
readlink(path: string, callback: (err: Error | null | undefined, linkString: string) => void): void {
|
||||||
this._inputFileSystem.readlink(path, callback);
|
this._inputFileSystem.readlink(path, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user