fantasyland / static-land

Specification for common algebraic structures in JavaScript based on Fantasy Land
MIT License
770 stars 41 forks source link

Spec versioning #1

Open rpominov opened 8 years ago

rpominov commented 8 years ago

We'll probably need to change spec over time. So we can end up in a situation where two libs use different spec versions and can't be used together. We should find the least painful way for dealing with those situations.

rpominov commented 8 years ago

We could require a .specVersion property on type objects (similar to other meta info). The version could be obtained like this:

import {version} from 'static-land'

const MyType = {
  specVersion: version,
  ...
}

Just an idea, did't really considered all cons/pros yet...