Extract the core provider creation into a private static helper method so both sync and async configuration paths produce the same set of providers. This prevents duplication and keeps both paths in sync when core providers change.
Single source of truth — adding or removing a core provider only requires changing the helper.
Both sync and async paths stay automatically synchronized.
Reduces code duplication and the risk of the two paths drifting apart over time.
This is the pattern used inside NestJS framework modules like @nestjs/throttler.