app/v3/cosmosDBTriggerAndOutput/index.ts (9 lines of code) (raw):

// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. import { AzureFunction, Context } from '@azure/functions'; const cosmosDBTrigger: AzureFunction = async function (context: Context, documents: any[]): Promise<any[]> { context.log(`cosmosDBTriggerAndOutput processed ${documents.length} documents`); for (const document of documents) { context.log(`cosmosDBTriggerAndOutput was triggered by "${document.testData}"`); } return documents; }; export default cosmosDBTrigger;