-
Hi, I try to adapt the jsonforms-property-view in my own project. But I struggle with a lot of typescript errors. When I try to build my project with
such message result from code like this: import { ModelServerClient } from '@eclipse-emfcloud/modelserver-theia';
export async function getElementFromModelServer(modelServerClient: ModelServerClient, modelUri: string, elementId: string): Promise<Object> {
return modelServerClient.getElementById(modelUri, elementId, 'json')
...... where I am not the JavaScript expert. I am using lint, eslint and tsconfig.json like recommended in the GLSP examples. Can someone help me solve this compiler issue. Should I rewrite the code or is there a way to 'ignore' this errors? I already have tried to adapt the following tsconfig.json from the jsonforms-property-view project, but with no better result:
I am thankful for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hi @rsoika, |
Beta Was this translation helpful? Give feedback.
Hi @rsoika,
You can use to the non-primitive
object
type (whichwas added in Typescript 2.2
) instead.This is most likely an issue due to Typescript and ESLint versions. It is also listed in the Typescript Do's and Don'ts
And you are right, it is confusing and we should change that on our side as well. I will create an issue for that!