POP, Generics, Associated Types, and Ponies

I’m sorry, my mistake. It looks like you will need a non-generic wrapper for now, even if that wrapper doesn’t do anything:

struct AccountLoading {
  var inner: any TypeLoading<[Account]>
}

let typedAccountLoader = Factory<AccountLoading> {
  AccountLoading(inner: NetworkLoading("api/accounts"))
}

Not ideal, but possibly still better than repeating the protocol?

1 Like