fix: document DefaultExpiredAt and remove dead example code#204
Conversation
PR ReviewThis is a small, focused cleanup PR. Both changes are appropriate and overall quality is good. DefaultExpiredAt value change (workflow.ts:13) The JSDoc is clear and well-grounded in backend behavior. Switching to 0 aligns with protobuf zero-value semantics — good call. One minor nit: the import ordering. After the change, line 13 is the export const DefaultExpiredAt = 0;
import { WorkflowStatus, WorkflowProps, InputVariables } from '@avaprotocol/types';Imports are hoisted so this works, but it's non-standard and easy to miss. Since the line is already being touched in this PR, worth moving that import up to join the others at lines 1-7. Also: Dead code removal (examples/example.ts) Clean and correct. The removed block was a commented-out TODO referencing functions ( Summary
|
Summary
-1to0with JSDoc explaining the semantic. The backend (executor.go:554) only enforces expiration whenexpiredAt > 0, so any value<= 0means "never expire".0is cleaner as it matches the protobuf zero value.createInputData/extractInputData/hasInputDatahelper functions that were never implemented. The plain object approach below them works fine.Closes #199, closes #200
Test plan
yarn buildsucceeds0and-1are both treated as "never expire" by the backend