Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Isolated instance of tcomb #321

Description

@StreetStrider

As for now, tcomb exports stateful instance, so library users will collide at least in tcomb.fail, and if they will extend tcomb with refinements, there's a chance refinements will collide too. It would be great to implement noConflict mode for tcomb:

import Tcomb from 'tcomb/create'
var tcomb = Tcomb(/* possible options here */)
tcomb.fail = () =>  /* override `fail` without collisions with other library authors */
export default tcomb

then use later local stateful tcomb.
Library authors will use new import … from 'tcomb/create' to instantiate their own no-conflict instance of tcomb, while app authors may still import tcomb from 'tcomb'.

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