Skip to content

Rename Node to something better #28

Description

@soenkehahn

Currently the specification of a type Foo has the flow type Node<Foo>. I think Node is a bad name for two reasons:

  • I have no intuition why this is called Node. (I suspect it's called Node because of some internal implementation detail, but I might be wrong.)
  • flow has a built-in type of the same name (https://flow.org/en/docs/react/types/#toc-react-node). So if I'm trying to use Node from validated but forget to import it, I don't get a helpful error message that Node is not in scope, but something confusing. (At least that's what I think happens.)

Could we consider renaming that type?

(To clarify: I'm talking about renaming the type that validated exposes. I don't care about the internals that much.)

We could rename it to Spec, Specification, Schema or something else. I'd be willing to create a PR for this.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions