Skip to content

Commit 64f0122

Browse files
committed
edit
1 parent b9c968b commit 64f0122

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

articles/azure-functions/functions-add-output-binding-storage-queue-vs-code.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Now, you can add the storage output binding to your project.
104104

105105
## Add an output binding
106106

107-
::: zone pivot="programming-language-javascript,programming-language-typescript"
107+
::: zone pivot="programming-language-javascript"
108108

109109
To write to an Azure Storage queue:
110110

@@ -124,6 +124,27 @@ To write to an Azure Storage queue:
124124
:::code language="javascript" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli-v4-programming-model/src/functions/httpTrigger1.js" range="3-6":::
125125
::: zone-end
126126

127+
128+
::: zone pivot="programming-language-typescript"
129+
130+
To write to an Azure Storage queue:
131+
132+
* Add an `extraOutputs` property to the binding configuration
133+
134+
```typescript
135+
{
136+
methods: ['GET', 'POST'],
137+
extraOutputs: [sendToQueue], // add output binding to HTTP trigger
138+
authLevel: 'anonymous',
139+
handler: () => {}
140+
}
141+
```
142+
143+
* Add a `output.storageQueue` function above the `app.http` call
144+
145+
:::code language="typescript" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli-v4-programming-model-v4/src/functions/httpTrigger1.ts" range="10-13":::
146+
::: zone-end
147+
127148
::: zone pivot="programming-language-powershell"
128149

129150
In Functions, each type of binding requires a `direction`, `type`, and unique `name`. The way you define these attributes depends on the language of your function app.

includes/functions-add-output-binding-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ To write to an Azure Storage queue:
7676

7777
* Add a `output.storageQueue` function above the `app.http` call
7878

79-
:::code language="javascript" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli-v4-programming-model/src/functions/httpTrigger1.js" range="3-6":::
79+
:::code language="typescript" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli-v4-programming-model-ts/src/functions/httpTrigger1.ts" range="10-13":::
8080

8181
::: zone-end
8282
::: zone pivot="programming-language-powershell"

0 commit comments

Comments
 (0)