sass-loader icon indicating copy to clipboard operation
sass-loader copied to clipboard

Provided types

Open PierBJX opened this issue 3 years ago • 3 comments

Feature Proposal

Is it possible to have types to have autocompletion when adding the options of the sassLoader? Such like that:

const sassOptions: SassOptions = {
   implementation: require("sass"),
   ...
}
module.exports = {
  module: {
    rules: [
      {
        test: /\.s[ac]ss$/i,
        use: [
          "style-loader",
          "css-loader",
          {
            loader: "sass-loader",
            options: sassOptions,
          },
        ],
      },
    ],
  },
};

I know there is @types/sass-loader but not sure it is quite relevant since there is @types/webpack required.

PierBJX avatar Feb 20 '22 00:02 PierBJX

PR welcome, we use typescript jsdocs

alexander-akait avatar Feb 20 '22 13:02 alexander-akait

What is your strategy to add typings ?

PierBJX avatar Feb 20 '22 18:02 PierBJX

Here configuration and examples of our types using jsdocs https://github.com/webpack-contrib/compression-webpack-plugin

alexander-akait avatar Feb 21 '22 11:02 alexander-akait