You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you run an older app (like our sample app 0.4.9) with the current luigi client you might get this:
ERROR in src/app/app.component.ts(2,8): error TS1192: Module '"/Users/d061234/dev/luigi-compatibility-testing/core/examples/luigi-sample-angular/node_modules/@kyma-project/luigi-client/luigi-client"' has no default export.
[1] src/app/overview/overview.component.ts(2,8): error TS1192: Module '"/Users/d061234/dev/luigi-compatibility-testing/core/examples/luigi-sample-angular/node_modules/@kyma-project/luigi-client/luigi-client"' has no default export.
[1] src/app/project/dynamic/dynamic.component.ts(3,8): error TS1192: Module '"/Users/d061234/dev/luigi-compatibility-testing/core/examples/luigi-sample-angular/node_modules/@kyma-project/luigi-client/luigi-client"' has no default export.
[1] src/app/project/modal/modal.component.ts(10,8): error TS1192: Module '"/Users/d061234/dev/luigi-compatibility-testing/core/examples/luigi-sample-angular/node_modules/@kyma-project/luigi-client/luigi-client"' has no default export.
[1] src/app/project/project.component.ts(11,8): error TS1192: Module '"/Users/d061234/dev/luigi-compatibility-testing/core/examples/luigi-sample-angular/node_modules/@kyma-project/luigi-client/luigi-client"' has no default export.
[1] src/app/project/settings/settings.component.ts(7,8): error TS1192: Module '"/Users/d061234/dev/luigi-compatibility-testing/core/examples/luigi-sample-angular/node_modules/@kyma-project/luigi-client/luigi-client"' has no default export.
[1] src/app/project/users/groups/group-details/group-details.component.ts(3,8): error TS1192: Module '"/Users/d061234/dev/luigi-compatibility-testing/core/examples/luigi-sample-angular/node_modules/@kyma-project/luigi-client/luigi-client"' has no default export.
[1] src/app/project/users/groups/group-details/group-settings/group-settings.component.ts(2,8): error TS1192: Module '"/Users/d061234/dev/luigi-compatibility-testing/core/examples/luigi-sample-angular/node_modules/@kyma-project/luigi-client/luigi-client"' has no default export.
[1] src/app/project/users/groups/groups.component.ts(2,8): error TS1192: Module '"/Users/d061234/dev/luigi-compatibility-testing/core/examples/luigi-sample-angular/node_modules/@kyma-project/luigi-client/luigi-client"' has no default export.
The backwards compatibility is broken.
The text was updated successfully, but these errors were encountered:
The addition of a TypeScript Declaration File for Luigi Client (#425) makes mandatory for Typescript users updating from Luigi 0.4.10 to a newer version to do some changes due to the following issues:
Issue 1
if Typescript apps were using LuigiClient as a type, this is not allowed anymore, since LuigiClient is a namespace in Typescript. Here an example using LuigiClient as a type:
import LuigiClient from '@kyma-project/luigi-client';
...
export class AppComponent {
public luigiClient: LuigiClient = LuigiClient;
...
}
Issue 2
LuigiClient cannot be imported as a default module anymore.
Solution for both issues
Users need to use destructured imports, which has become the convention for most of the libraries out there:
import { linkManager } from '@kyma-project/luigi-client';
export class AppComponent {
public lm: linkManager = linkManager;
constructor() {
this.lm.navigate('overview');
}
}
Remaining work required in Luigi source code
We need to expose types for the already exposed functions, otherwise users can do public linkManager = ; but not public linkManager: linkManager = LuigiClient;. Draft pull request created #466.
When you run an older app (like our sample app 0.4.9) with the current luigi client you might get this:
The backwards compatibility is broken.
The text was updated successfully, but these errors were encountered: