# Reorganising TypeScript interfaces in ScholarX app

**URL:** <https://sef.discourse.group/t/reorganising-typescript-interfaces-in-scholarx-app/291>\
**Category:** ScholarX\
**Created:** [June 13, 2021, 4:16am UTC](https://sef.discourse.group/t/reorganising-typescript-interfaces-in-scholarx-app/291 "2021-06-13T04:16:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjisvj](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/anjisvj/32/9_2.png) [@anjisvj](https://sef.discourse.group/u/anjisvj)\
**Post date:** [June 13, 2021, 4:16am UTC](https://sef.discourse.group/t/reorganising-typescript-interfaces-in-scholarx-app/291/1 "2021-06-13T04:16:15Z")

</div>

Currently, we are facing a problem with our typescript interfaces. Since we are using a modularised project structure we are storing our interfaces like this,

![image](https://global.discourse-cdn.com/free1/uploads/sef/original/1X/d428707e773027db393b9adef828e2fa139a20b8.png)

The problem with this structure is we are going to multiple interfaces for the same thing cuz the developer doesn’t know whether there’s an interface for this already or not.

The possible fix for this issue is maintaining a single typescript file to store our interfaces without breaking the current project structure.

As we discussed in the stand up we are going to store the response types only. We are going to keep the props types the way it is.

---

<div class="post-metadata">

**Author:** ![anjisvj](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/anjisvj/32/9_2.png) [@anjisvj](https://sef.discourse.group/u/anjisvj)\
**Post date:** [June 13, 2021, 4:20am UTC](https://sef.discourse.group/t/reorganising-typescript-interfaces-in-scholarx-app/291/2 "2021-06-13T04:20:37Z")

</div>

Here’s the issue for this,

> <https://github.com/sef-global/scholarx-frontend/issues/182>
>
> \*\*Is your feature request related to a problem? Please describe.\*\*
> \- Please fol…low this thread to understand the problem
> https://sef.discourse.group/t/reorganising-typescript-interfaces-in-scholarx-app/291
> 
> \*\*Describe the solution you'd like\*\*
> \- Reorganise the typescript interfaces

---

<div class="post-metadata">

**Author:** ![anjisvj](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/anjisvj/32/9_2.png) [@anjisvj](https://sef.discourse.group/u/anjisvj)\
**Post date:** [June 15, 2021, 10:00am UTC](https://sef.discourse.group/t/reorganising-typescript-interfaces-in-scholarx-app/291/3 "2021-06-15T10:00:50Z")

</div>

Here’s the PR for this above issue:

> <https://github.com/sef-global/scholarx-frontend/pull/185>
>
> \## Purpose
> 
> \- The purpose of this PR is to fix #182 
> 
> \## Goals
> 
> \- Maintain…ing a single type file to store the interfaces 
> 
> \## Approach
> 
> \- Created the \`types.ts\` file 
> \- Moved all the interfaces to the types file except prop types
> 
> \## Checklist
> \- \[x\] This PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.
> \- \[x\] I have read and understood the development best practices guidelines ( http://bit.ly/sef-best-practices )
> \- \[x\] My code follows the style guidelines of this project
> \- \[x\] I have performed a self-review of my own code
> \- \[\] I have commented my code, particularly in hard-to-understand areas
> \- \[\] I have made corresponding changes to the documentation
