Format registry compatibility helpers
This commit is contained in:
parent
21a79d6076
commit
0f769c86b3
@ -41,7 +41,9 @@ function getOwnLegacyCompatFields(params: unknown): LegacyCompatFieldName[] {
|
||||
if (!params || typeof params !== "object") {
|
||||
return [];
|
||||
}
|
||||
return LEGACY_COMPAT_FIELDS.filter((field) => Object.prototype.hasOwnProperty.call(params, field));
|
||||
return LEGACY_COMPAT_FIELDS.filter((field) =>
|
||||
Object.prototype.hasOwnProperty.call(params, field),
|
||||
);
|
||||
}
|
||||
|
||||
function hasOwnLegacyCompatFields(params: unknown): params is SessionKeyCompatParams {
|
||||
@ -178,7 +180,9 @@ function isLegacyCompatFieldCompatibilityError(
|
||||
}
|
||||
|
||||
function collectLegacyCompatRejectedFields(error: unknown): LegacyCompatFieldName[] {
|
||||
return LEGACY_COMPAT_FIELDS.filter((field) => isLegacyCompatFieldCompatibilityError(error, field));
|
||||
return LEGACY_COMPAT_FIELDS.filter((field) =>
|
||||
isLegacyCompatFieldCompatibilityError(error, field),
|
||||
);
|
||||
}
|
||||
|
||||
async function invokeWithLegacySessionKeyCompat<TResult, TParams extends SessionKeyCompatParams>(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user