FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Non-enum CLI options with multiple values separated by comma and space aren't whitespace trimmed · Issue #64618 · microsoft/TypeScript · GitHub

Non-enum CLI options with multiple values separated by comma and space aren't whitespace trimmed #64618

Description

🔎 Search Terms

CLI, compilerOptions, whitespace, comma

🕗 Version & Regression Information

Checked on the latest main

⏯ Playground Link

No response

💻 Code

> npx tsc --showConfig --customConditions "a, b" --types "a, b" --typeRoots "a, b" --moduleSuffixes "a, b" --excludeDirectories "a, b" --excludeFiles "a, b" --lib "es2015, dom" index.ts

🙁 Actual behavior

{
    "compilerOptions": {
        "customConditions": [
            "a",
            " b"
        ],
        "lib": [
            "es6",
            "dom"
        ],
        "moduleSuffixes": [
            "a",
            " b"
        ],
        "typeRoots": [
            "./a",
            "./ b"
        ],
        "types": [
            "a",
            " b"
        ]
    },
    "files": [
        "./index.ts"
    ]
}

See space before b in resolved config, and also note that lib values are trimmed correctly

🙂 Expected behavior

{
    "compilerOptions": {
        "customConditions": [
            "a",
            "b"
        ],
        "lib": [
            "es6",
            "dom"
        ],
        "moduleSuffixes": [
            "a",
            "b"
        ],
        "typeRoots": [
            "./a",
            "./b"
        ],
        "types": [
            "a",
            "b"
        ]
    },
    "files": [
        "./index.ts"
    ]
}

Non-enum options should be whitespace-trimmed as well

Additional information about the issue

Followup for #64522 (comment)

Activity

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

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


      Back | FazBrowse Home | New Git URL