Skip to content

Improve hooks naming convention #50

@WebReflection

Description

@WebReflection

Hooks are great but not super user-friendyl to deal with so we discussed a way to better separate their namespace.

Proposal

  • split hooks into main and worker
  • use onReady for both cases:
    • on main it means onInterpreterReady: there is an interpreter and it's just about to run its code
    • on worker it means the xworker dance has been completed and all the features to enrich the worker world are available out of the box
  • use main.onBeforeRun, main.onBeforeRunAsync, main.onAfterRun and main.onAfterRunAsync
  • use worker.codeBeforeRun, worker.codeBeforeRunAsync, worker.codeAfterRun and worker.codeAfterRunAsync

This should both help understanding the different nature of the main VS worker fields + it clears out hooks that requires strings as code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions