Skip to content

How do I add schema annotations to defprotocol? #117

@scramjet

Description

@scramjet

I'm translating a bunch of doc comments into Schema, but immediately hit the issue: how do I annotate our (copious) protocol definitions?

I'd like something like:

(s/defprotocol ICodec
  (encode-inquiry [this property :- Property]) :- [Byte]))

Is this possible some other way? Or maybe it's in the too hard basket? (I can see this wouldn't necessarily be easy, possibly requiring interfacing with the Clojure compiler).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions