Skip to content

Improve semantics logic to be more generic #14

@hugomrdias

Description

@hugomrdias

I've read through all of this, and it all looks great. I just have one suggestion (which may already be in the pipeline), which is that the logic in semantics.js could probably be made generic for any set of hierarchical actions. So it could be turned into something where maybe instead of a storageSemantics class, there could just be a generic semantics class. So you'd have:

const storageActions = {
  'upload/': {
    '*': {
      'IMPORT',
    }
  }
}

And then you could pass that into the generic semantics class like:

const storageSemantics = sematics(storageActions);

and the tryParsing and tryDelegating methods (and therefore that whole class) then become completely generic and can be used for other cases as well.

You've probably already thought of this, but it's my main suggestion for improvement at the mo.

Originally posted by @adamalton in #3 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions