My idea was to try and create a little "hello world" Repository overview card in typescript using the following repository as an example.
https://bitbucket.org/bitbucket/bitbucket-forge-hello-world/src/main/hello-world-app/src
This is my index.tsx file.
import ForgeUI, { render, Fragment, Text, useProductContext} from "@forge/ui";
const App = () => {
const context = useProductContext();
return (
<Fragment>
<Text> "Hello world!" </Text>
<Text>Workspace ID: {JSON.stringify(context.workspaceId)}</Text>
<Text>ExtensionContext: {JSON.stringify(context.extensionContext.repository)}</Text>
</Fragment>
);
};
export const display = render(<App />);And this is my manifest file.
modules:
bitbucket:repoCodeOverviewCard:
- key: display-metrics
title: "Test card: Repo metrics"
function: main
function:
- key: main
handler: index.display
app:
id: <id-here>
The problem i run into is in the line in the index file where I call "context.extensionContext.repository". The linter says its fine, but when trying to deploy I get the following error:
TS2339: Property 'repository' does not exist on type 'ExtensionContext'.
I tried updating my script to just use "context.extensionContext" and print that and then I see the following in my test environment:

What am I missing here? Why can I see the "repository" property, but am I not able to access it in my script?