使用vss-web-extension-sdk进行打字稿编译错误

时间:2017-09-28 10:32:43

标签: typescript azure-devops tsc

当尝试从包中包含下载的https://www.npmjs.com/package/vss-web-extension-sdk或更准确地包含/typings/index.d.ts时,我在运行tsc后得到以下打字稿错误:

sdk/node_modules/vss-web-extension-sdk/node_modules/@types/jquery/index.d.ts(2957,63): error TS2304: Cannot find name 'Iterable'.
sdk/node_modules/vss-web-extension-sdk/typings/vss.d.ts(3441,18): error TS2559: Type 'TemplateViewModel' has no properties in common with type 'EnhancementOptions'.
sdk/node_modules/vss-web-extension-sdk/typings/vss.d.ts(10334,18): error TS2415: Class 'ComboDateBehavior' incorrectly extends base class 'BaseComboBehavior'.
  Types of property 'getValue' are incompatible.
  Type '() => Date' is not assignable to type '<TValue>() => TValue'.
  Type 'Date' is not assignable to type 'TValue'.
sdk/node_modules/vss-web-extension-sdk/typings/vss.d.ts(10419,18): error TS2415: Class 'ComboMultiValueBehavior' incorrectly extends base class 'ComboListBehavior'.
  Types of property 'getValue' are incompatible.
  Type '() => string[]' is not assignable to type '<TValue>() => TValue'.
  Type 'string[]' is not assignable to type 'TValue'.
sdk/node_modules/vss-web-extension-sdk/typings/vss.d.ts(10593,18): error TS2417: Class static side 'typeof DialogO' incorrectly extends base class static side 'typeof AjaxPanelO'.
  Types of property 'create' are incompatible.
  Type '<T extends Dialog>(dialogType: new (options: any) => T, options?: any) => T' is not assignable to type '<TControl extends Control<any>, TOptions>(controlType: new (options: TOptions) => TControl, conta...'.
  Types of parameters 'dialogType' and 'controlType' are incompatible.
  Type 'new (options: TOptions) => TControl' is not assignable to type 'new (options: any) => Dialog'.
  Type 'TControl' is not assignable to type 'Dialog'.
  Type 'Control<any>' is not assignable to type 'Dialog'.
  Property '_specifiedMaxWidth' is missing in type 'Control<any>'.

tsc版本是2.5.3

vss-web-extension-sdk的版本为3.121.0

我错过了什么吗?或者我需要配置什么?

0 个答案:

没有答案