robb / Swim

A DSL for writing HTML in Swift
312 stars 9 forks source link

Add dedicated Key Type #41

Open robb opened 2 years ago

robb commented 2 years ago

This adds a dedicated AttributeKey type and allows any Hashable value as an attribute value.

The idea being that this allows for safe storage of arbitrary data inside a node.

Closes #28

robb commented 2 years ago

I guess what we want for values is AnyTextOutputStreamable, there isn't really a Hashable requirement…