Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6211

How to set up node module to export type information

$
0
0

I'm writing a node module that is the api layer for my react and react native app. I've gotten it to the point where typescript is exporting everything except for the type objects. As I understand it, I could create a custom typing for my project, but that seems unnecessary. Here's what my compiled index.d.ts file looks like

import InventoryService from "./src/services/InventoryService";
import PlentiItemService from "./src/services/PlentiItemService";
...
declare type PlentiType = "Fruit" | "Decorative" | "Herb" | "Poultry" | "Vegetable" | "Unknown";
declare type QuantityName = "None" | "A Little" | "Some" | "A Lot" | "Many";
export { AccountLoginForm, AccountSignupForm, AccountUpdateForm, ..., PlentiType, QuantityName}

Note that the types are exported, but the don't appear to be usable in the installing application. Why is that?


Viewing all articles
Browse latest Browse all 6211

Trending Articles



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