[react-tracking] Export additional interfaces (#35425)

This commit is contained in:
Christopher Pappas
2019-05-14 18:23:26 +02:00
committed by Eloy Durán
parent e5bde27b60
commit 7e1f1b03d4
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ export interface TrackingProp {
type Falsy = false | null | undefined | "";
interface Options<T> {
export interface Options<T> {
/**
* By default, data tracking objects are pushed to `window.dataLayer[]`. This is a good default if you use Google
* Tag Manager. You can override this by passing in a dispatch function as a second parameter to the tracking
@@ -56,7 +56,7 @@ export type TrackingInfo<T, P, S> = T | ((props: P, state: S, args: any[any]) =>
// through a JSX component that be used without casting.
type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction;
type MethodDecorator = <T>(target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
type Decorator = ClassDecorator & MethodDecorator;
export type Decorator = ClassDecorator & MethodDecorator;
/**
* This is the type of the `track` function. It’s declared as an interface so that consumers can extend the typing and
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Track, track as _track, TrackingProp } from 'react-tracking';
import { Track, track as _track, TrackingProp, Options, Decorator } from 'react-tracking';
function customEventReporter(data: { page?: string }) {}