首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >角11 +角-点击网格@2.25.0+生成错误

角11 +角-点击网格@2.25.0+生成错误
EN

Stack Overflow用户
提问于 2021-01-19 13:04:05
回答 2查看 423关注 0票数 0

我已经安装了最新版本的angular-slickgrid在角11项目。在ng build之后,我已经开始在d.ts文件中获取这些错误。你能帮我拿同样的吗?

下面是build的日志:

代码语言:javascript
复制
ng build
✔ Browser application bundle generation complete.

Error: node_modules/angular-slickgrid/app/modules/angular-slickgrid/services/graphql.service.d.ts:18:5 - error TS2416: Property 'init' in type 'GraphqlService' is not assignable to the same property in base type 'BackendService'.
Type '(serviceOptions?: GraphqlServiceOption | undefined, pagination?: Pagination | undefined, grid?: any) => void' is not assignable to type '(serviceOptions?: BackendServiceOption | undefined, pagination?: Pagination | undefined, grid?: any) => void'.
Types of parameters 'serviceOptions' and 'serviceOptions' are incompatible.
Type 'BackendServiceOption | undefined' is not assignable to type 'GraphqlServiceOption | undefined'.
Property 'datasetName' is missing in type 'BackendServiceOption' but required in type 'GraphqlServiceOption'.

18 init(serviceOptions?: GraphqlServiceOption, pagination?: Pagination, grid?: any): void;
~~~~

node_modules/angular-slickgrid/app/modules/angular-slickgrid/models/graphqlServiceOption.interface.d.ts:14:5
14 datasetName: string;
~~~~~~~~~~~
'datasetName' is declared here.
node_modules/angular-slickgrid/app/modules/angular-slickgrid/services/graphql.service.d.ts:54:5 - error TS2416: Property 'processOnPaginationChanged' in type 'GraphqlService' is not assignable to the same property in base type 'BackendService'.
Type '(event: Event, args: PaginationChangedArgs) => string' is not assignable to type '(event: Event | undefined, args: PaginationChangedArgs) => string'.
Types of parameters 'event' and 'event' are incompatible.
Type 'Event | undefined' is not assignable to type 'Event'.
Type 'undefined' is not assignable to type 'Event'.

54 processOnPaginationChanged(event: Event, args: PaginationChangedArgs): string;
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/services/grid-odata.service.d.ts:21:5 - error TS2416: Property 'init' in type 'GridOdataService' is not assignable to the same property in base type 'BackendService'.
Type '(serviceOptions: Partial, pagination?: Pagination | undefined, grid?: any) => void' is not assignable to type '(serviceOptions?: BackendServiceOption | undefined, pagination?: Pagination | undefined, grid?: any) => void'.
Types of parameters 'serviceOptions' and 'serviceOptions' are incompatible.
Type 'BackendServiceOption | undefined' is not assignable to type 'Partial'.
Type 'undefined' is not assignable to type 'Partial'.

21 init(serviceOptions: Partial, pagination?: Pagination, grid?: any): void;
~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/services/grid-odata.service.d.ts:42:5 - error TS2416: Property 'processOnPaginationChanged' in type 'GridOdataService' is not assignable to the same property in base type 'BackendService'.
Type '(event: Event, args: PaginationChangedArgs) => string' is not assignable to type '(event: Event | undefined, args: PaginationChangedArgs) => string'.
Types of parameters 'event' and 'event' are incompatible.
Type 'Event | undefined' is not assignable to type 'Event'.
Type 'undefined' is not assignable to type 'Event'.

42 processOnPaginationChanged(event: Event, args: PaginationChangedArgs): string;
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/models/graphqlServiceApi.interface.d.ts:7:18 - error TS2430: Interface 'GraphqlServiceApi' incorrectly extends interface 'BackendServiceApi'.
The types of 'service.init' are incompatible between these types.
Type '(serviceOptions?: GraphqlServiceOption | undefined, pagination?: Pagination | undefined, grid?: any) => void' is not assignable to type '(serviceOptions?: BackendServiceOption | undefined, pagination?: Pagination | undefined, grid?: any) => void'.

