Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Change CLS import to do stats type more general. (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
crdgonzalezca authored and mayurkale22 committed May 15, 2019
1 parent 800520f commit 26c232c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/opencensus-core/src/stats/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@
*/

import {StatsEventListener} from '../exporters/types';
import * as cls from '../internal/cls';
import {Metric} from '../metrics/export/types';
import {TagMap} from '../tags/tag-map';
import {TagKey, TagValue} from '../tags/types';

/** Default type for functions */
// tslint:disable:no-any
type Func<T> = (...args: any[]) => T;

/** Main interface for stats. */
export interface Stats {
/**
Expand Down Expand Up @@ -107,7 +110,7 @@ export interface Stats {
* @param fn Callback function.
* @returns The callback return.
*/
withTagContext<T>(tags: TagMap, fn: cls.Func<T>): T;
withTagContext<T>(tags: TagMap, fn: Func<T>): T;

/** Gets the current tag context. */
getCurrentTagContext(): TagMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export type PluginNames = {
};

export type PluginInternalFilesVersion = {
[pluginName: string]: string
[pluginName: string]: string;
};

/**
Expand Down

0 comments on commit 26c232c

Please sign in to comment.