A component based functional template language

add optional tags on required bindings #11

Closed t.ewert.foo
Closed opened by t.ewert.foo

Currently only the whole binding can be marked as optional or required. This makes it not possible having an optional tag with a default value being marked as a non nullable binding.

The following code would fail, as the tag attribute is always required.

let tag = #String |> Base_Fn.default("h3");

// Currently needs to be written like this:
// let tag? = #String |> Base_Fn.default("h3");

It should be made possible to write it like this:

let tag = #String? |> Base_Fn.default("h3");

Done

Sign up or Sign in to add to the discussion.