Skip to content

E0213: A declarer can't take this declaration ​

A declarer (a decorator of type func(*vuka.Decl)) or a registry decorator (@web.Get) registers the function it decorates, so it needs one it can refer to: not generic, not init, and for a declarer a function, not a type (a type's declarer takes a *vuka.Type).

Wrong ​

vuka
@register
func first[T any](xs []T) T { return xs[0] }
vuka
@register
func firstInt(xs []int) int { return xs[0] }

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.