observable icon indicating copy to clipboard operation
observable copied to clipboard

Extensibility of observables

Open jrandolf opened this issue 1 year ago • 2 comments

Does the proposal have any plans for extending existing operators? In our internal implementation, we modify operators using imports of modules that modify the prototype. We think it'd be better if there was an API like customElements.define (e.g. observables.define) that would allow extending the operator API.

jrandolf avatar Apr 06 '24 00:04 jrandolf

we modify operators using imports of modules that modify the prototype. We think it'd be better if there was an API like customElements.define (e.g. observables.define) that would allow extending the operator API.

Can you describe why your proposed method of extensibility would be desirable? What does it provide over your current solution?

domfarolino avatar Aug 13 '24 17:08 domfarolino

You can define additional requirements with the indirection. For example, the operator is required to be a function.

We have had success in just using the prototype, so I wouldn't say the proposed solution is necessary. This question is more about guidance/expectation.

jrandolf avatar Aug 13 '24 20:08 jrandolf