Hello, I am currently exploring Typescript and attempting to incorporate bootstrap-select into a project that requires "noImplicitAny": true.
However, I am encountering an issue while trying to import BootstrapSelect from @types/bootstrap-select. The error message states:
bootstrap-select/index.d.ts is not a module.
Despite trying various solutions from online resources, I have not been successful so far. I attempted to include in the typescript file. I also added
"types" : ["bootstrap-select", "jquery"],
"typeRoots": [ "node_modules/@types/" ]
in the tsconfig.json, but Visual Studio Code continues to identify the index.d.ts
file as not being a module.
Here is how I imported:
/// <reference types="bootstrap-select" />
import { BootstrapSelect } from 'bootstrap-select';
This is my tsconfig.json:
https://i.sstatic.net/TT5DQ.png
And my package.json:
https://i.sstatic.net/04CCE.png
Any insights or suggestions would be greatly appreciated.
Thank you in advance.