Types/Interfaces not accessible within extension?

So, we’re using the UI extensions with typescript. And noticing that no types or interfaces are accessible outside of the file they’re exported from.

i.e. we have a file with an exported type (or interface) like this:

```

# /component/Breadcrumb/BreadCrumbItem.ts

export type BreadcrumbItem = {

label: string;

path: string;

}

```

and if we import it like this (regardless of whether we use import or import type)

```

# /component/Breadcrumb/Breadcrumb.tsx

import type { BreadcrumbItem } from ‘./BreadcrumbItem’;

```

We will always get an error like this:

components/Breadcrumb/Breadcrumb.tsx (5:9) “BreadcrumbItem” is not exported by “components/Breadcrumb/BreadcrumbItem.ts”, imported by “components/Breadcrumb/Breadcrumb.tsx”.

Has anyone else encountered this and found a workaround/solution?

Hi @MSundman ,
Thank you for reaching out to the Community!
I’d like to invite some community members who are subject matter experts to join this conversation.
@ArisudanTiwari @SteveHTM @kosalaindrasiri - Would you be able to share any insights on this? Your expertise would be greatly appreciated.
Best,

Victor

Thanks for the mention @Victor_Becerra,.

Hey @MSundman,

Can you try to use .d.ts Files for Shared Types?

I mean, move shared types to a declaration file like types.d.ts and import them where needed.

You can also refer UI Extensions examples repo by Hubspot too.

Regards,