From 663914bfd5e10e5397eb103110f66773c8f41451 Mon Sep 17 00:00:00 2001 From: ctw-joao-luis Date: Fri, 18 Oct 2024 15:36:58 +0100 Subject: [PATCH] Fix/making-metadata-possibly-undefined (#229) **User-Facing Changes** N/A **Description** In order to guarantee extensions compatibility with Foxglove metadata can now be undefined, this way future extensions devs will get warnings if they try to access metadata property. **Checklist** - [X] The web version was tested and it is running ok - [X] The desktop version was tested and it is running ok - [ ] This change is covered by unit tests --- packages/suite/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/suite/src/index.ts b/packages/suite/src/index.ts index bdb7616632..e5edf99a3c 100644 --- a/packages/suite/src/index.ts +++ b/packages/suite/src/index.ts @@ -289,7 +289,7 @@ export type PanelExtensionContext = { * An array of metadata entries. Each entry includes a name and a map of key-value pairs * representing the metadata associated with that name (only avaiable in MCAP files). */ - readonly metadata: ReadonlyArray>; + readonly metadata?: ReadonlyArray>; /** * Subscribe to updates on this field within the render state. Render will only be invoked when