Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 585 Bytes

ARC0010.md

File metadata and controls

26 lines (18 loc) · 585 Bytes
title ARC0010: Synchronous handler wrapped in a Promise
description Avoid unnecessary async handlers without await.

What

An async command handle() has no await, for await, or returned asynchronous value. Rule: arc-core/arc0010.

Why

Arc accepts synchronous responses directly. Do not remove async mechanically when it changes an existing promise-returning contract or rejection semantics.

Bad

@command()
export class GetValue { async handle() { return 3; } }

Good

@command()
export class GetValue { handle() { return 3; } }