From 4afb18469e8c36ea03f9565ce93057e75ff2e525 Mon Sep 17 00:00:00 2001 From: foxcaulfield Date: Sat, 11 May 2024 09:43:34 +0200 Subject: [PATCH 1/2] Classes.md: Update description for getter and setter member visibility --- packages/documentation/copy/en/handbook-v2/Classes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/documentation/copy/en/handbook-v2/Classes.md b/packages/documentation/copy/en/handbook-v2/Classes.md index 63227e7288a2..5dde89c2bf94 100644 --- a/packages/documentation/copy/en/handbook-v2/Classes.md +++ b/packages/documentation/copy/en/handbook-v2/Classes.md @@ -250,7 +250,7 @@ TypeScript has some special inference rules for accessors: - If `get` exists but no `set`, the property is automatically `readonly` - If the type of the setter parameter is not specified, it is inferred from the return type of the getter -- Getters and setters must have the same [Member Visibility](#member-visibility) +- `set` accessors may be less visible than their corresponding `get` accessor Since [TypeScript 4.3](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3/), it is possible to have accessors with different types for getting and setting. From 16d9e9c1b5366eda68146f3c6da1b77dfb8ad726 Mon Sep 17 00:00:00 2001 From: foxcaulfield Date: Wed, 5 Jun 2024 21:11:38 +0200 Subject: [PATCH 2/2] Get rid of the line --- packages/documentation/copy/en/handbook-v2/Classes.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/documentation/copy/en/handbook-v2/Classes.md b/packages/documentation/copy/en/handbook-v2/Classes.md index 5dde89c2bf94..63098a12e6ec 100644 --- a/packages/documentation/copy/en/handbook-v2/Classes.md +++ b/packages/documentation/copy/en/handbook-v2/Classes.md @@ -250,7 +250,6 @@ TypeScript has some special inference rules for accessors: - If `get` exists but no `set`, the property is automatically `readonly` - If the type of the setter parameter is not specified, it is inferred from the return type of the getter -- `set` accessors may be less visible than their corresponding `get` accessor Since [TypeScript 4.3](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3/), it is possible to have accessors with different types for getting and setting.