# Correct way to import Typescript enumerations

**URL:** <https://devforum.zoom.us/t/correct-way-to-import-typescript-enumerations/50054>\
**Category:** Web\
**Created:** [May 11, 2021, 5:09pm UTC](https://devforum.zoom.us/t/correct-way-to-import-typescript-enumerations/50054 "2021-05-11T17:09:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![victor.aprea](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/victor.aprea/32/26777_2.png) [@victor.aprea](https://devforum.zoom.us/u/victor.aprea)\
**Post date:** [May 11, 2021, 5:09pm UTC](https://devforum.zoom.us/t/correct-way-to-import-typescript-enumerations/50054/1 "2021-05-11T17:09:09Z")

</div>

I’ve got an Angular 11 app and I’m using version 1.0.3 of the Web Video SDK. I haven’t figured out how to correctly import the contsant enumerations into my app to both satisfy the build-time, VS-code, and the run-time execution. Can anyone offer guidance on the correct import statement / configuration to gain access to the constants, for example, `Video_360P`, and for the time being, I’m using their numeric equivalents i.e. `2`.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 13, 2021, 5:59pm UTC](https://devforum.zoom.us/t/correct-way-to-import-typescript-enumerations/50054/2 "2021-05-13T17:59:32Z")

</div>

Hey @victor.aprea ,

Have you tried referencing the sample app included in the download on your Video SDK app, which is react based?

We will be developing an Angular sample app in the future.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![victor.aprea](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/victor.aprea/32/26777_2.png) [@victor.aprea](https://devforum.zoom.us/u/victor.aprea)\
**Post date:** [May 13, 2021, 7:23pm UTC](https://devforum.zoom.us/t/correct-way-to-import-typescript-enumerations/50054/3 "2021-05-13T19:23:44Z")

</div>

Yes… the React application declares an enum locally in `src/feature/video/video-layout-helper.ts` starting on line 58… it would seem to me that the library should expose the enumeration so that it’s available through an import statement. Without that, if your library enums change things could get “interesting” … I’d rather keep things boring if possible. Maybe you guys can put it on your 1.0.4 road map?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 14, 2021, 3:57pm UTC](https://devforum.zoom.us/t/correct-way-to-import-typescript-enumerations/50054/4 "2021-05-14T15:57:33Z")

</div>

Hey @victor.aprea ,

> [@victor.aprea](#):
>
> it would seem to me that the library should expose the enumeration so that it’s available through an import statement.

I agree, I will share this with the team and see if we can include in 1.0.4 or another upcoming release. (ZOOM-274941)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 19, 2021, 9:17pm UTC](https://devforum.zoom.us/t/correct-way-to-import-typescript-enumerations/50054/7 "2021-05-19T21:17:40Z")

</div>

Hey @victor.aprea ,

The following article may be able to help;

> **[davidea.st - TypeScript's new import() types feature explained](https://davidea.st/articles/typescript-2-9-import-types)**
>
> Why, how, and where you need to use TypeScript's import() types feature.

It seems that as of TypeScript 2.9, it is now easy and possible to import a module’s types directly into the project. 🙂

That being said, we will export the constant enumerations in VideoSDK in a future release.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 15, 2021, 3:42pm UTC](https://devforum.zoom.us/t/correct-way-to-import-typescript-enumerations/50054/8 "2021-06-15T15:42:54Z")

</div>

Hey @victor.aprea ,

Enums will be included in our 1.1.0 Video SDK Web release.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [July 16, 2021, 1:43am UTC](https://devforum.zoom.us/t/correct-way-to-import-typescript-enumerations/50054/9 "2021-07-16T01:43:18Z")

</div>

Closed on July 16, 2021, 1:43am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
