Comments (4)
That's the same problem. Getters and setters are not supported.
from stamp-specification.
no ,it is not same problem, although i use this simple code:
const yy = stampit().compose({
props: {
i: 'iiiii',
},
methods: {
pp() {
this.i += 'p';
return this.i;
},
},
});
log('object pp:', yy.pp()); //here, get the bug: yy.pp is not a function
log('object pp:', yy.pp());
const zz = stampit().compose({
i: 'iiiii',
pp() {
this.i += 'p';
return this.i;
},
});
log('object pp:', zz.pp()); //here, get the bug: yy.pp is not a function
from stamp-specification.
Oh. I see.
Stampit has more API than the compose function.
https://stampit.js.org/essentials/what-is-a-stamp
In your case the "props" is not recognised by compose function.
from stamp-specification.
thanks, that my mistake, yy is a stamp, not a object, if i want a object, i need stamp it .:) here is the right code:
const yy = stampit().compose({
properties: {
i: 'iiiii',
},
methods: {
pp() {
this.i += 'p';
return this.i;
},
},
});
const yyy=yy();
log('object pp:', yyy.pp());
log('object pp:', yyy.pp());
from stamp-specification.
Related Issues (20)
- Specify details on how are things deeply merged HOT 7
- Allow metadata (descriptors) merging override HOT 6
- Should static methods/props be assigned to a stamp's prototype? HOT 15
- Code review of stamp based project HOT 7
- Out of sync docs HOT 4
- The "composers" proposal HOT 38
- Use `Symbol.hasInstance` to fix `instanceOf` operator HOT 5
- Proposal: rename or alias `compose()` to `blend()` HOT 4
- Typo on compose.js comments
- Looking for resources on Stamp HOT 3
- Proposal: await for an initalizer if it is async HOT 7
- Proposal: new metadata "name" to set stamp's `.name` HOT 2
- when i use compose.js, i got a module error. HOT 2
- getter/setter cannot run HOT 3
- [RFC] Getters and Setters should be copied across with other metadata HOT 2
- The `configuration` vs `deepConfiguration` HOT 3
- Should options default to empty object? HOT 3
- Find a less bulky alternative to mergeWith HOT 3
- Use smaller assign instead of lodash.assign HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stamp-specification.