0

ERROR in node_modules/@types/select2/index.d.ts(163,18): error TS2430: Interface 'AjaxOptions' incorrectly extends interface 'Pick string)' is not assignable to type 'string'. Type '(params: QueryOptions) => string' is not assignable to type 'string'.

Biswajit Patra
  • 101
  • 1
  • 2
  • 11

1 Answers1

0

After reasearching a lot and trying to find a solution on my own (due to lack of solutions on internet), I found a fix at least for my issue.

I will share it with you just in case.

On my case the root cause of this was an entry on '.angular-cli.json' that was missing and because of this the 'select2' js file was not being uploaded.

So I just added this line to the .angular-cli.json:

"scripts": [
        "../node_modules/jquery/dist/jquery.js",
        "../node_modules/jqueryui/jquery-ui.js",        
        "../node_modules/select2/dist/js/select2.full.js",

This solved my issue and now I'm able to use the select2 control.

Note that you might need to add the .css for select2 as well ;).

Good luck!.