Better HN
topnewbestaskshowjobs
Log inSign up

WebReflection

14 karma · joined Jan 17, 2012 (14y ago) · 3 submissions

Submissions

comment 10mo ago · link · parent

I used to have an extension per each domain then I've decided to publish regurlator https://chromewebstore.google.com/detail/regurlator/jfgfmidm... ... this case would be like `^https:\/\/(?:x|twitter)\.com\/(.+)?$` `https://xcancel.com/$1` so you have a single extension with as many rules as you like and you can download/share/restore rules with ease (it's just a JSON file).

comment 3y ago · link · parent

JSDoc TS is well documented: https://www.typescriptlang.org/docs/handbook/jsdoc-supported...

It's not 1:1 in features though, but because you can import definitions https://www.typescriptlang.org/docs/handbook/jsdoc-supported... you can use a file a part whenever you encounter any of those advanced features / edge cases current JSDoc does not support.

Like other said, it's still TS after all, and there are escape hatches when needed.

In so many projects I use JSDoc TS, the amount of projects that ended up needing a manual .d.ts file not utomatically generated via `tsc` can be counted in half hand.

Maybe people could give it a try, after all if you comment a method, beside its signature and return types, you can as well just move types in there ;-)

comment 11y ago · link · parent

or does it? You are passing arrays of arrays with a potentially random index position based convention that makes no sense to me at first read.

Is that how you pass on real-world code a generic person data around?

Is that how you don't use i18n for string and how you ignore occupations that starts with vowels?

Destructuring is nice as other new features in ES6 but abusing these just because there are there ... no, I don't think that's going to improve any code or any readability.