We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The documentation for .set located at https://canjs.com/doc/can-define/map/map.prototype.set.html states:
.set
Assigns value to a property on this map instance called propName. This will define the property if it hasn't already been predefined.
This (defining a property, not previously defined) works for plain (not extended) DefineMaps, but fails to work on the example below.
const MyMap = DefineMap.extend({}); const mapB = new MyMap({}); mapB.set("propA", "value");
The documentation for .set should state (very plainly) that you cannot extend an extended DefineMap and the error it would throw if you try.
As a bonus it might be worth explain /why/ an extended DefineMap is sealed where as a plain DefineMap is not.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The Problem
The documentation for
.set
located at https://canjs.com/doc/can-define/map/map.prototype.set.html states:This (defining a property, not previously defined) works for plain (not extended) DefineMaps, but fails to work on the example below.
The Solution
The documentation for
.set
should state (very plainly) that you cannot extend an extended DefineMap and the error it would throw if you try.As a bonus it might be worth explain /why/ an extended DefineMap is sealed where as a plain DefineMap is not.
The text was updated successfully, but these errors were encountered: