ReturnType extracts return type of a function.
Is there a way to define ArgumentsType that extracts parameter types of a
Expanding on @Titian Cernicova-Dragomir's answer, if you are using named function expressions, thus not being able to define a type, you can access the parameters with typeof like so:
function updateTable(
diff: Diff,
cache: { [id: string]: Table> & IHasOBJECT_ID & IHasCONFLICTS & IHasOPTIONS },
) {
// Use typeof to get the parameter type for cache
const cacheItem: Parameters[1] = cache[diff.id];
// ...
}