-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Description
TypeScript Version: 3.5.1
Search Terms:
Code
declare function fn (a: string, b: string, ...c: string[]): void
declare const foo: [string, string, ...string[]]
declare const bar: string[]
fn(...foo) // ok
fn(...foo, ...bar) // error
fn(...foo, ...foo) // error
fn(...bar, ...foo) // error
Expected behavior:
No errors
Actual behavior:
Expected at least 2 arguments, but got 1 or more
Playground Link: link
Related Issues:
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript