-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create can-define-list and can-define-map #307
Comments
So, I started working on this and released [email protected] and [email protected]. In doing this... a few problems came up. I'm going to detail those here so we can decide what to do. Issuescan-define dependency issueBoth
Right now, these dependencies look like Someone that has this dependency in their package.json:
will still get new versions of One solution to this would be to lock the dependency of This has some development overhead because we'll need to always remember to release all three packages whenever we release This could create really weird scenarios where two lists created differently use different versions of import DefineMap from "can-define-map";
import DefineList from "can-define-list";
const map = new DefineMap({
listOne: [] // This is using [email protected]'s version of can-define/list/list
});
const listTwo = new DefineList([]); // This is using [email protected]'s version of can-define/list/list can-define docs issueThere is also an issue that the docs for If we decide to go ahead with What should we do insteadInstead of creating separate packages, we could make it so you can import
This is uglier, but doesn't have all of the weird problems that Anyone have other ideas? |
Why don't we add |
This would be my preferred method as I could do something like:
or you could just export the object as
This looks a little redundant when you don't destructure.
|
As a user, learning about and typing
can-define/list/list
&can-define/map/map
feels redundant. Additionally, the documented package in the canjs.com sidebar is can-define, which is a lower-level API that people mostly don’t use.The text was updated successfully, but these errors were encountered: