@pastorsj Hi Sam!
I'm trying to pull series data from FRED and I'm running into a static type checking error. I'm not able to transpile when I'm using the wrapper syntax.
This is the callback I'm using:
async (req: Request, res: Response): Promise<void> => {
try {
const series = await fred.series.getSeries('SP500');
res.send(series);
} catch (err) {
res.send(err);
}
And this is the error I'm getting:
src/app.ts:14:46 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
14 const series = await fred.series.getSeries('SP500');
I checked the wrapper documentation, and the series_id query parameter for getting an economic data series says that it's of type string, so there seems to be a disconnect here.
Thanks for looking into this! Let me know if I can help clarify anything.
@pastorsj Hi Sam!
I'm trying to pull series data from FRED and I'm running into a static type checking error. I'm not able to transpile when I'm using the wrapper syntax.
This is the callback I'm using:
And this is the error I'm getting:
I checked the wrapper documentation, and the
series_idquery parameter for getting an economic data series says that it's of typestring, so there seems to be a disconnect here.Thanks for looking into this! Let me know if I can help clarify anything.