We couldn’t find this entry. Showing approximate results. Check your spelling or suggest adding this term to the dictionary.
async function
função assíncrona
função async
Allows the addition of properties to all async function objects.
Permite a adição de propriedades para todos os objetos async function.
This is different from using eval with code for an async function expression.
Isso é diferente de usar eval com código para uma expressão async function.
However, when converting the above to an async function, it's tempting to go too sequential
No entanto, ao converter o item acima para uma função assíncrona, é tentador ser sequencial demais
This is called a race condition, and it's typical in code that mixes async/ await (which assumes something waits for the result) with top-down data flow (props or state can change while we're in the middle of an async function).
Isso é chamado de condição de corrida, e é típico no código que mistura async/await (que supõe que algo espera pelo resultado) com fluxo de dados de cima-baixo (props ou state podem mudar enquanto estamos no meio de uma função assíncrona).
You can also define async functions using an async function statement.
Você também pode definir funções async usando a declaração de função async.
Effects don't magically solve this problem, although they'll warn you if you try to pass an async function to the effect directly.
Os efeitos não resolvem este problema magicamente, embora avisem se você tentar passar uma função async diretamente para o efeito.
An async function fulfills the implicit promise by returning a value, and rejects the promise by throwing and exception.
Uma função async cumpre a promessa implícita retornando um valor, e rejeita a promessa levantando uma exceção com throw.
Note: array.map(func) doesn't care that I gave it an async function, it just sees it as a function that returns a promise.
Observação: array.map(func) não se importa que eu lhe atribuí uma função assíncrona, ele a encara apenas como uma função que retorna uma promessa.
We've seen async function() {} already, but the async keyword can be used with other function syntax: Arrow functions
Já vimos async function() {}, mas a palavra-chave async pode ser usada com outra sintaxe de função
In Python, an async function always returns an awaitable type when called.
No Python, uma função assíncrona sempre retorna um tipo aguardável quando chamada.
Here fs.readFile() is a async function whose purpose is to read a file.
Aqui fs.readFile () é uma função assíncrona cuja finalidade é para ler um arquivo.
The AsyncFunction constructor creates a new async function object.
O construtor AsyncFunction cria um novo objeto async function.
Potentially sensitive or inappropriate content
Examples are used only to help you translate the word or expression searched in various contexts. They are not selected or validated by us and can contain inappropriate terms or ideas. Please report examples to be edited or not to be displayed. Potentially sensitive, inappropriate or colloquial translations are usually marked in red or in orange.