/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
import { asSettled } from "./async-value"; import { validateContext } from "./context";
if (args.cx) {
validateContext(thunkArgs.getState(), args.cx);
}
result = asSettled(getValue(args, thunkArgs)); if (!result) { // Returning null here is not ideal. This means that the action // resolved but 'getValue' didn't return a loaded value, for instance // if the data the action was meant to store was deleted. In a perfect // world we'd throw a ContextError here or handle cancellation somehow. // Throwing will also allow us to change the return type on the action // to always return a promise for the getValue AsyncValue type, but // for now we have to add an additional '| null' for this case.
return null;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.