7 export interface GraphqlServiceApi extends BackendServiceApi {
~~~~~~~~~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/models/odataServiceApi.interface.d.ts:4:18 - error TS2430: Interface 'OdataServiceApi' incorrectly extends interface 'BackendServiceApi'.
The types of 'service.init' are incompatible between these types.
Type '(serviceOptions: Partial, pagination?: Pagination | undefined, grid?: any) => void' is not assignable to type '(serviceOptions?: BackendServiceOption | undefined, pagination?: Pagination | undefined, grid?: any) => void'.
[0m
4 export interface OdataServiceApi extends BackendServiceApi {
~~~~~~~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/autoCompleteFilter.d.ts:64:5 - error TS2416: Property 'setValues' in type 'AutoCompleteFilter' is not assignable to the same property in base type 'Filter'.
Type '(values: string | number | boolean | Date | SearchTerm[], operator?: "" | "" | "LT" | OperatorType | "<>" | "!=" | "=" | "==" | ">" | ">=" | "<" | "<=" | "a" | ... 20 more ... | undefined) => void' is not assignable to type '(values: string | number | boolean | Date | SearchTerm[] | undefined) => void'.
Types of parameters 'values' and 'values' are incompatible.
Type 'string | number | boolean | Date | SearchTerm[] | undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.
Type 'undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.

64 setValues(values: SearchTerm | SearchTerm[], operator?: OperatorType | OperatorString): void;
~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/compoundDateFilter.d.ts:48:5 - error TS2416: Property 'setValues' in type 'CompoundDateFilter' is not assignable to the same property in base type 'Filter'.
Type '(values: string | number | boolean | Date | SearchTerm[], operator?: "" | "" | "LT" | OperatorType | "<>" | "!=" | "=" | "==" | ">" | ">=" | "<" | "<=" | "a" | ... 20 more ... | undefined) => void' is not assignable to type '(values: string | number | boolean | Date | SearchTerm[] | undefined) => void'.
Types of parameters 'values' and 'values' are incompatible.
Type 'string | number | boolean | Date | SearchTerm[] | undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.
Type 'undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.

48 setValues(values: SearchTerm | SearchTerm[], operator?: OperatorType | OperatorString): void;
~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/compoundInputFilter.d.ts:43:5 - error TS2416: Property 'setValues' in type 'CompoundInputFilter' is not assignable to the same property in base type 'Filter'.
Type '(values: SearchTerm[], operator?: "" | "" | "LT" | OperatorType | "<>" | "!=" | "=" | "==" | ">" | ">=" | "<" | "<=" | "a" | "*z" | "EQ" | "GE" | "GT" | "NE" | "LE" | ... 14 more ... | undefined) => void' is not assignable to type '(values: string | number | boolean | Date | SearchTerm[] | undefined) => void'.
Types of parameters 'values' and 'values' are incompatible.
Type 'string | number | boolean | Date | SearchTerm[] | undefined' is not assignable to type 'SearchTerm[]'.
Type 'undefined' is not assignable to type 'SearchTerm[]'.

43 setValues(values: SearchTerm[], operator?: OperatorType | OperatorString): void;
~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/compoundSliderFilter.d.ts:43:5 - error TS2416: Property 'setValues' in type 'CompoundSliderFilter' is not assignable to the same property in base type 'Filter'.
Type '(values: string | number | boolean | Date | SearchTerm[], operator?: "" | "" | "LT" | OperatorType | "<>" | "!=" | "=" | "==" | ">" | ">=" | "<" | "<=" | "a" | ... 20 more ... | undefined) => void' is not assignable to type '(values: string | number | boolean | Date | SearchTerm[] | undefined) => void'.
Types of parameters 'values' and 'values' are incompatible.
Type 'string | number | boolean | Date | SearchTerm[] | undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.
Type 'undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.

43 setValues(values: SearchTerm | SearchTerm[], operator?: OperatorType | OperatorString): void;
~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/inputFilter.d.ts:37:5 - error TS2416: Property 'setValues' in type 'InputFilter' is not assignable to the same property in base type 'Filter'.
Type '(values: SearchTerm, operator?: "" | "" | "LT" | OperatorType | "<>" | "!=" | "=" | "==" | ">" | ">=" | "<" | "<=" | "a" | "*z" | "EQ" | "GE" | "GT" | "NE" | "LE" | ... 14 more ... | undefined) => void' is not assignable to type '(values: string | number | boolean | Date | SearchTerm[] | undefined) => void'.
Types of parameters 'values' and 'values' are incompatible.
Type 'string | number | boolean | Date | SearchTerm[] | undefined' is not assignable to type 'SearchTerm'.
Type 'undefined' is not assignable to type 'SearchTerm'.

37 setValues(values: SearchTerm, operator?: OperatorType | OperatorString): void;
~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/selectFilter.d.ts:52:5 - error TS2416: Property 'init' in type 'SelectFilter' is not assignable to the same property in base type 'Filter'.
Type '(args: FilterArguments, isFilterFirstRender: boolean) => Promise' is not assignable to type '(args: FilterArguments, isFilterFirstRender?: boolean | undefined) => void'.
Types of parameters 'isFilterFirstRender' and 'isFilterFirstRender' are incompatible.
Type 'boolean | undefined' is not assignable to type 'boolean'.
Type 'undefined' is not assignable to type 'boolean'.

52 init(args: FilterArguments, isFilterFirstRender: boolean): Promise;
~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/selectFilter.d.ts:67:5 - error TS2416: Property 'setValues' in type 'SelectFilter' is not assignable to the same property in base type 'Filter'.
Type '(values: string | number | boolean | Date | SearchTerm[], operator?: "" | "" | "LT" | OperatorType | "<>" | "!=" | "=" | "==" | ">" | ">=" | "<" | "<=" | "a" | ... 20 more ... | undefined) => void' is not assignable to type '(values: string | number | boolean | Date | SearchTerm[] | undefined) => void'.
Types of parameters 'values' and 'values' are incompatible.
Type 'string | number | boolean | Date | SearchTerm[] | undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.
Type 'undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.

67 setValues(values: SearchTerm | SearchTerm[], operator?: OperatorType | OperatorString): void;
~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/nativeSelectFilter.d.ts:40:5 - error TS2416: Property 'setValues' in type 'NativeSelectFilter' is not assignable to the same property in base type 'Filter'.
Type '(values: string | number | boolean | Date | SearchTerm[], operator?: "" | "" | "LT" | OperatorType | "<>" | "!=" | "=" | "==" | ">" | ">=" | "<" | "<=" | "a" | ... 20 more ... | undefined) => void' is not assignable to type '(values: string | number | boolean | Date | SearchTerm[] | undefined) => void'.
Types of parameters 'values' and 'values' are incompatible.
Type 'string | number | boolean | Date | SearchTerm[] | undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.
Type 'undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.

40 setValues(values: SearchTerm | SearchTerm[], operator?: OperatorType | OperatorString): void;
~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/dateRangeFilter.d.ts:50:5 - error TS2416: Property 'setValues' in type 'DateRangeFilter' is not assignable to the same property in base type 'Filter'.
Type '(searchTerms: SearchTerm[], operator?: "" | "" | "LT" | OperatorType | "<>" | "!=" | "=" | "==" | ">" | ">=" | "<" | "<=" | "a" | "*z" | "EQ" | "GE" | "GT" | "NE" | "LE" | ... 14 more ... | undefined) => void' is not assignable to type '(values: string | number | boolean | Date | SearchTerm[] | undefined) => void'.
Types of parameters 'searchTerms' and 'values' are incompatible.
Type 'string | number | boolean | Date | SearchTerm[] | undefined' is not assignable to type 'SearchTerm[]'.
Type 'undefined' is not assignable to type 'SearchTerm[]'.

50 setValues(searchTerms: SearchTerm[], operator?: OperatorType | OperatorString): void;
~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/sliderFilter.d.ts:41:5 - error TS2416: Property 'setValues' in type 'SliderFilter' is not assignable to the same property in base type 'Filter'.
Type '(values: string | number | boolean | Date | SearchTerm[], operator?: "" | "" | "LT" | OperatorType | "<>" | "!=" | "=" | "==" | ">" | ">=" | "<" | "<=" | "a" | ... 20 more ... | undefined) => void' is not assignable to type '(values: string | number | boolean | Date | SearchTerm[] | undefined) => void'.
Types of parameters 'values' and 'values' are incompatible.
Type 'string | number | boolean | Date | SearchTerm[] | undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.
Type 'undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.

41 setValues(values: SearchTerm | SearchTerm[], operator?: OperatorType | OperatorString): void;
~~~~~~~~~
node_modules/angular-slickgrid/app/modules/angular-slickgrid/filters/sliderRangeFilter.d.ts:53:5 - error TS2416: Property 'setValues' in type 'SliderRangeFilter' is not assignable to the same property in base type 'Filter'.
Type '(searchTerms: string | number | boolean | Date | SearchTerm[], operator?: "" | "*" | "LT" | OperatorType | "<>" | "!=" | "=" | "==" | ">" | ">=" | "<" | "<=" | ... 21 more ... | undefined) => void' is not assignable to type '(values: string | number | boolean | Date | SearchTerm[] | undefined) => void'.
Types of parameters 'searchTerms' and 'values' are incompatible.
Type 'string | number | boolean | Date | SearchTerm[] | undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.
Type 'undefined' is not assignable to type 'string | number | boolean | Date | SearchTerm[]'.

53 setValues(searchTerms: SearchTerm | SearchTerm[], operator?: OperatorType | OperatorString): void;
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2021-03-01 16:14:12

请注意,我是“角-斯利克格栅”的作者

另一个建议的答案,由@riteshk,当时是正确的,使它发挥作用。不过,最近我确实在最新版本的角-Slickgrid 2.26.1版中推出了一个修复程序(付出了很大的努力)。棱角-Slickgrid现在是建立严格模式启用,因此这不再是一个问题。

票数 0
EN

Stack Overflow用户

发布于 2021-02-23 05:22:00

显然,光滑的网格代码在角严格模式https://angular.io/guide/strict-mode中不能很好地工作。您可能需要在tsconfig.json.中禁用它。

代码语言:javascript
复制
"strict": false
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65792088

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档