@suin/google-cloud-typed-pubsub-function
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@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/

Dependencies (0)

    Dev Dependencies (14)

    Package Sidebar

    Install

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

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    5.53 kB

    Total Files

    5

    Last publish

    Collaborators

    • suin