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

Add TypeScript declaration file #172

Closed
favna opened this issue May 28, 2019 · 2 comments · Fixed by #241
Closed

Add TypeScript declaration file #172

favna opened this issue May 28, 2019 · 2 comments · Fixed by #241

Comments

@favna
Copy link
Contributor

favna commented May 28, 2019

Before I start I will say I would directly PR this since I have the code ready, however looking at your Package.json I cannot directly see how you're building so instead I'm giving it to you through issue so you can add it yourself. It would be nice if you could add this as TypeScript declaration file. It could be improved upon by removing some of the any types and replacing them with proper types but this should at least do for the basis and support import postcss from rollup-plugin-postcss

declare module 'rollup-plugin-postcss' {

    type FunctionType = (...args: any[]) => void;
  
    type PostCssPluginOptions = {
      extensions?: string[];
      plugins?: any[];
      inject?: boolean | any;
      extract?: boolean | string;
      modules?: boolean | any;
      autoModules?: boolean;
      namedExports?: boolean | FunctionType;
      minimize?: boolean | any;
      sourceMap?: boolean | 'inline';
      parser?: string | FunctionType;
      stringifier?: string | FunctionType;
      syntax?: string | FunctionType;
      exec?: boolean;
      config?: boolean | {
        path: string;
        ctx: any;
      };
      name?: any[] | any[][];
      loaders?: any[];
      onImport?: (id: any) => void;
    }
  
    function postcss(options: PostCssPluginOptions): void;
  
    export default postcss;
  }
@egoist
Copy link
Owner

egoist commented Mar 17, 2020

🎉 This issue has been resolved in version 2.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jednano
Copy link

jednano commented Jun 10, 2020

You need to add this file to the files list of package.json or it will never be published.

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

Successfully merging a pull request may close this issue.

4 participants