Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using type: "$alias" for explicity #214

Open
CristhianParra opened this issue Apr 16, 2023 · 0 comments
Open

Consider using type: "$alias" for explicity #214

CristhianParra opened this issue Apr 16, 2023 · 0 comments

Comments

@CristhianParra
Copy link

CristhianParra commented Apr 16, 2023

While creating an alias

{
  "group name": {
    "token name": {
      "$value": 1234,
      "$type": "number"
    }
  },
  "alias name": {
    "$value": "{group name.token name}"
  }
}

I think is more explicit to specify an alias type

{
  "group name": {
    "token name": {
      "$value": 1234,
      "$type": "number"
    }
  },
  "alias name": {
    "$value": "{group name.token name}",
    "$type": "alias"
  }
}

Improving readability, and simplifying the implementation of design/translation/documentation tools

It will also make the following rule more clear

"If no explicit type has been set for a token, tools MUST consider the token invalid and not attempt to infer any other type from the value."

And prevent breaking #139

Since a token without type may be an alias, and therefore, not invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants