TypeScript Version: 2.1.4
Code
const _ = require('lodash');
export function appendFile($lines: string | Array<string>) : Observable<any> {
let lines : Array<string> = _.flattenDeep([$lines]);
}
Expected behavior:
This should compile as far as I know.
Actual behavior:
I get this compile error:
lib/queue-proto.ts(84,9): error TS2322: Type '(string | string[])[]' is not assignable to type 'string | string[]'.
Type '(string | string[])[]' is not assignable to type 'string[]'.
Type 'string | string[]' is not assignable to type 'string'.
Type 'string[]' is not assignable to type 'string'.
TypeScript Version: 2.1.4
Code
Expected behavior:
This should compile as far as I know.
Actual behavior:
I get this compile error: