mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
Types for small Azure Functions helper: https://github.com/BrianRosamilia/azure-function-log-intercept https://github.com/Azure/Azure-Functions/issues/1396 Thanks!
18 lines
864 B
TypeScript
18 lines
864 B
TypeScript
// Type definitions for azure-function-log-intercept 1.0
|
|
// Project: https://github.com/BrianRosamilia/azure-function-log-intercept
|
|
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
import { Context } from '@azure/functions';
|
|
|
|
/**
|
|
* `console.log` doesn't actually log as you would expect in `node.js` Azure Functions.
|
|
* You are expected to use `context.log` and` context` is not a global object, it's a parameter to your Azure Function
|
|
* so you would have to pass this throughout your modules/functions to get logging like you would expect.
|
|
* This package fixes this with minimal friction, 0 dependencies, and allows you
|
|
* to use `console.log` (and other `console` methods) like normal.
|
|
*/
|
|
declare function intercept(context: Context): void;
|
|
|
|
export = intercept;
|