Skip to content

Commit

Permalink
update type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
TinaHeiligers committed Mar 7, 2023
1 parent 6068f6a commit aae570b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/plugins/usage_collection/server/usage_counters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

export type { UsageCountersServiceSetup } from './usage_counters_service';
export type { UsageCountersSavedObjectAttributes, UsageCountersSavedObject } from './saved_objects';
export type { IUsageCounter as UsageCounter, IncrementCounterParams } from './usage_counter';
export type { IUsageCounter as UsageCounter } from './usage_counter';

import { v1 } from '../../common/types/usage_counters';
export type IncrementCounterParams = v1.IncrementCounterParams;

export { UsageCountersService } from './usage_counters_service';
export type { SerializeCounterParams } from './saved_objects';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { serializeCounterKey, storeCounter } from './saved_objects';
import { savedObjectsRepositoryMock } from '@kbn/core/server/mocks';
import { CounterMetric } from './usage_counter';
import { v1 } from '../../common/types/usage_counters';
import moment from 'moment';

describe('counterKey', () => {
Expand Down Expand Up @@ -38,7 +38,7 @@ describe('storeCounter', () => {
});

it('stores counter in a saved object', async () => {
const counterMetric: CounterMetric = {
const counterMetric: v1.CounterMetric = {
domainId: 'a',
counterName: 'b',
counterType: 'c',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { UsageCounter, CounterMetric } from './usage_counter';
import { UsageCounter } from './usage_counter';
import * as Rx from 'rxjs';
import * as rxOp from 'rxjs/operators';
import { v1 } from '../../common/types/usage_counters';

describe('UsageCounter', () => {
const domainId = 'test-domain-id';
const counter$ = new Rx.Subject<CounterMetric>();
const counter$ = new Rx.Subject<v1.CounterMetric>();
const usageCounter = new UsageCounter({ domainId, counter$ });

afterAll(() => {
Expand Down

0 comments on commit aae570b

Please sign in to comment.