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

extends attribute should allow also arrays #33

Open
schamane opened this issue May 16, 2023 · 1 comment
Open

extends attribute should allow also arrays #33

schamane opened this issue May 16, 2023 · 1 comment

Comments

@schamane
Copy link

Here example config for tsconfig.json:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "Default",
  "extends": [
    "@tsconfig/recommended/tsconfig.json",
    "@tsconfig/node20/tsconfig.json",
    "@tsconfig/esm/tsconfig.json",
    "@tsconfig/strictest"
  ]
}

This will lead tsconfig-resolver to error:

The "path" argument must be of type string. Received an instance of Array

image

Array are allowed by Schema:

"extendsDefinition": {
      "properties": {
        "extends": {
          "description": "Path to base configuration file to inherit from (requires TypeScript version 2.1 or later), or array of base files, with the rightmost files having the greater priority (requires TypeScript version 5.0 or later).",
          "oneOf": [
            {
              "default": "",
              "type": "string"
            },
            {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        }
      }
    }
@schamane
Copy link
Author

Link for cross ref:
tsconfig/bases#167 (comment)

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

1 participant