Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@narando/event-types

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@narando/event-types

Helps handle narando events type safe.

  • 0.36.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@narando/event-types

Helps handle narando events type safe.

Related packages are @narando/event-consumer and @narando/event-producer.

Getting Started

You need to have nodejs and npm installed.

$ npm install @narando/event-types

Usage

import {
  NarandoEvent,
  ArticleCreatedSoundFileEvent,
  isArticleCreatedSoundFileEvent,
} from "@narando/event-types";

// Use type predicated to select specific events
function handleEvent(event: NarandoEvent) {
  if (isArticleCreatedSoundFileEvent(event)) {
    // event is ArticleCreatedSoundFileEvent
    event.msg.target.soundFileId;
  }

  // event is generic NarandoEvent
}

// Type-safe event handling
function handleArticleCreatedSoundFileEvent(
  event: ArticleCreatedSoundFileEvent
) {}

Development

As this package is part of the toolkit monorepo, please refer to the top-level README to learn about hacking on this package.

FAQs

Package last updated on 27 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc