I understand the reason for the error, but I am struggling to find a solution to suppress it without using // @ts-ignore
. Currently, I am utilizing style-loader
with the inline syntax:
import styles from '!style-loader?injectType=lazyStyleTag!css-loader!vendor/style.css';
The module '!style-loader?injectType=lazyStyleTag!css-loader!vendor/style.css'' or its corresponding type declarations cannot be found.
How can I inform TypeScript that this import is valid?
UPDATE: added declaration based on the answer provided:
declare module '!style-loader?*' {
const value: { use: (options?: Record<string, any>) => void, unuse: () => void };
export default value;
}