From 7e1f1b03d4fd174c4188a7d73725e2de41ce00d7 Mon Sep 17 00:00:00 2001 From: Christopher Pappas Date: Tue, 14 May 2019 06:23:26 -1000 Subject: [PATCH] [react-tracking] Export additional interfaces (#35425) --- types/react-tracking/index.d.ts | 4 ++-- types/react-tracking/test/react-tracking-with-types-tests.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/react-tracking/index.d.ts b/types/react-tracking/index.d.ts index c0e4571bd5..305cb03895 100644 --- a/types/react-tracking/index.d.ts +++ b/types/react-tracking/index.d.ts @@ -17,7 +17,7 @@ export interface TrackingProp { type Falsy = false | null | undefined | ""; -interface Options { +export interface Options { /** * 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 | ((props: P, state: S, args: any[any]) => // through a JSX component that be used without casting. type ClassDecorator = (target: TFunction) => TFunction; type MethodDecorator = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor; -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 diff --git a/types/react-tracking/test/react-tracking-with-types-tests.tsx b/types/react-tracking/test/react-tracking-with-types-tests.tsx index a840216af0..ec4c2d9ed7 100644 --- a/types/react-tracking/test/react-tracking-with-types-tests.tsx +++ b/types/react-tracking/test/react-tracking-with-types-tests.tsx @@ -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 }) {}