---
type: snippet
tags: ['error', 'tuple']
status: release
ctime: 2025-01-12
mtime: 2025-01-12
---

- https://github.com/arthurfiorette/proposal-safe-assignment-operator
- https://github.com/arthurfiorette/tuple-it

---

비동기 호출의 결과와 오류를 튜플 형식으로 반환

```ts
const [error, data] = await tuple(someAsyncFunction())
// 성공: [null, 결과값]
// 실패: [error] 또는 [new TupleItError(error)]
```

오류 처리 간소화 - 단일 체크로 오류 관리 가능
