microsoft / azure-devops-extension-sample

Sample web extension for Azure DevOps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm run build error

Julien-Marpault opened this issue · comments

ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\src\Samples\WorkItemOpen\WorkItemOpen.tsx
./src/Samples/WorkItemOpen/WorkItemOpen.tsx
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\src\Samples\WorkItemOpen\WorkItemOpen.tsx(44,104)
TS2322: Type 'ObservableValue' is not assignable to type 'string | IReadonlyObservableValue<string | undefined> | undefined'.
Type 'ObservableValue' is not assignable to type 'IReadonlyObservableValue<string | undefined>'.
The types returned by 'subscribe(...)' are incompatible between these types.
Type '(value: string, action?: string | undefined) => void' is not assignable to type '(value: string | undefined, action?: string | undefined) => void'.
Types of parameters 'value' and 'value' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.

webpack 5.76.0 compiled with 1 error in 6853 ms
(node:44748) [DEP_WEBPACK_MODULE_ERRORS] DeprecationWarning: Module.errors was removed (use getErrors instead)
(Use node --trace-deprecation ... to show where the warning was created)

As I remember, I had to turn off strictFunctionTypes, as seen bellow.
Just try to turn off strictFunctionTypes in tsconfig.json

Hi, this works for me. But why MS doesn't put the ui sdk on github ?! Do you know how to open issues on the azure-devops-ui library ? Because this shouldn't been reported here.

There is not any support for ui SDK, forums, or issues. Terrible.