diff --git a/experimental/class-features.md b/experimental/class-features.md index df57435..63c37e4 100644 --- a/experimental/class-features.md +++ b/experimental/class-features.md @@ -21,24 +21,20 @@ interface PropertyDefinition <: Node { value: Expression | null; computed: boolean; static: boolean; - private: boolean; } ``` -- When `private` is `true`, `computed` must be `false` and `key` must be a `PrivateIdentifier`. -- When `private` is `false`, `key` must be an `Expression` and can not be a `PrivateIdentifier`. +- When `key` is a `PrivateIdentifier`, `computed` must be `false`. ## MethodDefinition ```js extend interface MethodDefinition { key: Expression | PrivateIdentifier; - private: boolean; } ``` -- When `private` is `true`, `computed` must be `false`, `key` must be a `PrivateIdentifier`, `kind` can not be `"constructor"`. -- When `private` is `false`, `key` must be an `Expression` and can not be a `PrivateIdentifier`. +- When `key` is a `PrivateIdentifier`, `computed` must be `false` and `kind` can not be `"constructor"`. ### PrivateIdentifier @@ -49,18 +45,16 @@ interface PrivateIdentifier <: Node { } ``` -A private name refers to private class elements. For a private name `#a`, its `name` is `a`. +A private identifier refers to private class elements. For a private name `#a`, its `name` is `a`. ```js extend interface MemberExpression { - private: boolean; property: Expression | PrivateIdentifier; } ``` -- When `private` is `true`, `property` must be a `PrivateIdentifier`, `computed` must be `false`. -- When `private` is `false`, `property` must be an `Expression` and can not be a `PrivateIdentifier`. -- When `object` is a `Super`, `private` must be `false`. +- When `property` is a `PrivateIdentifier`, `computed` must be `false`. +- When `object` is a `Super`, `property` can not be a `PrivateIdentifier`. [Class Fields]: https://github.com/tc39/proposal-class-fields [Static Class Features]: https://github.com/tc39/proposal-static-class-features/