Skip to content

Commit

Permalink
fix: fix declaration of unique symbols (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
waltjones authored Mar 16, 2022
1 parent 93cec8b commit 39a2a4e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component, Context as ReactContext, ReactNode } from 'react';
import Rollbar, { Callback, Configuration } from 'rollbar';
import { RollbarInstance, BaseOptions, RollbarCtor } from './src/provider';

export const LEVEL_DEBUG = 'debug';
export const LEVEL_INFO = 'info';
Expand Down Expand Up @@ -54,6 +53,10 @@ interface ProviderState {

export class Provider extends Component<ProviderProps, ProviderState> {}

declare const RollbarInstance: unique symbol;
declare const BaseOptions: unique symbol;
declare const RollbarCtor: unique symbol;

interface ContextInterface {
[RollbarInstance]: Rollbar;
[BaseOptions]: Configuration;
Expand All @@ -62,7 +65,7 @@ interface ContextInterface {

export const Context: ReactContext<ContextInterface>;

export function getRollbarFromContext(context: Context): Rollbar;
export function getRollbarFromContext(context: ReactContext<ContextInterface>): Rollbar;
export function useRollbar(): Rollbar;
export function useRollbarConfiguration(config: Rollbar.Configuration): void;
export function useRollbarContext(ctx?: string, isLayout?: boolean): void;
Expand Down

0 comments on commit 39a2a4e

Please sign in to comment.