(
value: boolean | undefined,
defaultValue: boolean,
)
| 102 | }) => { |
| 103 | // Spec defaults: readOnlyHint=false, destructiveHint=true, idempotentHint=false, openWorldHint=true |
| 104 | const getValueAndImplied = ( |
| 105 | value: boolean | undefined, |
| 106 | defaultValue: boolean, |
| 107 | ): { value: boolean; implied: boolean } => ({ |
| 108 | value: value ?? defaultValue, |
| 109 | implied: value === undefined, |
| 110 | }); |
| 111 | |
| 112 | const readOnly = getValueAndImplied(annotations?.readOnlyHint, false); |
| 113 | const destructive = getValueAndImplied(annotations?.destructiveHint, true); |