microsoft / Microsoft-Fabric-workload-development-sample

Demonstrates how to implement a Microsoft Fabric workload in .net and typescript
Other
30 stars 16 forks source link

Type check of Fabric Workload client fails #35

Closed q-benwillis closed 3 months ago

q-benwillis commented 4 months ago

I'm seeing the following error when building our custom Fabric Workload frontend:

Error: node_modules/@ms-fabric/workload-client/src/workload-client.d.ts:2888:11 - error TS2430: Interface 'OpenPageConfig' incorrectly extends interface 'OpenUIConfig'.
  Property 'workloadName' is optional in type 'OpenPageConfig' but required in type 'OpenUIConfig'.

2888 interface OpenPageConfig extends OpenUIConfig {

Seems that there's a type issue in the @ms-fabric/workload-client npm package.

I'm working around this by disabling library type checking with "skipLibCheck": true in my tsconfig.json.

ramizsha commented 4 months ago

This is by-design. Developers should always set skipLibCheck/skipDefaultLibCheck to true for d.ts in node_modules.

q-benwillis commented 4 months ago

Okay, I guess the logical question is when using OpenPageConfig is workloadName actually optional or is it required?

ramizsha commented 3 months ago

It's marked as deprecated and you should not pass it. See https://learn.microsoft.com/en-us/javascript/api/@ms-fabric/workload-client/openpageconfig?view=fabric-extensibility-js-latest.