Skip to content

Commit 87429b5

Browse files
committed
fix(types): widen gateway method row policy
1 parent 85f44b7 commit 87429b5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎src/gateway/methods/core-descriptors.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,16 +486,17 @@ export type CoreGatewayHandlerFamily = Exclude<(typeof CORE_GATEWAY_METHOD_SPECS
486486
const CORE_GATEWAY_METHOD_SPEC_LIST: readonly CoreGatewayMethodSpec[] =
487487
CORE_GATEWAY_METHOD_SPECS.map(([name, family, scope, since, policy]) => {
488488
const spec: CoreGatewayMethodSpec = { name, scope, since };
489+
const normalizedPolicy: CoreGatewayMethodPolicy | undefined = policy;
489490
if (family) {
490491
spec.family = family;
491492
}
492-
if (policy?.advertise === false) {
493+
if (normalizedPolicy?.advertise === false) {
493494
spec.advertise = false;
494495
}
495-
if (policy?.startup === true) {
496+
if (normalizedPolicy?.startup === true) {
496497
spec.startup = true;
497498
}
498-
if (policy?.controlPlaneWrite === true) {
499+
if (normalizedPolicy?.controlPlaneWrite === true) {
499500
spec.controlPlaneWrite = true;
500501
}
501502
return spec;

0 commit comments

Comments
 (0)