-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
SNiTEBoBy/TypeScript
#5Labels
Needs More InfoThe issue still hasn't been fully clarifiedThe issue still hasn't been fully clarifiedQuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
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'.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs More InfoThe issue still hasn't been fully clarifiedThe issue still hasn't been fully clarifiedQuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code