Hello,前端新手,刚学typescript。在使用Zustand做状态管理,使用正常。但是学习Zustand代码里,发现如下代码:
type SetStateInternal<T> = {
_(
partial: T | Partial<T> | { _(state: T): T | Partial<T> }['_'],
replace?: boolean | undefined
): void
}['_']
这一段里,{ _( ) : void} [' _ ']是什么语法啊,怎么解读啊?