Skip to content

Fix TypeScript queue trigger sample to use string type instead of unknown#41

Open
ggailey777 wants to merge 1 commit into
Azure:mainfrom
ggailey777:fix-queue-trigger-type
Open

Fix TypeScript queue trigger sample to use string type instead of unknown#41
ggailey777 wants to merge 1 commit into
Azure:mainfrom
ggailey777:fix-queue-trigger-type

Conversation

@ggailey777
Copy link
Copy Markdown

Uses the generic type parameter app.storageQueue<string>(...) added in @azure/functions v4.11.0 to type the queue trigger handler parameter as string instead of unknown. This fixes a usability issue for TypeScript users who can't directly use the queueItem parameter without type narrowing.

Changes

  • storageQueueTrigger1.ts: Changed handler parameter from unknown to string and added <string> generic to app.storageQueue() call.

@ggailey777 ggailey777 requested a review from a team as a code owner May 8, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant