Socket
Socket
Sign inDemoInstall

@firebase/analytics-types

Package Overview
Dependencies
0
Maintainers
4
Versions
2173
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @firebase/analytics-types

@firebase/analytics Types


Version published
Weekly downloads
1.6M
increased by2.45%
Maintainers
4
Install size
20.7 kB
Created
Weekly downloads
 

Package description

What is @firebase/analytics-types?

The @firebase/analytics-types package provides TypeScript type definitions for Firebase Analytics. This package is primarily used in TypeScript projects to ensure type safety and to facilitate autocompletion and documentation in code editors when working with Firebase Analytics.

What are @firebase/analytics-types's main functionalities?

Event Parameters and Options Types

Defines TypeScript types for event parameters and options when logging events in Firebase Analytics. This helps in ensuring that the parameters and options passed to the logEvent function adhere to the expected structure.

import { EventParams, AnalyticsCallOptions } from '@firebase/analytics-types';

function logEvent(analytics: FirebaseAnalytics, eventName: string, eventParams?: EventParams, options?: AnalyticsCallOptions) {
  analytics.logEvent(eventName, eventParams, options);
}

Analytics Interface

Provides type definitions for the FirebaseAnalytics interface, which includes methods for interacting with Firebase Analytics, such as setting the current screen, logging events, etc. This ensures that all method calls on the analytics object are type-checked.

import { FirebaseAnalytics } from '@firebase/analytics-types';

function setupAnalytics(analytics: FirebaseAnalytics) {
  analytics.setCurrentScreen('homepage');
}

Other packages similar to @firebase/analytics-types

Readme

Source

@firebase/analytics-types

This package is not intended for direct usage, and should only be used via the officially supported firebase package.

FAQs

Last updated on 28 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc