8000 Files with .es6 suffix are treated as TypeScript files · Issue #7926 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Files with .es6 suffix are treated as TypeScript files #7926
Closed
@egamma

Description

@egamma

From @jbutz on April 6, 2016 18:12

  • VSCode Version: 0.10.11
  • OS Version: OS X El Capitan v 10.11.4

Steps to Reproduce:

  1. Create a new file with the extension .es6 and the following code

    class Testing {
       constructor() {
           this.myValue = "Hello World";
       }
    
       test() {
           return this.myValue;
       }
    }
  2. The Language Mode is automatically set to "JavaScript", but on this.myValue you get Property 'myValue' does not exist on type 'Testing' errors.

  3. Close the file and rename it to use a .js extension

  4. Open the file and notice that the errors are gone

Copied from original issue: microsoft/vscode#5046

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already createdSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0