Update phantom T getter doc comments and expand changeset scope
Updated doc comments on ExtensionPoint.T and ServiceRef.T to reflect that reading the value returns null rather than throwing. Expanded the changeset to cover all three behavioral changes in the PR. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
'@backstage/backend-plugin-api': patch
|
||||
---
|
||||
|
||||
Harmonized the phantom `.T` getter on `ExtensionPoint` to consistently return `null` instead of throwing.
|
||||
Harmonized the phantom `.T` getter behavior on `ExtensionPoint` and `ServiceRef` to consistently return `null` instead of throwing, and added `toJSON()` parity for `ExtensionPoint`.
|
||||
|
||||
@@ -50,7 +50,7 @@ export type ServiceRef<
|
||||
|
||||
/**
|
||||
* Utility for getting the type of the service, using `typeof serviceRef.T`.
|
||||
* Attempting to actually read this value will result in an exception.
|
||||
* Reading this value will always return `null`. It is only intended for use with `typeof serviceRef.T`.
|
||||
*/
|
||||
T: TService;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ export type ExtensionPoint<T> = {
|
||||
|
||||
/**
|
||||
* Utility for getting the type of the extension point, using `typeof extensionPoint.T`.
|
||||
* Attempting to actually read this value will result in an exception.
|
||||
* Reading this value will always return `null`. It is only intended for use with `typeof extensionPoint.T`.
|
||||
*/
|
||||
T: T;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user