Comments (2)
Fair enough. I can appreciate that. That linting rule is also not included in the recommended set so I doubt there will be many with this "issue". The other approach with this: void
probably makes a little bit more sense in this context but then again it mostly would cater to this linting rule.
There are some more subtle use for having this: void
, it would also prohibit usage of this within the functions. There are mentions of this in the old ts docs, https://www.typescriptlang.org/docs/handbook/functions.html#this-parameters - but nothing in the new ones as far as I can see. Won't add much - but yeah, let me know if you could accept something like that, if not, feel free to just close this of course.
Thank you for your time 🙌
from wonka.
Hiya 👋 While I'd love to accept the issue and the corresponding PR, I'm failing to determine a reason to, sorry!
To keep it short, a random ESLint rule, that is not being applied to this repository is unfortunately not a reason to accept this issue and PR. Because no function in wonka
is actually using an execution context, whether the function ends up being called bound or unbound is irrelevant. In fact, it would be pretty odd to call it bound to any given context, as there's no relevant need to. It simply does not use prototype inheritance in any sense.
This is why the difference is merely in coding style.
What's also published in the final package output, is basically transpiled & compiled code, as per the Rollup configuration: https://github.com/0no-co/wonka/blob/main/rollup.config.js
As part of this, it's a transpilation detail of whether the functions end up being arrow functions, function expressions, or function declarations. However, writing them as function declarations has the advantage of often not being transpiled away and retaining their name even when minified. This is nice for debugging in Node environments, where sourcemaps are often not used. However, in any browsers, even with a bundler, sourcemaps are still used and make the difference between styled negligible.
I hope that makes sense to you 🙌
from wonka.
Related Issues (20)
- `switchMap` example output not as expected in docs HOT 1
- `Wonka.throttle` example emits `0 5` instead of `0 6` HOT 1
- How to avoid intermediary values when combine uses the same input sources twice? HOT 4
- b is not a function HOT 2
- convert ECMAScript Observable to RXJS Observable HOT 3
- sourcing `./src/Wonka.bs.js` HOT 2
- Question about onStart execution order HOT 5
- a is not a function HOT 4
- New sources and operators? (roadmap) HOT 3
- Missing sourcemaps in distribution? HOT 2
- Wonka manually polyfills Symbol.observable which can cause interoperability issues with other Observable packages HOT 1
- Error DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package
- `dist/wonka.d.ts` failing typecheck on TS 4.9.3+ HOT 2
- v6.2 broke type inference for `pipe`? HOT 2
- Narrowing overload for `filter` HOT 2
- Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier HOT 2
- Invalid documentation exemple for subscribe
- Typescript errors in wonka 6.3.3 HOT 1
- Type inference is incorrect for `pipe(source, consumer)`, if consumer returns a function HOT 1
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 wonka.