Re: [community-group] $type should be a required property (#139)

> A concern I have with the current specification is that we are not making the "$type" property required. I believe that both the "$type" and "$value" properties should always be required to avoid tools from having to guess a type based on the group type, or even higher scopes.

I fully agree with this.
Even for `string` and `number` the `$type` field should be set in my opinion.
see : https://github.com/design-tokens/community-group/issues/120

Composite types should be typed groups.
see : https://github.com/design-tokens/community-group/issues/126

----

> Nevertheless, in order for this to work well, we must define our core types more precisely and create a complete list of all possible "primitive" token types. In addition, we could have a "default" type that acts like "any" in TypeScript, to be used if a defined type does not provide enough context for a token.

This I do not see the purpose of, but I might be missing the point :)

Tools would be unable to use this token as they do not know its type.

So a `default` or `any` type would create "write only" tokens.
You could store them, but you would be unable to read them.

-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/139#issuecomment-1159691918 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 19 June 2022 11:10:08 UTC