function getForeignAcpRuntimeError(value: unknown): {
code: AcpRuntimeErrorCode;
message: string;
} | null { if (!(value instanceof Error)) { returnnull;
} const code = (value as { code?: unknown }).code; if (typeof code !== "string" || !ACP_ERROR_CODE_SET.has(code as AcpRuntimeErrorCode)) { returnnull;
} return {
code: code as AcpRuntimeErrorCode,
message: value.message,
};
}
export function isAcpRuntimeError(value: unknown): value is AcpRuntimeError { return value instanceof AcpRuntimeError || getForeignAcpRuntimeError(value) !== 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.