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

Typescript definition for Map Property is Incorrect #268

Open
jrwiegand opened this issue Nov 27, 2024 · 2 comments
Open

Typescript definition for Map Property is Incorrect #268

jrwiegand opened this issue Nov 27, 2024 · 2 comments

Comments

@jrwiegand
Copy link

Details

The Map option is defined in the README and the index.d.ts as only accepting string | false.

However, there is an option for an object as defined in the postcss.d.ts.

Can the postcss-load-config definition file be updated to reflect the definition from the postcss file?

Error (Logs|Stacks)

Linting errors from the editor (VSCode).

Type '{ inline: false; annotation: true; sourcesContent: true; }' is not assignable to type 'string | false | undefined'.

Reproduction (Code)

Create a postcss.config.ts file.

import { Config } from "postcss-load-config";

const config: Config = {
    map: {
        inline: false,
        annotation: true,
        sourcesContent: true,
    },
    plugins: [require("autoprefixer")],
};

export default config;
$ git clone https://github.com/<user>/<sample>

Environment

OS node npm/yarn package
macOS Sonoma 14.6.1 v20.18.1 npm 10.9.1 postcss-load-confi@5.1.0
@ai
Copy link
Member

ai commented Nov 27, 2024

Can you send PR?

@jrwiegand
Copy link
Author

I can do that, yes.
I will try to have something in by the beginning of next week.

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