Skip to content

Publish types package for core api #567

Open
@ejizba

Description

@ejizba

This work is partially done already, but we are open to changes so I want an issue for potential feedback and to track any remaining work.

The main idea is that we want users to provide information (i.e. hooks and functions) programmatically, meaning we need to define an API in which they can do that. As a part of the hooks feature, we settled on a "built-in" module named @azure/functions-core. See here for some more background. Here is example usage as described in #548:

import { registerHook } from '@azure/functions-core';

registerHook('preInvocation', (context: PreInvocationContext) => {

});

The main alternative we have considered is for the user to return hooks/functions in a startup file as a module export. Example usage described here.

Remaining work

  • Create and publish a @types/azure_functions-core package
  • Improve es modules support. Currently users have to use require instead of import (workaround here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions