- bleistift2@sopuli.xyzEnglish7 months
- Rename every file from *.js to *.ts
- Set the compiler options
{ "checkJs": false, "allowJs": true, "noEmitOnError": false, // so the compiler compiles code it can’t prove right yet. Reset this after you’re done migrating } - Install type packages for dependencies that don’t bring type information out of the box, for instance
npm i -D @types/d3 - Add
// @ts-nocheckto the beginning of every file. - Go through your project file by file, remove the comment from (4) and add types until the errors are gone. And probably fix some errors along the way.
Abbreviated from “TypeScript Cookbook” by Stefan Baumgartner.
- 7 months
I was gonna say “salt bae some
anywherever there are squiggles”.
Your way seems more… Methodical - 7 months
Some LLM is going to be trained on your idea and enact high levels of malicious compliance.
- 7 months
It’s possible it reduces the probability of things like wrongly answered stack overflow questions from being used, so it might actually work a bit.
Kinda like how with image generation, you get vastly better results by adding a negative prompt such as “low quality, jpeg artifacts, extra fingers, bad hands” etc, because the dataset from boorus actually do include a bunch of those tags and using them steers the generation to do thing that don’t have features that match them.
- 7 months
This is my colleague and I will have to clean up the crap, because he doesn’t understand what’s in his own commits.
- 7 months
Fire him. I’m a teacher and I’ve got some wonderfull and talented students that can’t find a job because companies are affraid to hire juniors because of idiots like him.
- 7 months
I’m not his manager. He is a good designer though, so I’m fine as long as he stays with his css and photoshop.
All the function parameter and returns types are going to be “any”.
- 7 months
make no mistakes
LOL. I know it’s for a laugh, but you may as well add “pretty please” to that prompt.
Edit: I wonder if it just hallucinates more convincingly, instead?
sp3ctr4l@lemmy.dbzer0.comEnglish
7 monthsYou know, I tend to at least ask them if they could, or if they would be able to do some code task.
Of course, I’m running a local LLM, because I’m not a monster.
Anyway, would you kindly check this codebase for any local/global var declaration or scope conflicts?
Reminds me of** INTERCAL**, were your program got rejected if you used to many please and/or not enough.
- shalafi@lemmy.worldEnglish7 months
Somebody clue me in on Typescript. I’m somewhat familiar with scripting, PowerShell guy here.
- 7 months
Is JavaScript plus static type checking and a few other syntax enhancements. It is much easier to maintain software with static type checking. The typescript compiler outputs JavaScript
- 7 months
It is much easier to maintain software with static type checking.
Debatable
- 7 months
It’s a superset of JavaScript. The big add is static typing, reducing the chance of runtime type errors. It compiles to vanilla JavaScript for distribution. Other new features include enums, interfaces, and generics for more type safety.
- humorlessrepost@lemmy.worldEnglish7 months
Genuine question: is it really a superset if it’s not still valid javascript? Isn’t it more of an abstraction layer on top of javascript?
- 7 months
Superset means all valid JavaScript is also valid Typescript. (At least, so long as you don’t have compiler setting on that requires all variables to have a type declared.)
- 7 months
In practice people don’t use Typescript as a superset since they have stricter compiler settings, which would make valid JavaScript fail to compile.
- 7 months
It’s basically just a programming language based on and inclusive of JavaScript, but with extra features.
- grego.sh@programming.devEnglish7 months
Laugh all you want, I once made something like that work. Not with one prompt of course. More like two days of prompting, but still… I’m sure if I was doing it by hand it would take me a week of work at least
- 7 months
And no less than a small city’s water usage consumed in the process!
Was it a basic-bitch database on the most normal hardware and software frameworks with no weird compatibility requirements?
- 7 months
Weird that you had to port the language of your uhm…database repository? But whatever it takes to keep track of your basic bitches! 🫡
There are lots of them. Like, billions, and I’m tracking a lot, so ut has to work across multiple drives and potentially devices, sometimes across time zones, with dynamic real time inputs that need to be sanitized, and regular reports to different people who need different formats.
- 7 months
Pretty sure you could do no worse than AI with an hour of search-replace regex.




