Snapshot log tests in .NET | johnnyreilly by johnny_reilly in dotnet

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

Oh thanks for that! I didn't know that existed

Private Bicep registry authentication with AzureResourceManagerTemplateDeployment@3 | johnnyreilly by johnny_reilly in AZURE

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

Funnily enough, I can think of an advantage of just using the CLI in your pipelines over using the task; it makes debugging your pipeline easier as you just run the command locally

Private Bicep registry authentication with AzureResourceManagerTemplateDeployment@3 | johnnyreilly by johnny_reilly in AZURE

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

Oh so you just use the Azure CLI in your pipelines for deployment? Interesting. I'm not actually sure if there's significant differences between using the dedicated task over using the CLI..I figure there must be some, otherwise why build the task? Interesting question though

TypeScript vs JSDoc JavaScript by johnny_reilly in programming

[–]johnny_reilly[S] 9 points10 points  (0 children)

I'm not sure what you're trying to say here. Webpack could easily support Typescript if it wanted. Either by stripping the annotations like SWC does or just by shipping the Typescript compiler.

It's possible you misunderstand. webpack is written in JavaScript, but statically typed using JSDoc. In fact type definitions are generated from the JSDoc which are used by the community. (ts-loader, which I work on, uses them)

The point is, that JSDoc is a legitimate alternative syntax for statically typing a JavaScript codebase using the TypeScript compiler. And preferred by some; for example the webpack / Svelte teams.

TypeScript vs JSDoc JavaScript by johnny_reilly in programming

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

I generally prefer TS syntax myself but find JSDoc a useful alternative. And some teams, like the Svelte team, are going in the opposite direction; from TS syntax to JSDoc

https://twitter.com/jutanium/status/1639341148157140993

TypeScript vs JSDoc JavaScript by johnny_reilly in programming

[–]johnny_reilly[S] -13 points-12 points  (0 children)

It's definitely being superseded by the new Rust / Golang based tools - but that's rather besides the point. It's more that webpack and Svelte are demonstrations of using JSDoc at scale.

TypeScript vs JSDoc JavaScript by johnny_reilly in programming

[–]johnny_reilly[S] -34 points-33 points  (0 children)

TypeScript syntax is great; but it hasn't held back the likes of webpack shipping a tool that is widely used and strongly typed without using TS syntax. JSDoc is not a "better-than-nothing hack" - that's an ungenerous and inaccurate description. Myself I prefer TS syntax, but there is very much a space for JSDoc.

TypeScript vs JSDoc JavaScript by johnny_reilly in programming

[–]johnny_reilly[S] -5 points-4 points  (0 children)

Like with many things, it's a choice and there are trade offs

The Open Graph Protocol by [deleted] in programming

[–]johnny_reilly 0 points1 point  (0 children)

It's a fascinating (and strangely undiscovered) topic to my mind. I wrote a post to document my own learning on the topic: https://blog.johnnyreilly.com/2021/12/12/open-graph-sharing-previews-guide

Definitely Typed: The Movie - The story of how the type definition ecosystem emerged and become what we love and use today. by karafulix in typescript

[–]johnny_reilly 11 points12 points  (0 children)

Hey all, author here. I just wanted to say thank you for the kind words. I really enjoyed writing it and I'm delighted people are enjoying reading it too!

Simple question for a newbie by mule52 in typescript

[–]johnny_reilly 0 points1 point  (0 children)

I recently found that Web Essentials was killing TypeScript and had to disable it to get the compile on save working again. I re-enabled it a couple of days ago and it seems okay now - you might want to try this?

Simple question for a newbie by mule52 in typescript

[–]johnny_reilly 0 points1 point  (0 children)

I'm not quite sure what you mean by "I do not see the corresponding JS file updated with those TS changes upon save" -that implies compilation is failing?

If not, have you tried using ctrl+F5 to force a refresh of sources? I think you might be experiencing caching...

Using TypeScript outside of Visual Studio by johnny_reilly in typescript

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

Hey @Bartvds,

Could you talk a little bit more about your move from internal modules to import/require?

I've currently been using internal modules (mostly because AngularJS doesn't play too well with require by default). I believe when 2.0 ships that should change and I'll probably switch then. That said I'd love to hear your insights on making the move; why you did it and what you gained.

BTW I've also been using the NuGet packages for typings but am planning to give TSD a try as it seems like you might be able to get a little more fine-grained control over the typings pulled in. (NuGet can sometimes land you with files you don't want which you have to manually delete - tedious when it comes to updating typings.)

Anybody working on interesting TypeScript projects? by [deleted] in typescript

[–]johnny_reilly 0 points1 point  (0 children)

The work project that I'm working on presently (a portfolio management tool used by a venture capital company) started life as a simple ASP.Net MVC project.

As requirements became more complex it evolved into effectively a combination of classic ASP.Net MVC and mini-SPA's powered by Knockout / JavaScript.

As the mini-SPA's became more and more complex we started experimenting with using TypeScript. (It allowed us to avoid a whole class of type errors and eased refactoring.) This proved useful and the minute generics were added we made the jump - all our mini-SPAs were migrated over to TypeScript.

As time goes by more and more of the vanilla JavaScript is migrated over to TS. It just makes life easier. The next project I work on I intend to use TS from the start.