I've been finding TypeScript generics quite handy, though C++ has made me wary of going too far with templating. Nesting templates can lead to ridiculously unreadable code and awkwardly stretching a template function or class to do way more than one should do just so you can instance().
Today, I found myself writing this:
import type { ThingStore } from './store-types';
type StoreCtor = (object, T) => ThingStore
export function StoreIssuer(state, createStore: StoreCtor) {
...
I think that isn't going too far, but I am going to try to draw the line at two levels of nesting.