Factory type

工厂描述泛型工厂函数签名。 此类型是泛型参数:<

type Factory<Type, Initial> = (initialValue: Initial extends true ? Type : Type) => Type