# Types/Interfaces not accessible within extension?

**URL:** <https://community.hubspot.com/t/types-interfaces-not-accessible-within-extension/136281>\
**Category:** CMS Development\
**Tags:** local-development, javascript\
**Created:** [July 15, 2025, 6:33pm UTC](https://community.hubspot.com/t/types-interfaces-not-accessible-within-extension/136281 "2025-07-15T18:33:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MSundman](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@MSundman](https://community.hubspot.com/u/MSundman)\
**Post date:** [July 15, 2025, 6:33pm UTC](https://community.hubspot.com/t/types-interfaces-not-accessible-within-extension/136281/1 "2025-07-15T18:33:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Victor\_Becerra](https://avatars.discourse-cdn.com/v4/letter/v/87869e/32.png) [@Victor\_Becerra](https://community.hubspot.com/u/Victor_Becerra)\
**Post date:** [July 16, 2025, 3:47pm UTC](https://community.hubspot.com/t/types-interfaces-not-accessible-within-extension/136281/2 "2025-07-16T15:47:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kosalaindrasiri](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kosalaindrasiri/32/44349_2.png) [@kosalaindrasiri](https://community.hubspot.com/u/kosalaindrasiri)\
**Post date:** [July 16, 2025, 5:17pm UTC](https://community.hubspot.com/t/types-interfaces-not-accessible-within-extension/136281/3 "2025-07-16T17:17:00Z")

</div>

Thanks for the mention [@Victor\_Becerra](https://community.hubspot.com/t5/user/viewprofilepage/user-id/620965),.

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.

> **[GitHub - HubSpot/ui-extensions-examples: This repository contains code examples...](https://github.com/HubSpot/ui-extensions-examples/tree/main)**
>
> main

Regards,
