Type utility to merge extensions properly when chaining. If T already has extensions, merge them; otherwise add new extensions.
// Chaining multiple extensions preserves all types:const client = withBazaar(withOtherExtension(new HTTPFacilitatorClient()));// Type: HTTPFacilitatorClient & { extensions: OtherExtension & BazaarExtension } Copy
// Chaining multiple extensions preserves all types:const client = withBazaar(withOtherExtension(new HTTPFacilitatorClient()));// Type: HTTPFacilitatorClient & { extensions: OtherExtension & BazaarExtension }
Type utility to merge extensions properly when chaining. If T already has extensions, merge them; otherwise add new extensions.