diff --git a/src/ComponentProvider.ts b/src/ComponentProvider.ts index 7131d45c..98072e6a 100644 --- a/src/ComponentProvider.ts +++ b/src/ComponentProvider.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ /* eslint-disable security/detect-object-injection */ import type { AsyncAPIDocumentInterface } from '@asyncapi/parser' -import { OptimizableComponentGroup, OptimizableComponent } from 'index.d' +import { OptimizableComponentGroup, OptimizableComponent } from 'types' import { JSONPath } from 'jsonpath-plus' import _ from 'lodash' diff --git a/src/Optimizer.ts b/src/Optimizer.ts index 691ddc20..c78c0f09 100644 --- a/src/Optimizer.ts +++ b/src/Optimizer.ts @@ -5,7 +5,7 @@ import { Options, OptimizableComponentGroup, Reporter, -} from './index.d' +} from './types' import { Parser } from '@asyncapi/parser' import { removeComponents, diff --git a/src/Reporters/RemoveComponents.ts b/src/Reporters/RemoveComponents.ts index d13643ca..bd48e59c 100644 --- a/src/Reporters/RemoveComponents.ts +++ b/src/Reporters/RemoveComponents.ts @@ -1,5 +1,5 @@ import { Action } from '../Optimizer' -import { OptimizableComponentGroup, ReportElement, Reporter } from '../index.d' +import { OptimizableComponentGroup, ReportElement, Reporter } from '../types' import { createReport, isInComponents } from '../Utils' import Debug from 'debug' const debug = Debug('reporter:removeComponents') diff --git a/src/Reporters/ReuseComponents.ts b/src/Reporters/ReuseComponents.ts index 320b26e3..add354d5 100644 --- a/src/Reporters/ReuseComponents.ts +++ b/src/Reporters/ReuseComponents.ts @@ -4,7 +4,7 @@ import { OptimizableComponentGroup, ReportElement, Reporter, -} from '../index.d' +} from '../types' import { createReport, isEqual, isInChannels, isInComponents } from '../Utils' import Debug from 'debug' const debug = Debug('reporter:reuseComponents') diff --git a/src/Reporters/moveAllToComponents.ts b/src/Reporters/moveAllToComponents.ts index b225ab52..1116f941 100644 --- a/src/Reporters/moveAllToComponents.ts +++ b/src/Reporters/moveAllToComponents.ts @@ -1,6 +1,6 @@ import { Action } from '../Optimizer' import { createReport, isEqual, isInComponents, getComponentName } from '../Utils' -import { OptimizableComponent, OptimizableComponentGroup, ReportElement, Reporter } from 'index.d' +import { OptimizableComponent, OptimizableComponentGroup, ReportElement, Reporter } from 'types' import Debug from 'debug' const debug = Debug('reporter:moveAllToComponents') /** diff --git a/src/Reporters/moveDuplicatesToComponents.ts b/src/Reporters/moveDuplicatesToComponents.ts index e2d2f1b0..a260b2aa 100644 --- a/src/Reporters/moveDuplicatesToComponents.ts +++ b/src/Reporters/moveDuplicatesToComponents.ts @@ -1,6 +1,6 @@ import { Action } from '../Optimizer' import { createReport, isEqual, isInComponents, getComponentName } from '../Utils' -import { OptimizableComponent, OptimizableComponentGroup, ReportElement, Reporter } from 'index.d' +import { OptimizableComponent, OptimizableComponentGroup, ReportElement, Reporter } from 'types' import Debug from 'debug' const debug = Debug('reporter:moveDuplicatesToComponents') /** diff --git a/src/Utils/Helpers.ts b/src/Utils/Helpers.ts index b17eeb8a..9752a736 100644 --- a/src/Utils/Helpers.ts +++ b/src/Utils/Helpers.ts @@ -1,6 +1,6 @@ import * as _ from 'lodash' import YAML from 'js-yaml' -import { OptimizableComponentGroup, NewReport, ReportElement, OptimizableComponent } from 'index.d' +import { OptimizableComponentGroup, NewReport, ReportElement, OptimizableComponent } from 'types' /** * Checks if a component's parent is a ref or not. diff --git a/src/index.ts b/src/index.ts index 8c438998..383c94a0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,2 @@ export { Optimizer, Output } from './Optimizer' -export type { Report, ReportElement, Options } from './index.d' +export type { Report, ReportElement, Options } from './types' diff --git a/src/index.d.ts b/src/types.ts similarity index 96% rename from src/index.d.ts rename to src/types.ts index 28ddcaff..03fcd47f 100644 --- a/src/index.d.ts +++ b/src/types.ts @@ -1,4 +1,4 @@ -import { Action, Output } from 'Optimizer' +import type { Action, Output } from './Optimizer' export interface ReportElement { path: string