collapse
Function: collapse()
collapse(
selected,requested,operationIds):Scope
Defined in: packages/core/src/session/scope.ts:123
Turn a selection of operations back into a scope: a requested glob whose operations are all selected is kept as a
glob (operations added later stay covered). Otherwise, when the request covers the operation group (<Group>.*,
the id up to its first .) and every operation of that group is selected, the group glob is used, so a broad
request (*) does not turn into a list of every operation id. Otherwise the selected ids are listed. Never widens
the request.
Parameters
selected
string[]
selected operation ids
requested
requested scope
operationIds
string[]
operations the user may call
Returns
scope (without offline_access)