Skip to content

Visual studio and VS code don't apply tsconfig.json if it uses braces in glob #13062

Closed
@scriby

Description

@scriby

TypeScript Version: 2.1.4

Code

{
  "compilerOptions": {
    "noEmitOnError": true,
    "removeComments": false,
    "experimentalDecorators": true,
    "sourceMap": true,
    "target": "es5",
    "jsx": "react",
    "module": "amd"
  },
  "compileOnSave": true,
  "include": [ "**/*{.ts,.tsx}", "../App", "../Scripts" ],
  "exclude": [ "../App/**/*spec.ts", "../App/**/*.e2e.*ts" ] 
}

Expected behavior:

Decorators can be used without issue in Visual Studio and VS Code for ts/tsx files in the current directory.

Actual behavior:

Visual Studio and VS Code give an error indicating decorators are not supported. The tsc compiler works just fine. Changing "**/*{.ts,.tsx}" to "**/*.ts", "**/*.tsx" works around the error. It appears the glob implementation in VS does not support braces properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions