Skip to content

JavaScript: types allowed when decorator is added to a JavaScript file #11800

Closed
@sberan

Description

@sberan

TypeScript Version: nightly (2.1.0-dev.201xxxxx)

When I add a decorator to a .js file, I no longer get the 'types' can only be used in a .ts file error. Is this expected behavior?

Code

@SomeDecorator
class SomeClass {
    foo(x:number) { 

    }
}

Expected behavior:
'types' can only be used in a .ts file

Actual behavior:
no errors

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions