mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
[react-tracking] Export additional interfaces (#35425)
This commit is contained in:
committed by
Eloy Durán
parent
e5bde27b60
commit
7e1f1b03d4
Vendored
+2
-2
@@ -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 }) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user