I need to describe such a signature so that all types of arguments(before options) are provide into generic of the last argument. Now it looks like this:
public error<Messages extends any[], FormatReturn>(
...messages: [...Messages, LoggerOptions<Messages, FormatReturn>]
): void;
In the signature of the method itself, you can see that the types are provided
But in the parameter of the LoggerOptions themselves the type is unknown
At the same time, if you change the signature a little and explicitly provide the type, then everything works:
public error<Messages extends any[], FormatReturn>(
options: LoggerOptions<string | number, FormatReturn>,
...messages: Messages
): void;


