question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Grid options registerExternalResources are no longer working for me

See original GitHub issue

Describe the bug

In the grid options section I am using excel export.

registerExternalResources: [new ExcelExportService()],

But now I am getting an error.

Type ‘ExcelExportService’ is not assignable to type ‘ExternalResource’.

Error: component.ts:284:35 - error TS2322: Type ‘ExcelExportService’ is not assignable to type ‘ExternalResource’. Types of property ‘init’ are incompatible. Type ‘(grid: SlickGrid, containerService: ContainerService) => void’ is not assignable to type ‘(grid: SlickGrid, container: ContainerService) => void’.
Types of parameters ‘grid’ and ‘grid’ are incompatible. Type ‘import(“node_modules/angular-slickgrid/node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/slickGrid.interface”).SlickGrid’ is not assignable to type ‘import(“node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/slickGrid.interface”).SlickGrid’. Types of property ‘editActiveCell’ are incompatible. Type ‘(editor: import(“node_modules/angular-slickgrid/node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/editor.interface”).Editor | import("node_modules/angular-slickgrid/node_m…’ is not assignable to type ‘(editor: import(“node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/editor.interface”).Editor | import("node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/sl…’. Types of parameters ‘editor’ and ‘editor’ are incompatible. Type ‘import(“node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/editor.interface”).Editor | import("node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/slickCompos…’ is not assignable to type ‘import(“node_modules/angular-slickgrid/node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/editor.interface”).Editor | import("node_modules/angular-slickgrid/node_modules/@s…’. Type ‘Editor’ is not assignable to type ‘Editor | SlickCompositeEditor’. Type ‘import(“/node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/editor.interface”).Editor’ is not assignable to type ‘import(“node_modules/angular-slickgrid/node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/editor.interface”).Editor’. Types of property ‘init’ are incompatible. Type ‘(args?: import(“@slickgrid-universal/common/dist/commonjs/interfaces/editorArguments.interface”).EditorArguments) => void’ is not assignable to type ‘(args?: import(“node_modules/angular-slickgrid/node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/editorArguments.interface”).EditorArguments) => void’. Types of parameters ‘args’ and ‘args’ are incompatible. Type ‘import(“angular-slickgrid/node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/editorArguments.interface”).EditorArguments’ is not assignable to type ‘import(“@slickgrid-universal/common/dist/commonjs/interfaces/editorArguments.interface”).EditorArguments’. The types of ‘column.asyncPostRender’ are incompatible between these types. Type ‘(domCellNode: any, row: number, dataContext: any, columnDef: import(“@slickgrid-universal/common/dist/commonjs/interfaces/column.interface”).Column<any>) => void’ is not assignable to type ‘(domCellNode: any, row: number, dataContext: any, columnDef: import(“node_modules/@slickgrid-universal/common/dist/commonjs/interfaces/column.interface”).Column<any>) => void’. Types of parameters ‘columnDef’ and ‘columnDef’ are incompatible. Type ‘import(“@slickgrid-universal/common/dist/commonjs/interfaces/column.interface”).Column<any>’ is not assignable to type ‘import(“@slickgrid-universal/common/dist/commonjs/interfaces/column.interface”).Column<any>’. The types of ‘cellMenu.onExtensionRegistered’ are incompatible between these types. Type ‘(plugin: import(“node_modules/@slickgrid-universal/common/dist/commonjs/extensions/slickCellMenu”).SlickCellMenu) => void’ is not assignable to type ‘(plugin: import(“node_modules/angular-slickgrid/node_modules/@slickgrid-universal/common/dist/commonjs/extensions/slickCellMenu”).SlickCellMenu) => void’.
Types of parameters ‘plugin’ and ‘plugin’ are incompatible. Type ‘import(“node_modules/angular-slickgrid/node_modules/@slickgrid-universal/common/dist/commonjs/extensions/slickCellMenu”).SlickCellMenu’ is not assignable to type ‘import(“node_modules/@slickgrid-universal/common/dist/commonjs/extensions/slickCellMenu”).SlickCellMenu’. Property ‘extensionUtility’ is protected but type ‘SlickCellMenu’ is not a class derived from ‘SlickCellMenu’.

Reproduction

Upgrade the “@slickgrid-universal/common” to 1.3.3 and “@slickgrid-universal/excel-export” to 1.3.3 then “angular-slickgrid” to 4.2.3

Environment Info

Angular 14.0.5
Angular-Slickgrid 4.2.3
Typescript 4.7.4
Browsers NA
System Windows 10

Validations

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ghiscodingcommented, Jul 7, 2022

ah sorry I pushed a new version of Slickgrid-Universal without releasing a new version here and that caused an out of sync between the versions and the interfaces. I pushed a fix, please make sure to update both Angular-Slickgrid (to 4.2.4) and Slickgrid-Universal (to 1.3.3). The Angular-Slickgrid-Demos were all updated as well. Thanks for the feedback

1reaction
ghiscodingcommented, Jul 7, 2022

The suggestion is correct, whenever a new version of Angular-Slickgrid is out (I made another one yesterday), you must update all Slickgrid-Universal dependencies as well because if you don’t then you will have similar issues to what you are currently having. I also jus tried the demo and the Excel Export works as expected, so there’s no issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

There's no straight forward way to reload the datasource ...
There's no way to simply recall getRows() of grid datasource. Expected behavior. Grid should reload the data with same filters, sorts and ...
Read more >
onRegisterApi function not being called, ui-grid
You are calling the populateGrid() function after you have already initialized vm.gridOptions.data with the data from your HTTP request.
Read more >
Slack Connect guide: work with external partners
Slack Connect allows you to work with people outside your company in channels and direct messages ... Continue using the channel if it's...
Read more >
National Grid: Natural Gas & Electricity
Welcome to National Grid, providing New York and Massachusetts with natural gas and electricity for homes and businesses.
Read more >
SAMS NHSN User FAQs
What if the serial numbers on my SAMS grid card do not match the numbers listed on the letter ... All NHSN users...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found