Quantcast
Channel: How to wrap an interface in an object while exporting it in TypeScript? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to wrap an interface in an object while exporting it in TypeScript?

$
0
0

I have a file called x.ts, here is what it holds:

interface x {  x: string;}interface y{  x: string;}interface z {  x: string;}interface i{  x: string;}

I want to export the interfaces like this:

export = {   a: {      x,      y   },   b: {      z,      i   }}

How can I do this in TypeScript?


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>