You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 16, 2021. It is now read-only.
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:
importTcombfrom'tcomb/create'vartcomb=Tcomb(/* possible options here */)tcomb.fail=()=>…/* override `fail` without collisions with other library authors */exportdefaulttcomb
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'.
As for now,
tcombexports stateful instance, so library users will collide at least intcomb.fail, and if they will extendtcombwith refinements, there's a chance refinements will collide too. It would be great to implementnoConflictmode for 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 stillimport tcomb from 'tcomb'.