GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-nodejs

Missing typings for event functions?

Open
#286 5 comments 3 reactions 0 assignees View on GitHub
enhancement P3
Dominant language
TypeScript
Stars
1.4k
Forks
181
PR merge metrics
No merged PRs in 30d

Description

Hi there!
I'm trying to write a cloud functions project in typescript. The project has typings for http trigger functions available in the functions.ts under the HttpFunction type. These are very useful as they provide the necessary express types for the request and response objects

However when trying to write an event function triggered by a pub/sub message, for example, there is only the EventFunction type, however the data parameter is missing relevant properties for pub/sub triggers, storage triggers, etc

Contributor guide

Open the contributing guide

Research direction

Start in functions.ts by comparing the existing HttpFunction typings with EventFunction. Identify the missing data properties needed for Pub/Sub and storage triggers, then verify that TypeScript cloud-functions projects can use those trigger-specific properties through the event function types.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
backend, cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.