Open natew opened 7 years ago
Actually, this could actually be supported in Kontur very generically.
Non-fancy way, property
method:
str.property('index', true)
Super-fancy way, using Proxy:
str.index(true)
// behind the scenes you can
str = new Proxy(str, { get(target, key) {
console.log('add property', key);
return (value) => str.property(key, value)
} })
Wondering, I have a use case to add
.indexable
as an option:https://github.com/pubkey/rxdb/blob/10ec1d926e45485662fabd402cf1da3655183747/test/helper/schemas.js#L36
Rather than for kontur, would be nice to have some way to defining props. Not sure how best to do this, I could Proxy the class I guess and then check on compile, but would need access to compile function.