You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{PokemonClient}from'pokenode-ts';(async()=>{constapi=newPokemonClient();awaitapi.getPokemonByName('luxray').then((data)=>console.log(data.name))// will output "Luxray".catch((error)=>console.error(error));})();
import{MainClient}from'pokenode-ts';(async()=>{constapi=newMainClient();awaitapi.pokemon.getPokemonByName('luxray').then((data)=>console.log(data.name))// will output "Luxray".catch((error)=>console.error(error));})();
The text was updated successfully, but these errors were encountered:
Version of Pokenode-ts
1.20.0
Node.js Version
20.16.0
Operating System
macOs
Bug Description
This isn't really a bug, more of a question. Why mix await and .then? Seems like an oversight.
Expected Behavior
Just use await, theres no reason to mix await and .then
Steps to Reproduce
Look at the documentation here https://pokenode-ts.vercel.app/guides/getting-started#basic-example
The text was updated successfully, but these errors were encountered: