oleh

Results 30 comments of oleh

I think, framework shouldn't include build-in modules. But I can make something like "common-modules" folder and users will be able to `import` them to their projects.

Maybe this will fit your use case? ```ts class Test { hello = z.function().args(schema).implement((input) => { // `input` is inferred as `{ name: string, age: number }` return 'test' })...

Looks like `Subscription` is inheriting from `EventEmitter`. So the generated return type is correct but it doesn't allow me to write react code like this: ```tsx useEffect(() => { const...

After looking into the `web3.js` documentation, I found out that [it is documented](https://web3js.readthedocs.io/en/v1.3.4/web3-eth-contract.html#contract-events) that `myContract.events.SomeEvent` returns `EventEmitter`. Looks like it is incorrectly documented because if you actually `console.log(subscription)` it shows...

> dependencies-to-arguments map is prone to human error. If you have a derived store with the same types being used, naming your arguments incorrectly will cause issues in the code....

What about this API? ```ts const numerator = writable(1) const denominator = writable(2) const fraction = derived(($) => $(numerator) / $(denominator)) ``` I implemented a POC of this API here...

I really like this API, so I created a simple library: https://www.npmjs.com/package/svelte-reactive ```ts import { reactive } from "svelte-reactive"; const numerator = writable(1) const denominator = writable(2) const fraction =...

Just noticed that `_addPayee` is a private function, so it is only possible to set payees in the `constructor`. My proposal is still valid. EDIT: so my proposal is to...

I think it's possible to solve the issues you outlined using the code from sushiswap's MasterChef. They have dynamically updated shares and rewards for those shares.

Hey. Did you see my attempt #9522? It has a check for `hasContext`, so this code will be properly typechecked: ```ts const a = getContext(key); // T | undefined if...