8000 Decorators not allowed classes expressions · Issue #7342 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Decorators not allowed classes expressions #7342
Open
@DavidKDeutsch

Description

@DavidKDeutsch

Not sure if this is by design or not, but the following gives a compile error of "Decorators are not valid here" with TypeScript 1.8:

let testClass = new class {
    testMethod(@myDecorator date: Date): any {
        return date;
    }
}();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: DecoratorsThe issue relates to the decorator syntaxSuggestionAn idea for TypeScriptWaiting for TC39Unactionable until TC39 reaches some conclusion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0