Skip to content

Bomret/azure-functions-typedefinitions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Functions Type Definitions

npm npm

These are Typescript type definitions that were extracted from the official Azure Functions Nodejs Worker repository on GitHub.

Current state: 2018-06-07

Install

npm i -D azure-functions-typedefinitions

Usage

import { IHttpContext, HttpRequest } from "azure-functions-typedefinitions";

export function run(context: IHttpContext, req: HttpRequest): void {
  context.log.info("Hello from a typed function!");

  const resBody = {
    invocationId: context.invocationId,
    name: context.executionContext.functionName,
    startTimeUtc: context.bindingData.sys.utcNow
  };

  context.res.status(200).json(resBody);
}