mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2024-12-04 18:00:18 +00:00
Fix object type
This commit is contained in:
parent
2550588e37
commit
572f1e10e2
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user