Skip to content

Commit d4d8b16

Browse files
committed
fix(policy): restore Policy typedef import in policy-validators (addresses Jonathan review)
In ccc1b5e the `Policy` typedef import in policy-validators.js was dropped alongside the dead `collectReferencedOperations` function — but `validatePolicy` still uses `@param {Policy}`. The hand-edited `policy-validators.d.ts` carries `export type Policy = …`, but a fresh `npm run build:types` (pinned tsc 5.8.3) regenerates it without that export, leaving the param type unresolved. Re-adding the typedef makes `build:types` reproduce the committed `policy-validators.d.ts` byte-for-byte (verified locally). Catch by jonathunne: #55 (comment)
1 parent ccc1b5e commit d4d8b16

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/policy/policy-validators.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
registerOptionsSchema
2525
} from './policy-schemas.js'
2626

27+
/** @typedef {import('./policy-engine.js').Policy} Policy */
2728
/** @typedef {import('./policy-engine.js').PolicyRule} PolicyRule */
2829
/** @typedef {import('./policy-engine.js').RegisterPolicyOptions} RegisterPolicyOptions */
2930

0 commit comments

Comments
 (0)