Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provided types #1029

Open
PierBJX opened this issue Feb 20, 2022 · 3 comments
Open

Provided types #1029

PierBJX opened this issue Feb 20, 2022 · 3 comments

Comments

@PierBJX
Copy link

PierBJX commented Feb 20, 2022

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.

@alexander-akait
Copy link
Member

PR welcome, we use typescript jsdocs

@PierBJX
Copy link
Author

PierBJX commented Feb 20, 2022

What is your strategy to add typings ?

@alexander-akait
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants