Skip to content

Make nodeId available to NodeFunction #9

@kenvunz

Description

@kenvunz

Hi there, first thing first, I somehow stumbled upon your library, and man oh man, it's exactly what I need for my project. So thank you so much for putting time and effort into this library.

I noticed the NodeFunction does not have the nodeId passed to the arguments like NodeClass. Is it intentional? If not, I'm happy to submit a PR to patch it.

no nodeId in NodeFunction argument

type NodeFunction<
   TContext = Record<string, any>,
   TDependencies = RuntimeDependencies,
   TInput = any,
   TOutput = any,
   TAction extends string = string,
 > = (context: NodeContext<TContext, TDependencies, TInput>) => Promise<NodeResult<TOutput, TAction>>

nodeId in NodeClass constructor

type NodeClass<
   TContext = Record<string, any>,
   TDependencies = RuntimeDependencies,
   TInput = any,
   TOutput = any,
   TAction extends string = string,
 > = new (params?: Record<string, any>, nodeId?: string) => BaseNode<TContext, TDependencies, TInput, TOutput, TAction>

Cheers,
Ken

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions