Documentation / @agentick/core / isProcedure
Function: isProcedure() ​
isProcedure(
value):value is Procedure<any, false>
Defined in: kernel/src/procedure.ts:129
Check if a value is a Procedure using Symbol branding.
This is more reliable than duck typing because it uses a unique Symbol that can only be present on objects created by the procedure system.
Parameters ​
value ​
any
The value to check
Returns ​
value is Procedure<any, false>
True if the value is a branded Procedure
Example ​
typescript
const proc = createProcedure(async (x: number) => x * 2);
isProcedure(proc); // true
isProcedure(() => {}); // false
isProcedure({ use: () => {} }); // false (duck typing would say true)