zackurben / alphavantage

A simple interface to the Alpha Vantage API.
MIT License
332 stars 60 forks source link

Improve compiler to export Typescript interfaces #464

Open brlocky opened 9 months ago

brlocky commented 9 months ago

Hi all,

I'm working on a typescript project using this nice alphavantage lib. And would be nice to have access to all param and return types.

Would be nice that this ones were exported aswell. // https://www.alphavantage.co/documentation/#dailyadj interface RawStockDailyAdjusted { 'Meta Data': { '1. Information': string; '2. Symbol': string; '3. Last Refreshed': string; '4. Output Size': string; '5. Time Zone': string; }; 'Time Series (Daily)': { [date: string]: | { '1. open': string; '2. high': string; '3. low': string; '4. close': string; '5. adjusted close': string; '6. volume': string; '7. dividend amount': string; '8. split coefficient': string; } | undefined; }; }

Also would be nice to have this interface improved in terms of replacing the T with the correct interfaces

intraday: <T = any>(symbol: string, outputsize?: string, datatype?: string, interval?: string) => Promise<T>; daily: <T = any>(symbol: string, outputsize?: string, datatype?: string, interval?: string) => Promise<T>; daily_adjusted: ( symbol: string, outputsize?: string, datatype?: string, interval?: string ) => Promise<RawStockDailyAdjusted>;