Add type for `managedObjectStore` in the factory