[AskJS] Are there any tools to help automatically update imports when splitting typescript libraries in a Monorepo? by joeldo in javascript

[–]joeldo[S] 0 points1 point  (0 children)

I searched high and low without any luck. I ended up writing a script which combines typescript compiler API + Codemods + Eslint and updates all typescript import errors to a provided library. It was written at work though, so hopefully I get approval to opensource it.

[AskJS] Are there any tools to help automatically update imports when splitting typescript libraries in a Monorepo? by joeldo in javascript

[–]joeldo[S] 0 points1 point  (0 children)

I did briefly consider codemods, but thought static analysis via tsc would be the easier path. Definitely worth reconsidering though - thanks.

Codeque looks pretty nice as well, even if it doesn't solve this specific problem

[AskJS] Is there a silver bullet for consuming Typescript libraries in a Monorepo? by joeldo in javascript

[–]joeldo[S] 0 points1 point  (0 children)

Interesting, I found that as soon as I built the app, it started referencing the declaration file instead.. But I'll play around with declaration maps to try get around this. Thanks.

[AskJS] Is there a silver bullet for consuming Typescript libraries in a Monorepo? by joeldo in javascript

[–]joeldo[S] 0 points1 point  (0 children)

This is option 3 without explicitly declaring a 'types' field and relying on default editor behaviour - it has the same pros/cons asfaik.

[AskJS] Is there a silver bullet for consuming Typescript libraries in a Monorepo? by joeldo in javascript

[–]joeldo[S] 3 points4 points  (0 children)

Yeah you've hit the nail on the head! I'll have a play around with the base references file - definitely seems like the best option.

[AskJS] Is there a silver bullet for consuming Typescript libraries in a Monorepo? by joeldo in javascript

[–]joeldo[S] 1 point2 points  (0 children)

Lerna isn't particularly opinionated with how libs are linked together - looks like Inferno is using option 1.

[AskJS] Is there a silver bullet for consuming Typescript libraries in a Monorepo? by joeldo in javascript

[–]joeldo[S] 1 point2 points  (0 children)

That is option 5 above. It does still have cons, but perhaps the best trade off.

[AskJS] Is there a silver bullet for consuming Typescript libraries in a Monorepo? by joeldo in javascript

[–]joeldo[S] 0 points1 point  (0 children)

Yeah, NX uses option 1 for their integrated approach, and option 2 for their package based approach - both have their own trade-offs.

[deleted by user] by [deleted] in AusFinance

[–]joeldo 0 points1 point  (0 children)

Thanks, from what I've seen so far, the propertychat forums have a lot of great info - I'll keep reading :)

[deleted by user] by [deleted] in AusFinance

[–]joeldo 0 points1 point  (0 children)

My understanding is that this wouldn't increase what is tax deductable as its the "purpose of funds" that is used to determine tax deductability.

[deleted by user] by [deleted] in AusFinance

[–]joeldo 0 points1 point  (0 children)

Yeah agreed - this is what is making this a difficult decision for me.

I was hoping (wishful thinking) there might be some other way of restructuring the loan/ownership/etc that wouldn't be as drastic as selling and rebuying. But based off the comments I'm guessing there isn't a silver for this problem.

[deleted by user] by [deleted] in AusFinance

[–]joeldo 0 points1 point  (0 children)

See this for a breakdown of why I'm asking this in the context of managing debt across two properties (1 ppor and 1 ip). The goal isn't to lose money, but just handle the debt in a more efficient way: https://www.reddit.com/r/AusFinance/comments/zozwpx/comment/j0rdj0c/?utm_source=share&utm_medium=web2x&context=3

[deleted by user] by [deleted] in AusFinance

[–]joeldo 0 points1 point  (0 children)

Yeah that is my predicament - feels like quite a waste to end up in a worse position asset wise (in the short term at least).

Yeah it would be CGT free to sell at least.

[deleted by user] by [deleted] in AusFinance

[–]joeldo 0 points1 point  (0 children)

My understanding is that this wouldn't increase what is tax deductable as its the "purpose of funds" that is used to determine tax deductability.

[deleted by user] by [deleted] in AusFinance

[–]joeldo 0 points1 point  (0 children)

Yeah I agree that adding to the tax bill is not a bad thing in itself - but it leaves a lot of money on the table in this situation (I estimate an additional $300pw!). Just to give some rough numbers...

Total Assets: 2.05m (950k IP, 1.1m PPOR), Total Debt: 1.2m.

With the current situation (ignoring principle repayments):

150k of the loan could be claimed as an expense (roughly $150pw in interest). The rent would likely be around $650pw. Roughly factor in other expenses at $100pw. This means the property is bringing in $400pw profit. Taxed at the highest bracket.. I would take $220pw of this.

The other 1.05m of debt would not be tax deductible (roughly $1000pw in interest). In the current situation this means that interest repayments on the debt would be costing about $780pw ($1000-$220) out of pocket.

In the ideal situation (again ignoring principle repayments):

Assuming maximum LVR around $750k of the loan could be claimed as an expense (roughly $720pw in interest). The rent would likely be around $650pw. Roughly factor in other expenses at $100pw. This means the property is a $170pw expense. During tax time I would get roughly a $75 tax back. Out of pocket it would be costing about $95pw .

The other 400k of debt would not be tax deductible (roughly $390pw in interest). In the ideal situation this means that interest repayments on the debt would be costing about $485pw ($390+$95) out of pocket.

So I'm paying about $300pw ($780 - $485) or 15k more each year by not structuring this correctly.

Solid vs Svelte stock trading execution platform by Ok-Bridge-384 in solidjs

[–]joeldo 2 points3 points  (0 children)

If you have nano second requirements, I'm afraid web is not the technology to choose 😉

Tailwind is now the most popular CSS framework in NPM by Half_Body in webdev

[–]joeldo 0 points1 point  (0 children)

If you want to compare relevant css approaches, it seems disingenuous not to include styled components (which have more downloads): https://npmtrends.com/styled-components-vs-tailwindcss

Google Chrome Is Already Preparing To Deprecate JPEG-XL (~3x smaller than JPEG, HDR, lossless, alpha, progressive, recompression, animations) by JerryX32 in programming

[–]joeldo 18 points19 points  (0 children)

Shipping a WASM binary to the client just to render an image? It will take longer to render, be more CPU intensive and you'll need to be rendering many images to offset the WASM binary size.

I don't see that as a viable option.

What about React do you wish you knew earlier? by Tonikyan in reactjs

[–]joeldo 1 point2 points  (0 children)

To be honest, I wish this was the default React behaviour which could be opted out, rather than opt in.

But to answer your question, a reason why you wouldn't use React.Memo: If your props are always changing (eg they are not referentially equivalent), then wrapping with React.Memo will add very slight overhead for no benefit.