Skip to content

Typescript definition for Map Property is Incorrect #268

@jrwiegand

Description

@jrwiegand

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 [email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions