Skip to content

Typescript 3.8.3 : Sharp notation for private method must be alloweded #37677

Closed
@Binau

Description

@Binau

Search Terms

TS18022, sharp

Suggestion

Sharp notation for private method must be alloweded : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Class_fields#Private_instance_methods

Use Cases

class Test {
#test() {}
}

Examples

class Test {
#test() {}
}
=> TS18022: A method cannot be named with a private identifier.

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    In DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions