Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 518 Bytes

ARC0014.md

File metadata and controls

26 lines (18 loc) · 518 Bytes
title ARC0014: Generic query method
description Fix ARC0014 in Arc TypeScript by removing generic type parameters from model-bound query methods so their endpoint contracts use concrete types.

What

A method decorated with @query() declares a type parameter. Rule: arc-core/arc0014.

Why

An HTTP caller cannot choose the generic argument of a discovered query.

Bad

@query()
static all<T>(): T[] { return []; }

Good

@query()
static all(): TaskItem[] { return []; }