SG
const [
{ value: options = [] },
] = await Promise.allSettled<Options[]>([
loadOptions(),
]);
Ошибка:
error TS2339: Property 'value' does not exist on type 'PromiseSettledResult<any>'.
Size: a a a
SG
const [
{ value: options = [] },
] = await Promise.allSettled<Options[]>([
loadOptions(),
]);
error TS2339: Property 'value' does not exist on type 'PromiseSettledResult<any>'.
SG
value
?SG
SG
AA
const [
{ value: options = [] },
] = await Promise.allSettled<Options[]>([
loadOptions(),
]);
error TS2339: Property 'value' does not exist on type 'PromiseSettledResult<any>'.
SG
SG
interface PromiseFulfilledResult<T> {
status: "fulfilled";
value: T;
}
interface PromiseRejectedResult {
status: "rejected";
reason: any;
}
type PromiseSettledResult<T> = PromiseFulfilledResult<T> | PromiseRejectedResult;
SG
SG
SG
SG
RV
status === "fulfilled"
SG
RV
RV
SG
SG
RV
RV
DB