migrateToCollectionKey

Function

Function that can migrate a legacy search category to a wellknown collection key. Useful when the caller has an unknown value that could either be a search category or wellknown collection.

If the value passed is not a search category, it is returned as-is.

Parameters

Parameter Type Default Notes
collectionOrSearchCategory Required LegacySearchCategory | WellKnownCollection

key to be migrated

Returns

the migrated wellknown collection key

Property Type Notes

Function defined in common/src/search/utils.ts:279