Skip to content

Commit

Permalink
fix(marine-js): Add JSONValue return type (#393)
Browse files Browse the repository at this point in the history
Return JSONValue from MarineService call instead of unknown

Co-authored-by: Valery Antopol <[email protected]>
  • Loading branch information
Akim and ValeryAntopol authored Nov 7, 2023
1 parent a94494b commit 8ea6c3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions marine-js/npm-package/src/MarineService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import { init } from './marine_js.js';
import type {MarineServiceConfig, Env} from './config.js';
import {CallParameters, JSONArray, JSONObject, LogFunction} from './types.js';
import { CallParameters, JSONArray, JSONObject, JSONValue, LogFunction } from './types.js';

type Awaited<T> = T extends PromiseLike<infer U> ? U : T;

Expand Down Expand Up @@ -55,7 +55,7 @@ export class MarineService {
this._controlModuleInstance = 'not-set';
}

call(functionName: string, args: JSONArray | JSONObject, callParams: CallParameters): unknown {
call(functionName: string, args: JSONArray | JSONObject, callParams: CallParameters): JSONValue {
if (this._controlModuleInstance === 'not-set') {
throw new Error('Not initialized');
}
Expand Down

0 comments on commit 8ea6c3c

Please sign in to comment.