diff --git a/packages/core/aqua-to-js-compiler/src/generate/service.ts b/packages/core/aqua-to-js-compiler/src/generate/service.ts index e52cf6b2..6653148d 100644 --- a/packages/core/aqua-to-js-compiler/src/generate/service.ts +++ b/packages/core/aqua-to-js-compiler/src/generate/service.ts @@ -18,10 +18,6 @@ import { ServiceDef } from '@fluencelabs/interfaces'; import { recursiveRenameLaquaProps } from '../utils.js'; import { TypeGenerator } from './interfaces.js'; -interface DefaultServiceId { - s_Some__f_value?: string -} - export class ServiceGenerator { constructor( private typeGenerator: TypeGenerator @@ -54,8 +50,8 @@ export class ServiceGenerator { private serviceToJson(service: ServiceDef): string { return JSON.stringify({ ...( - (service.defaultServiceId as DefaultServiceId)?.s_Some__f_value - ? { defaultServiceId: (service.defaultServiceId as DefaultServiceId).s_Some__f_value } + service.defaultServiceId.s_Some__f_value + ? { defaultServiceId: service.defaultServiceId.s_Some__f_value } : {} ), functions: recursiveRenameLaquaProps(service.functions) diff --git a/packages/core/interfaces/src/compilerSupport/aquaTypeDefinitions.ts b/packages/core/interfaces/src/compilerSupport/aquaTypeDefinitions.ts index ac59ed91..0e215d92 100644 --- a/packages/core/interfaces/src/compilerSupport/aquaTypeDefinitions.ts +++ b/packages/core/interfaces/src/compilerSupport/aquaTypeDefinitions.ts @@ -229,7 +229,9 @@ export interface ServiceDef { /** * Default service id. If the service has no default id the value should be undefined */ - defaultServiceId?: {}; + defaultServiceId: { + s_Some__f_value?: string + }; /** * List of functions which the service consists of