Skip to content

Commit

Permalink
change the imports based on the new converter version
Browse files Browse the repository at this point in the history
  • Loading branch information
helios2003 committed Sep 13, 2024
1 parent 945a0b8 commit 16eea66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/studio-next/src/services/converter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { AbstractService } from './abstract.service';

import { convert } from '@asyncapi/converter';

import type { ConvertVersion, ConvertOptions } from '@asyncapi/converter';
import type { AsyncAPIConvertVersion, ConvertOptions } from '@asyncapi/converter';

export class ConverterService extends AbstractService {
async convert(
spec: string,
version?: ConvertVersion,
version?: AsyncAPIConvertVersion,
options?: ConvertOptions,
): Promise<string> {
version = version || this.svcs.specificationSvc.latestVersion;
Expand Down
6 changes: 3 additions & 3 deletions apps/studio-next/src/services/editor.service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { appState, documentsState, filesState, settingsState } from '@/state';

import type * as monacoAPI from 'monaco-editor/esm/vs/editor/editor.api';
import type { Diagnostic } from '@asyncapi/parser';
import type { ConvertVersion } from '@asyncapi/converter';
import type { AsyncAPIConvertVersion } from '@asyncapi/converter';
import type { File } from '@/state/files.state';

export interface UpdateState {
Expand Down Expand Up @@ -97,8 +97,8 @@ export class EditorService extends AbstractService {
});
}

async convertSpec(version?: ConvertVersion | string) {
const converted = await this.svcs.converterSvc.convert(this.value, version as ConvertVersion);
async convertSpec(version?: AsyncAPIConvertVersion | string) {
const converted = await this.svcs.converterSvc.convert(this.value, version as AsyncAPIConvertVersion);
this.updateState({ content: converted, updateModel: true });
}

Expand Down

0 comments on commit 16eea66

Please sign in to comment.