Skip to content
New issue

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

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

Already on GitHub? # to your account

Implement a type checker #12

Open
eWert-Online opened this issue Jul 9, 2023 · 1 comment
Open

Implement a type checker #12

eWert-Online opened this issue Jul 9, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@eWert-Online
Copy link
Member

No description provided.

@eWert-Online eWert-Online added the enhancement New feature or request label Jul 9, 2023
@eWert-Online
Copy link
Member Author

Tags could be defined like this:

external Record(
  label: ?string,
) -> map(#tag);

external Array(
  label: ?string, 
  min: ?int, 
  max: ?int,
) -> array(#tag);

external Int(
  label: ?string, 
  min: ?int, 
  max: ?int
) -> int;

external Image(
  label: ?string,
  crop: ?bool,
  sources: array({
    crop: ?bool,
    width: ?int,
    height: ?int,
  })
) -> {
  alt: string,
  sources: array({
    focal_point: ?{ 
      x: int,
      y: int
    },
    width: int,
    height: int,
    url: string,
  })
}

The attribute of is required as soon as it is a type with "subtypes". (array and map currently)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant