Arrays in Typescript do not automatically convert to tuple types. You have the option to explicitly define the type, or you can simplify it by using a helper function that still allows for some inference.
const tuple = <T extends [any] | any[]>(args: T): T => args
tuple(["A", "B"]) // [string, string]
Update
As of version 3.4, you can also utilize an as const
assertion. This removes the need for an additional function but restricts the tuple to being read-only:
var t = [1, ''] as const;
t[0] = 1 //err
Starting from version 3.0, tuples can be inferred using rest parameters:
const tuple = <T extends any[]>(...args: T): T => args
tuple("A", "B") // [string, string]