• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How can i return something from a function like this?

Resolved: How can i return something from a function like this?

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

Im quite new to typescript and i have a fuction that will fetch user’s steam inventory and store it in “inventory” parameter, but when i want to return it it will return undefined:
How can i make it so that when i call it like above, it returns the inventory? Any help is appriciated ๐Ÿ™‚

Answer:

you can wrap it into a Promise like this

If you have better answer, please add a comment about this, thank you!

javascript return typescript
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: itertools: cycle through several lists N times via iteration

24/03/2023

Resolved: Convert function is not working with {fn } in SQL Server

24/03/2023

Resolved: Why reference in pointer array doesn’t have data?

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.