Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@suin/google-cloud-typed-pubsub-function

suin14MIT1.0.0TypeScript support: included

Strongly typed Google Cloud Function interface of the Pub/Sub handler for TypeScript

google cloud, google cloud functions, google cloud pubsub, interface, node

readme

@suin/google-cloud-typed-pubsub-function

Strongly typed Google Cloud Function interface of the Pub/Sub handler for TypeScript.

Installation

yarn add @suin/google-cloud-typed-pubsub-function
# or
npm install @suin/google-cloud-typed-pubsub-function

Usage

import { PubSubFunction } from '@suin/google-cloud-typed-pubsub-function'

export const receiveEvent: PubSubFunction = (event, context) => {
  event.data // string
  event.attributes // null or object
  context.eventType // string
  context.eventId // string
  context.timestamp // string
}

API Reference

https://suin.github.io/google-cloud-typed-pubsub-function/

changelog

1.0.0 (2020-07-24)

Features