-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Description
One way to define connection to an Event Grid is to use identity based connection, see documentation. However, when dealing with Typescript, the connection property doesn't seem to exist:
Argument of type '{ connection: string; }' is not assignable to parameter of type 'EventGridOutputOptions'.
Sample code:
const eventGridOutput = output.eventGrid({
connection: 'EmailServiceTopic'
})Repro steps
- Create a .ts function
- Install the latest
@azure/functions - Define return function output:
import { app, output } from '@azure/functions';
const eventGridOutput = output.eventGrid({
connection: 'EmailServiceTopic'
})
app.serviceBusQueue('ACSEmailMessageQueueTrigger', {
connection: 'ServiceBusEmailQueue',
queueName: 'emailservice-queue',
return: eventGridOutput,
handler: ....
})Expected behavior
EventGridOutputOptions type should contain connection property.
Actual behavior
Argument of type '{ connection: string; }' is not assignable to parameter of type 'EventGridOutputOptions'.
Known workarounds
Use Javascript instead of Typescript or suppress TS warnings.
Related information
NodeJS version 18.x
@azure/functions 4.0.1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working