3853 stories
·
3 followers

Drunk Post: Things I’ve Learned as a Senior Engineer

1 Share

A few years ago, a data engineer on r/ExperiencedDevs got drunk and wrote down everything he learned in 10 years of engineering. The original account is deleted, but the post captures something real — the kind of honesty you only get after a few glasses of wine. Preserving it here, typos and all.

Contains the language you’d expect from someone who opened with ‘I’m drunk’.

I’m drunk and I’ll probably regret this, but here’s a drunken rank of things I’ve learned as an engineer for the past 10 years.

  • The best way I’ve advanced my career is by changing companies.

  • Technology stacks don’t really matter because there are like 15 basic patterns of software engineering in my field that apply. I work in data so it’s not going to be the same as webdev or embedded. But all fields have about 10-20 core principles and the tech stack is just trying to make those things easier, so don’t fret overit.

  • There’s a reason why people recommend job hunting. If I’m unsatisfied at a job, it’s probably time to move on.

  • I’ve made some good, lifelong friends at companies I’ve worked with. I don’t need to make that a requirement of every place I work. I’ve been perfectly happy working at places where I didn’t form friendships with my coworkers and I’ve been unhappy at places where I made some great friends.

  • I’ve learned to be honest with my manager. Not too honest, but honest enough where I can be authentic at work. What’s the worse that can happen? He fire me? I’ll just pick up a new job in 2 weeks.

  • If I’m awaken at 2am from being on-call for more than once pesr quarter, then something is seriously wrong and I will either fix it or quit.

pour another glass

  • Qualities of a good manager share a lot of qualities of a good engineer.

  • When I first started, I was enamored with technology and programming and computer science. I’m over it.

  • Good code is code that can be understood by a junior engineer. Great code can be understood by a first year CS freshman. The best code is no code at all.

  • The most underrated skill to learn as an engineer is how to document. Fuck, someone please teach me how to write good documentation. Seriously, if there’s any recommendations, I’d seriously pay for a course (like probably a lot of money, maybe 1k for a course if it guaranteed that I could write good docs.)

  • Related to above, writing good proposals for changes is a great skill.

  • Almost every holy war out there (vim vs emacs, mac vs linux, whatever) doesn’t matter... except one. See below.

  • The older I get, the more I appreciate dynamic languages. Fuck, I said it. Fight me.

  • If I ever find myself thinking I’m the smartest person in the room, it’s time to leave.

  • I don’t know why full stack webdevs are paid so poorly. No really, they should be paid like half a mil a year just base salary. Fuck they have to understand both front end AND back end AND how different browsers work AND networking AND databases AND caching AND differences between web and mobile AND omg what the fuck there’s another framework out there that companies want to use? Seriously, why are webdevs paid so little.

  • We should hire more interns, they’re awesome. Those energetic little fucks with their ideas. Even better when they can question or criticize something. I love interns.

sip

  • Don’t meet your heroes. I paid 5k to take a course by one of my heroes. He’s a brilliant man, but at the end of it I realized that he’s making it up as he goes along like the rest of us.

  • Tech stack matters. OK I just said tech stack doesn’t matter, but hear me out. If you hear Python dev vs C++ dev, you think very different things, right? That’s because certain tools are really good at certain jobs. If you’re not sure what you want to do, just do Java. It’s a shitty programming language that’s good at almost everything.

  • The greatest programming language ever is lisp. I should learn lisp.

  • For beginners, the most lucrative programming language to learn is SQL. Fuck all other languages. If you know SQL and nothing else, you can make bank. Payroll specialtist? Maybe 50k. Payroll specialist who knows SQL? 90k. Average joe with organizational skills at big corp? $40k. Average joe with organization skills AND sql? Call yourself a PM and earn $150k.

  • Tests are important but TDD is a damn cult.

  • Cushy government jobs are not what they are cracked up to be, at least for early to mid-career engineers. Sure, $120k + bennies + pension sound great, but you’ll be selling your soul to work on esoteric proprietary technology. Much respect to government workers but seriously there’s a reason why the median age for engineers at those places is 50+. Advice does not apply to government contractors.

  • Third party recruiters are leeches. However, if you find a good one, seriously develop a good relationship with them. They can help bootstrap your career. How do you know if you have a good one? If they’ve been a third party recruiter for more than 3 years, they’re probably bad. The good ones typically become recruiters are large companies.

  • Options are worthless or can make you a millionaire. They’re probably worthless unless the headcount of engineering is more than 100. Then maybe they are worth something within this decade.

  • Work from home is the tits. But lack of whiteboarding sucks.

  • I’ve never worked at FAANG so I don’t know what I’m missing. But I’ve hired (and not hired) engineers from FAANGs and they don’t know what they’re doing either.

  • My self worth is not a function of or correlated with my total compensation. Capitalism is a poor way to determine self-worth.

  • Managers have less power than you think. Way less power. If you ever thing, why doesn’t Manager XYZ fire somebody, it’s because they can’t.

  • Titles mostly don’t matter. Principal Distinguished Staff Lead Engineer from Whatever Company, whatever. What did you do and what did you accomplish. That’s all people care about.

  • Speaking of titles: early in your career, title changes up are nice. Junior to Mid. Mid to Senior. Senior to Lead. Later in your career, title changes down are nice. That way, you can get the same compensation but then get an increase when you’re promoted. In other words, early in your career (<10 years), title changes UP are good because it lets you grow your skills and responsibilities. Later, title changes down are nice because it lets you grow your salary.

  • Max out our 401ks.

  • Be kind to everyone. Not because it’ll help your career (it will), but because being kind is rewarding by itself.

  • If I didn’t learn something from the junior engineer or intern this past month, I wasn’t paying attention.

Oops I’m out of wine.

  • Paying for classes, books, conferences is worth it. I’ve done a few conferences, a few 1.5k courses, many books, and a subscription. Worth it. This way, I can better pretend what I’m doing.

  • Seriously, why aren’t webdevs paid more? They know everything!!!

  • Carpal tunnel and back problems are no joke. Spend the 1k now on good equipment.

  • The smartest man I’ve every worked for was a Math PhD. I’ve learned so much from that guy. I hope he’s doing well.

  • Once, in high school, there was thing girl who was a great friend of mine. I mean we talked and hung out and shared a lot of personal stuff over a few years. Then there was a rumor that I liked her or that we were going out or whatever. She didn’t take that too well so she started to ignore me. That didn’t feel too good. I guess this would be the modern equivalent to “ghosting”. I don’t wish her any ill will though, and I hope she’s doing great. I’m sorry I didn’t handle that better.

  • I had a girlfriend in 8th grade that I didn’t want to break up with even though I didn’t like her anymore so I just started to ignore her. That was so fucked up. I’m sorry, Lena.

  • You know what the best part of being a software engineer is? You can meet and talk to people who think like you. Not necessarily the same interests like sports and TV shows and stuff. But they think about problems the same way you think of them. That’s pretty cool.

  • There’s not enough women in technology. What a fucked up industry. That needs to change. I’ve been trying to be more encouraging and helpful to the women engineers in our org, but I don’t know what else to do.

  • Same with black engineers. What the hell?

  • I’ve never really started hating a language or technology until I started becoming intimately familiar with it. Also, I think a piece of tech is good if I hate it but I simultaneously would recommend it to a client. Fuck Jenkins but man I don’t think I would be commuting software malpractice by recommending it to a new client.

  • That being said, git is awful and I have choice but to use it. Also, GUI git tools can go to hell, give me the command line any day. There’s like 7 command lines to memorize, everything else can be googled.

  • Since I work in data, I’m going to give a data-specific lessons learned. Fuck pandas.

  • My job is easier because I have semi-technical analysts on my team. Semi-technical because they know programming but not software engineering. This is a blessing because if something doesn’t make sense to them, it means that it was probably badly designed. I love the analysts on the team; they’ve helped me grow so much more than the most brilliant engineers.

  • Dark mode is great until you’re forced to use light mode (webpage or an unsupported app). That’s why I use light mode.

  • I know enough about security to know that I don’t know shit about security.

Crap I’m out of wine.

  • Being a good engineer means knowing best practices. Being a senior engineer means knowing when to break best practices.

  • If people are trying to assign blame to a bug or outage, it’s time to move on.

  • A lot of progressive companies, especially startups, talk about bringing your “authentic self”. Well what if your authentic self is all about watching porn? Yeah, it’s healthy to keep a barrier between your work and personal life.

  • I love drinking with my co-workers during happy hour. I’d rather spend time with kids, family, or friends.

  • The best demonstration of great leadership is when my leader took the fall for a mistake that was 100% my fault. You better believe I would’ve walked over fire for her.

  • On the same token, the best leaders I’ve been privileged to work under did their best to both advocate for my opinions and also explain to me other opinions that conflict with mine. I’m working hard to be like them.

  • Fuck side projects. If you love doing them, great! Even if I had the time to do side-projects, I’m too damn busy writing drunken posts on reddit

  • Algorithms and data strictures are important — to a point. I don’t see pharmacist interviews test trivia about organic chemistry. There’s something fucked with our industry’s interview process.

  • Damn, those devops guys and gals are f’ing smart. At least those mofos get paid though.

  • It’s not important to do what I like. It’s more important to do what I don’t hate.

  • The closer I am to the product, the closer I am to driving revnue, the more I feel valued regardless of how technical my work is. This has been true for even the most progressive companies.

  • Linux is important even when I was working in all Windows. Why? Because I eventually worked in Linux. So happy for those weekend where I screwed around installing Arch.

  • I’ve learned to be wary for ambiguous buzz words like big data. WTF is “big” data? I’ve dealt with 10k rows streaming every 10 minutes in Spark and Kafka and dealt with 1B rows batched up hourly in Python and MySQL. Those labels can go fuck themselves.

  • Not all great jobs are in Silicon Valley. But a lot are.

Oh shit I found beer: let’s keeping going.

  • I once hated a programming language (C#) until I started using it. Now I hated it but think it’s useful.

  • Then I started hating a programming language (C#) and left it and came back. Wow, that programming language has really improved.

  • The greatest thing about functional languages is that functions are first class and all other programmers know that.

  • No matter how great or superior a language is, it doesn’t matter if people don’t use it.

  • Learning a language isn’t hard. It’s learning the ecosystem.

  • Pair programming is great, it just takes a lot of time — time that the company usually doesn’t want to spend.

  • Working with smart engineers has made me a better coder. Working with smart non-technical co-workers has made me a better engineer.

  • Don’t spend time outside of the 9-5 working. Unless you want to because you got a banging project and you’re in the groove. That shit is awesome.

  • Happy hours and social hours across teams are 99% just chilling and getting to know coworkers. That’s cool. Every once in a while, the 1% is about a critical project with a critical piece of code and you’re glad you brought up work in a social setting because shit would’ve hit the fan otherwise. I’m not saying that I should hang out with other teams outside of work because of this. I just want to bond. But it sure as hell is a nice perk.

  • If the company is half remote and half on-site, it’s important to determine if the remote people aren’t treated as second-class citizens. If major decisions are made “at the water cooler”, then it’s better to try to change the company culture (hard) or move on to a different company that treats its remote employees as first class citizens.

  • The second worst major downside of working from home is no whiteboard.

  • The first major downside of working from home is that it’s hard to learn from coworkers. Unless I’m (a) confident and assertive to ask questions and (b) the company has a culture where remote workers are equivelent to on-site workers, I think it was best that I worked on-side for the first 5 years of my career.

  • Everyone knows that tech changes. The tech landscape of the past 10 years has changed dramatically. But fundamentals don’t change very much, especially fundamentals that apply to my field.

  • Hacker news and r/programming is only good to get general ideas and keep up-to-date. The comments are almost worthless.

  • There’s a lot of vocal amateurs with strong opinions about technology. Even amateurs published on “respectable” journals and blogs. I found it to keep abreast of the rumors but to figure things out for myself.

  • I work at a cutting edge startup and we don’t use the latest XYZ tech that was present at ABC cutting edge tech company. And it turn out, what they usually present is only a small percentage of their engineering department and that most of them are using the same tech we are.

  • That being said, it’s important to read the signs. If you want to work with modern tech and you’re company is still doing the majority of it’s development in jQuery, might be time to re-evauluate.

  • Fuck it I’m a data engineer so I might as well give more specific, target advice/experience

  • SQL is king. Databases like MySQL, Postgres, Oracle, SQL Server, SQLite is still supreme. Even if you work with new tech, most of it transfers anyway.

  • Most companies aren’t doing streaming. It’s hard and complicated. If you’re 10 years into your career and you don’t know how to work with 10k records per second, don’t worry about it, there’s still jobs out for you.

  • Airflow is shit, yes. There are other products out there, but fuck me if Airflow isn’t the most widely used.

  • Machine learning projects are highly prone to failure. They’re complicated and hard to implement. Don’t believe me? How easy is it to write fucking unit test a machine learning model? Yeah.

  • Our field is new. There’s no good book on data engineering, just go and “do it”. Can’t learn it through a bootcamp and shit. This will probably change in 10 years as we all figure out what the fuck we’re doing.

  • People die. Do you want your code to be your legacy? If yes, then spend a lot of time on it because that’s your fucking legacy and you go! But if you are like me, your legacy is surrounded with family, friends, and people in your life and not the code you write. So don’t get too hung up on it.

  • Good people write shitty code. Smart people write shitty code. Good coders and good engineers write shitty code. Don’t let code quality be a dependent variable on your self worth.

  • I got into tech and coding because tech was my hobby. Now my hobby is is the same as work and work has ruined my hobby. So now if I want to enjoy tech I need to quit my hobby. Or I need to be OK that tech is no longer my hobby and find new hobbies.

  • Programming and computer science is like, what, 80 years old? Compare that with any other engineering discipline. Yeah, we collectively don’t know what the fuck we’re doing.

  • I’m making pretty good money. Be grateful and appreciate. Also, save.

  • I’ve built large platforms and libraries that are used by multiple teams and people for many years. Yet for some reason, the most proud I was of the code I wrote was the small script that was used by me.

  • The proudest accomplishment of my career has been helping other people be better at their jobs. That’s probably because I’m destined to be a people manager, so this is probably not helpful to other people.

  • When I was looking for a job, I created an updated my Linkedin. I got shit replies and deleted it. Now I use Linkedin to find other candidates to join my company. Bottom line, Linkedin is a lot of noise. I only find it valuable because now, part of my job is contributing to that noise.

  • Once, I found out in college that a girl liked me. I didn’t believe it because I had poor self esteem, but then she asked me out. I told her I wasn’t interested even though she was really cool. That was one of the proudest moments in my life because I as mature enough at 19 to say “no” in a mature way.

  • r/cscareerquestions is such a cesspool of ego and misinformation that I don’t know what to do about it. Like, WTF. I want to shake all those people and try to explain to them how the world really is, but they wouldn’t believe me.

  • I’m drunk and I usually don’t drink, so I would think that everything I say is probably cringy or terrible

  • I feel strongly that people should save and invest money. If you have a 6 figure salary, do your best to max our your 401k please.

  • I’ve become what I’ve always hated: someone who works in tech in a career but avoid tech in real life. Maybe that comes with being old.

  • r/ExperiencedDevs is a pretty cool community. Thank you mods. You get way less appreciation than you deserve. Seriously, thank you.

  • I probably owe my career, my salary, my life to Reddit. Reddit gets a lot of shit but the communities here have lifted me out of poverty (working at a gas station earning min wage) to learning Linux, SQL, python, C#, Python, and others to get me where I am.

  • Kids are great. I don’t have kids by choice. Why? Because I love kids and I’m scared about what kind of father I would be. Oh shit, is that too personal for a post here?

  • Once, someone asked me who I looked up to and I said Conan O’Brien, and they laughed at me. But I was being serous because on his last show on the Tonight Show, he told his audience to be kind and work hard. It happend during a difficult period of my life, and when I watched him say that, I said, you know what, I’m going to do just that. Because what would I have to lose? And you know what? I’ve met some brilliant people who I’ve learned from over 10+ years because I was kind to them. And I’ve grown a lot by working hard and not being afraid to try new things. And my life is infinitely, infinitely better because of those words. So yes, it might seem silly and even ridiculous to say that I’ve achieved a level of fulfillment in my life because of a late night talk show. But you know what, fuck it, it’s my life and I will proudly say that I owe any success I’ve achieved because a fucking comic on late night television.

I’m highly intoxicated so please disregard anything I say. Also apologies for ranting.

I saved this because it’s one of the most honest things I’ve read about our industry. As a data engineer with 10+ years in, I agree with almost all of it — especially the parts about SQL being king, tech stacks not mattering as much as you think, and the best code being no code at all. The only thing I’d push back on is the dynamic languages take. But hey, the man was drunk.

Read the whole story
emrox
35 minutes ago
reply
Hamburg, Germany
Share this story
Delete

The Bag of Tricks for View Transitions

1 Share

The vtbag logo

Your browser does not support view transitions. For details visit the test page.

We honor your request for reduced motion. View transitions are switched off on this site.

Spark up a discussion on the Bag’s Discord or on 🦋 Bluesky! Hit the Discuss on 🦋 buttons to share your thoughts and please stay connected with The Bag and me for all the latest!

The Basics

Everything you ever wanted to know about the View Transition API, in one place. Explore what your browser is capable of and what is new in the API specification.

Dive into examples and see what holds the world of pseudo elements and their styling together at its core.

Tools & Libraries

As you dig deeper into View Transitions, you will quickly see how a little JavaScript here and there can unlock much more and make things even more fun.

You do not have to build everything yourself. The Bag provides battle tested libraries and tools that make working with View Transitions easier, more enjoyable, and practical for real projects.

Fun with View Transitions

A journey told in episodes, starting with simple use cases and moving toward more advanced applications.

Along the way, it covers basic setup, image morphing, fixing broken text transitions, and extended same page examples.

Tips & Tricks

What would a bag of tricks be without a few tips and tricks along the way? Everything here comes straight from real world practice, built for real world use.

I have stumbled through the rough edges, chased down the weird bugs, and made all the mistakes already, so you do not have to.

Tech Demos

Last but not least, it is all about “show, don’t tell”. New techniques are always easier to grasp when you can see them in action instead of just reading about them.

The Tech Demos section at the end of the navigation links to all the examples, and there are, if I may say so with a bit of modesty, a few real gems in there.

Read the whole story
emrox
1 day ago
reply
Hamburg, Germany
Share this story
Delete

Fructose: metabolic signal and modern hazard

1 Share
  • Malik, V. S. & Hu, F. B. The role of sugar-sweetened beverages in the global epidemics of obesity and chronic diseases. Nat. Rev. Endocrinol. 18, 205–218 (2022).

    Article  PubMed  PubMed Central  Google Scholar 

  • World Health Organization. Guideline: sugars intake for adults and children. WHO https://www.who.int/publications/i/item/9789241549028 (2015).

  • Yang, Q. et al. Added sugar intake and cardiovascular diseases mortality among US adults. JAMA Intern. Med. 174, 516–524 (2014).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Russell, C., Baker, P., Grimes, C., Lindberg, R. & Lawrence, M. A. Global trends in added sugars and non-nutritive sweetener use in the packaged food supply: drivers and implications for public health. Public Health Nutr. 26, 952–964 (2023).

    Article  PubMed  Google Scholar 

  • Magkos, F. et al. On the pathogenesis of obesity: causal models and missing pieces of the puzzle. Nat. Metab. 6, 1856–1865 (2024).

    Article  PubMed  Google Scholar 

  • Herman, M. A. & Birnbaum, M. J. Molecular aspects of fructose metabolism and metabolic disease. Cell Metab. 33, 2329–2354 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Woods, H. F. & Krebs, H. A. Lactate production in the perfused rat liver. Biochem. J. 125, 129–139 (1971).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Johnson, R. J. et al. The fructose survival hypothesis for obesity. Philos. Trans. R. Soc. Lond. B. Biol. Sci. 378, 20220230 (2023).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Diggle, C. P. et al. Ketohexokinase: expression and localization of the principal fructose-metabolizing enzyme. J. Histochem. Cytochem. 57, 763–774 (2009).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Li, Y. et al. Ketohexokinase-dependent metabolism of cerebral endogenous fructose in microglia drives diabetes-associated cognitive dysfunction. Exp. Mol. Med. 55, 2417–2432 (2023).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Helsley, R. N. et al. Tissue-specific fructose metabolism in obesity and diabetes. Curr. Diab. Rep. 20, 64 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Maenpaa, P. H., Raivio, K. O. & Kekomaki, M. P. Liver adenine nucleotides: fructose-induced depletion and its effect on protein synthesis. Science 161, 1253–1254 (1968).

    Article  CAS  PubMed  Google Scholar 

  • van den Berghe, G., Bronfman, M., Vanneste, R. & Hers, H. G. The mechanism of adenosine triphosphate depletion in the liver after a load of fructose. A kinetic study of liver adenylate deaminase. Biochem. J. 162, 601–609 (1977).

    Article  PubMed  PubMed Central  Google Scholar 

  • Bawden, S. J. et al. Investigating the effects of an oral fructose challenge on hepatic ATP reserves in healthy volunteers: a (31)P MRS study. Clin. Nutr. 35, 645–649 (2016).

    Article  CAS  PubMed  Google Scholar 

  • Abdelmalek, M. F. et al. Higher dietary fructose is associated with impaired hepatic adenosine triphosphate homeostasis in obese individuals with type 2 diabetes. Hepatology 56, 952–960 (2012).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Bode, J. C., Zelder, O., Rumpelt, H. J. & Wittkamp, U. Depletion of liver adenosine phosphates and metabolic effects of intravenous infusion of fructose or sorbitol in man and in the rat. Eur. J. Clin. Invest. 3, 436–441 (1973).

    Article  CAS  PubMed  Google Scholar 

  • Samarah, L. Z. et al. Spatial metabolic gradients in the liver and small intestine. Nature 648, 182–190 (2025).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Van den Berghe, G. Fructose: metabolism and short-term effects on carbohydrate and purine metabolic pathways. Prog. Biochem. Pharmacol. 21, 1–32 (1986).

    PubMed  Google Scholar 

  • Petrie, J. L. et al. The rate of production of uric acid by hepatocytes is a sensitive index of compromised cell ATP homeostasis. Am. J. Physiol. Endocrinol. Metab. 305, E1255–E1265 (2013).

    Article  CAS  PubMed  Google Scholar 

  • Cox, C. L. et al. Consumption of fructose- but not glucose-sweetened beverages for 10 weeks increases circulating concentrations of uric acid, retinol binding protein-4, and gamma-glutamyl transferase activity in overweight/obese humans. Nutr. Metab. 9, 68 (2012).

    Article  CAS  Google Scholar 

  • Zhang, P. et al. Dietary intake of fructose increases purine de novo synthesis: a crucial mechanism for hyperuricemia. Front. Nutr. 9, 1045805 (2022).

    Article  PubMed  PubMed Central  Google Scholar 

  • Evans, P. R., Farrants, G. W. & Hudson, P. J. Phosphofructokinase: structure and control. Philos. Trans. R. Soc. Lond. B. Biol. Sci. 293, 53–62 (1981).

    Article  CAS  PubMed  Google Scholar 

  • Sun, S. Z. & Empie, M. W. Fructose metabolism in humans - what isotopic tracer studies tell us. Nutr. Metab. 9, 89 (2012).

    Article  Google Scholar 

  • Woods, H. F., Eggleston, L. V. & Krebs, H. A. The cause of hepatic accumulation of fructose 1-phosphate on fructose loading. Biochem. J. 119, 501–510 (1970).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Topping, D. L. & Mayes, P. A. Comparative effects of fructose and glucose on the lipid and carbohydrate metabolism of perfused rat liver. Br. J. Nutr. 36, 113–126 (1976).

    Article  CAS  PubMed  Google Scholar 

  • Delannoy, P. et al. Aldose reductase, fructose and fat production in the liver. Biochem J. 482, 295–307 (2025).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Liu, L. et al. Triose kinase controls the lipogenic potential of fructose and dietary tolerance. Cell Metab. 32, 605–618 (2020).

    Article  CAS  PubMed  Google Scholar 

  • Kim, M. et al. Intestinal, but not hepatic, ChREBP is required for fructose tolerance. JCI Insight 2, e96703 (2017).

    Article  PubMed  PubMed Central  Google Scholar 

  • Kim, M. S. et al. ChREBP regulates fructose-induced glucose production independently of insulin signaling. J. Clin. Invest. 126, 4372–4386 (2016).

    Article  PubMed  PubMed Central  Google Scholar 

  • An, J. et al. Integration of metabolomic and transcriptomic analyses reveals regulatory functions of the ChREBP transcription factor in energy metabolism. Cell Rep. 44, 115278 (2025).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Kabashima, T., Kawaguchi, T., Wadzinski, B. E. & Uyeda, K. Xylulose 5-phosphate mediates glucose-induced lipogenesis by xylulose 5-phosphate-activated protein phosphatase in rat liver. Proc. Natl Acad. Sci. USA 100, 5107–5112 (2003).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Lanaspa, M. A. et al. Uric acid stimulates fructokinase and accelerates fructose metabolism in the development of fatty liver. PLoS ONE 7, e47948 (2012).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Softic, S. et al. Divergent effects of glucose and fructose on hepatic lipogenesis and insulin signaling. J. Clin. Invest. 127, 4059–4074 (2017).

    Article  PubMed  PubMed Central  Google Scholar 

  • Beysen, C. et al. Dose-dependent quantitative effects of acute fructose administration on hepatic de novo lipogenesis in healthy humans. Am. J. Physiol. Endocrinol. Metab. 315, E126–E132 (2018).

    Article  CAS  PubMed  Google Scholar 

  • Stanhope, K. L. et al. Consuming fructose-sweetened, not glucose-sweetened, beverages increases visceral adiposity and lipids and decreases insulin sensitivity in overweight/obese humans. J. Clin. Invest. 119, 1322–1334 (2009).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Taskinen, M. R. et al. Adverse effects of fructose on cardiometabolic risk factors and hepatic lipid metabolism in subjects with abdominal obesity. J. Intern. Med. 282, 187–201 (2017).

    Article  CAS  PubMed  Google Scholar 

  • Cox, C. L. et al. Consumption of fructose-sweetened beverages for 10 weeks reduces net fat oxidation and energy expenditure in overweight/obese men and women. Eur. J. Clin. Nutr. 66, 201–208 (2012).

    Article  CAS  PubMed  Google Scholar 

  • Chong, M. F., Fielding, B. A. & Frayn, K. N. Mechanisms for the acute effect of fructose on postprandial lipemia. Am. J. Clin. Nutr. 85, 1511–1520 (2007).

    Article  CAS  PubMed  Google Scholar 

  • Softic, S. et al. Dietary sugars alter hepatic fatty acid oxidation via transcriptional and post-translational modifications of mitochondrial proteins. Cell Metab. 30, 735–753 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Lanaspa, M. A. et al. Uric acid induces hepatic steatosis by generation of mitochondrial oxidative stress: potential role in fructose-dependent and -independent fatty liver. J. Biol. Chem. 287, 40732–40744 (2012).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Zhao, S. et al. Dietary fructose feeds hepatic lipogenesis via microbiota-derived acetate. Nature 579, 586–591 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Tharabenjasin, P. et al. Acute interactions between intestinal sugar and calcium transport in vitro. Am. J. Physiol. Gastrointest. Liver Physiol. 306, G1–G12 (2014).

    Article  CAS  PubMed  Google Scholar 

  • Johnson, R. J. et al. Fructokinase, fructans, intestinal permeability, and metabolic syndrome: an equine connection? J. Equine Vet. Sci. 33, 120–126 (2013).

    Article  PubMed  PubMed Central  Google Scholar 

  • Todoric, J. et al. Fructose stimulated de novo lipogenesis is promoted by inflammation. Nat. Metab. 2, 1034–1045 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Bergheim, I. et al. Antibiotics protect against fructose-induced hepatic lipid accumulation in mice: role of endotoxin. J. Hepatol. 48, 983–992 (2008).

    Article  CAS  PubMed  Google Scholar 

  • Stanhope, K. L. et al. Consumption of fructose and high fructose corn syrup increase postprandial triglycerides, LDL-cholesterol, and apolipoprotein-B in young men and women. J. Clin. Endocrinol. Metab. 96, E1596–E1605 (2011).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Fowle-Grider, R. et al. Dietary fructose enhances tumour growth indirectly via interorgan lipid transfer. Nature 636, 737–744 (2024).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Taylor, S. R. et al. Dietary fructose improves intestinal cell survival and nutrient absorption. Nature 597, 263–267 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Hirano, T., Mamo, J., Poapst, M. & Steiner, G. Very-low-density lipoprotein triglyceride kinetics in acute and chronic carbohydrate-fed rats. Am. J. Physiol. 255, E236–E240 (1988).

    CAS  PubMed  Google Scholar 

  • Hieronimus, B. & Stanhope, K. L. Dietary fructose and dyslipidemia: new mechanisms involving apolipoprotein CIII. Curr. Opin. Lipidol. 31, 20–26 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Crescenzo, R. et al. Increased hepatic de novo lipogenesis and mitochondrial efficiency in a model of obesity induced by diets rich in fructose. Eur. J. Nutr. 52, 537–545 (2013).

    Article  CAS  PubMed  Google Scholar 

  • Hieronimus, B. et al. Effects of consuming beverages sweetened with fructose, glucose, high-fructose corn syrup, sucrose, or aspartame on OGTT-derived indices of insulin sensitivity in young adults. Nutrients 16, 151 (2024).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Aeberli, I. et al. Moderate amounts of fructose consumption impair insulin sensitivity in healthy young men: a randomized controlled trial. Diabetes Care 36, 150–156 (2013).

    Article  CAS  PubMed  Google Scholar 

  • Baena, M. et al. Fructose, but not glucose, impairs insulin signaling in the three major insulin-sensitive tissues. Sci. Rep. 6, 26149 (2016).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Li, P. et al. A high-fructose diet impairs Akt and PKCzeta phosphorylation and GLUT4 translocation in rat skeletal muscle. Horm. Metab. Res. 40, 528–532 (2008).

    Article  CAS  PubMed  Google Scholar 

  • Rai, A. K. et al. Fructose-induced AGEs-RAGE signaling in skeletal muscle contributes to impairment of glucose homeostasis. J. Nutr. Biochem. 71, 35–44 (2019).

    Article  CAS  PubMed  Google Scholar 

  • Marek, G. et al. Adiponectin resistance and proinflammatory changes in the visceral adipose tissue induced by fructose consumption via ketohexokinase-dependent pathway. Diabetes 64, 508–518 (2015).

    Article  CAS  PubMed  Google Scholar 

  • Andres-Hernando, A. et al. Deletion of fructokinase in the liver or in the intestine reveals differential effects on sugar-induced metabolic dysfunction. Cell Metab. 32, 117–127 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Seyssel, K. et al. Fructose overfeeding in first-degree relatives of type 2 diabetic patients impacts energy metabolism and mitochondrial functions in skeletal muscle. Mol. Nutr. Food Res. 60, 2691–2699 (2016).

    Article  CAS  PubMed  Google Scholar 

  • Schwarz, J. M. et al. Effect of a high-fructose weight-maintaining diet on lipogenesis and liver fat. J. Clin. Endocrinol. Metab. 100, 2434–2442 (2015).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Agrawal, R. et al. Dietary fructose aggravates the pathobiology of traumatic brain injury by influencing energy homeostasis and plasticity. J. Cereb. Blood Flow Metab. 36, 941–953 (2016).

    Article  CAS  PubMed  Google Scholar 

  • Garcia-Arroyo, F. E. et al. Allopurinol prevents the lipogenic response induced by an acute oral fructose challenge in short-term fructose fed rats. Biomolecules 9, 601 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Choi, Y. J. et al. Uric acid induces fat accumulation via generation of endoplasmic reticulum stress and SREBP-1c activation in hepatocytes. Lab Invest. 94, 1114–1125 (2014).

    Article  CAS  PubMed  Google Scholar 

  • Sanchez-Lozada, L. G. et al. Uric acid activates aldose reductase and the polyol pathway for endogenous fructose and fat production causing development of fatty liver in rats. J. Biol. Chem. 294, 4272–4281 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Cicerchi, C. et al. Uric acid-dependent inhibition of AMP kinase induces hepatic glucose production in diabetes and starvation: evolutionary implications of the uricase loss in hominids. FASEB J. 28, 3339–3350 (2014).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Kang, D. H., Park, S. K., Lee, I. K. & Johnson, R. J. Uric acid-induced C-reactive protein expression: implication on cell proliferation and nitric oxide production of human vascular cells. J. Am. Soc. Nephrol. 16, 3553–3562 (2005).

    Article  CAS  PubMed  Google Scholar 

  • Crescenzo, R. et al. Increased skeletal muscle mitochondrial efficiency in rats with fructose-induced alteration in glucose tolerance. Br. J. Nutr. 110, 1996–2003 (2013).

    Article  CAS  PubMed  Google Scholar 

  • Garcia-Berumen, C. I. et al. The severity of rat liver injury by fructose and high fat depends on the degree of respiratory dysfunction and oxidative stress induced in mitochondria. Lipids Health Dis. 18, 78 (2019).

    Article  PubMed  PubMed Central  Google Scholar 

  • Cioffi, F. et al. Fructose-rich diet affects mitochondrial DNA damage and repair in rats. Nutrients 9, 323 (2017).

    Article  PubMed  PubMed Central  Google Scholar 

  • Hernandez-Rios, R. et al. Low fructose and low salt diets increase mitochondrial DNA in white blood cells of overweight subjects. Exp. Clin. Endocrinol. Diabetes 121, 535–538 (2013).

    Article  CAS  PubMed  Google Scholar 

  • Wolf, J. P., Nguyen, N. U., Dumoulin, G. & Berthelay, S. Influence of hypertonic monosaccharide infusions on the release of plasma arginine vasopressin in normal humans. Horm. Metab. Res. 24, 379–383 (1992).

    Article  CAS  PubMed  Google Scholar 

  • Andres-Hernando, A. et al. Vasopressin mediates fructose-induced metabolic syndrome by activating the V1b receptor. JCI Insight 6, e140848 (2021).

    Article  PubMed  PubMed Central  Google Scholar 

  • Kanbay, M. et al. The speed of ingestion of a sugary beverage has an effect on the acute metabolic response to fructose. Nutrients 13, 1916 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Enhorning, S. et al. Plasma copeptin, a unifying factor behind the metabolic syndrome. J. Clin. Endocrinol. Metab. 96, E1065–E1072 (2011).

    Article  PubMed  Google Scholar 

  • Sigala, D. M. et al. Consuming sucrose- or HFCS-sweetened beverages increases hepatic lipid and decreases insulin sensitivity in adults. J. Clin. Endocrinol. Metab. 106, 3248–3264 (2021).

    Article  PubMed  PubMed Central  Google Scholar 

  • Jang, C. et al. The small intestine converts dietary fructose into glucose and organic acids. Cell Metab. 27, 351–361 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Ushijima, K., Riby, J. E., Fujisawa, T. & Kretchmer, N. Absorption of fructose by isolated small intestine of rats is via a specific saturable carrier in the absence of glucose and by the disaccharidase-related transport system in the presence of glucose. J. Nutr. 125, 2156–2164 (1995).

    Article  CAS  PubMed  Google Scholar 

  • Roncal-Jimenez, C. A. et al. Sucrose induces fatty liver and pancreatic inflammation in male breeder rats independent of excess energy intake. Metabolism 60, 1259–1270 (2011).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Socha-Banasiak, A. et al. Intestinal fructose transporters GLUT5 and GLUT2 in children and adolescents with obesity and metabolic disorders. Adv. Med. Sci. 69, 349–355 (2024).

    Article  CAS  PubMed  Google Scholar 

  • Sundborn, G. et al. Are liquid sugars different from solid sugar in their ability to cause metabolic syndrome? Obesity 27, 879–887 (2019).

    Article  CAS  PubMed  Google Scholar 

  • Gonzalez, J. T. Are all sugars equal? Role of the food source in physiological responses to sugars with an emphasis on fruit and fruit juice. Eur. J. Nutr. 63, 1435–1451 (2024).

    Article  PubMed  PubMed Central  Google Scholar 

  • Jung, S. et al. Dietary fibre-adapted gut microbiome clears dietary fructose and reverses hepatic steatosis. Nat. Metab. 7, 1801–1818 (2025).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Francey, C. et al. The extra-splanchnic fructose escape after ingestion of a fructose-glucose drink: an exploratory study in healthy humans using a dual fructose isotope method. Clin. Nutr. ESPEN 29, 125–132 (2019).

    Article  PubMed  Google Scholar 

  • Jones, N. et al. Fructose reprogrammes glutamine-dependent oxidative metabolism to support LPS-induced inflammation. Nat. Commun. 12, 1209 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Song, Z. et al. Role of fructose and fructokinase in acute dehydration-induced vasopressin gene expression and secretion in mice. J. Neurophysiol. 117, 646–654 (2017).

    Article  CAS  PubMed  Google Scholar 

  • Staltner, R. et al. Fructose intake enhances lipoteichoic acid-mediated immune response in monocytes of healthy humans. Redox Biol. 85, 103729 (2025).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Nakagawa, T. et al. Fructose might be a clue to the origin of preeclampsia insights from nature and evolution. Hypertens. Res. 46, 646–653 (2023).

    Article  CAS  PubMed  Google Scholar 

  • Jones, A. R. & Connor, D. E. Fructose metabolism by mature boar spermatozoa. Reprod. Fertil. Dev. 12, 355–359 (2000).

    Article  CAS  PubMed  Google Scholar 

  • Lanaspa, M. A. et al. High salt intake causes leptin resistance and obesity in mice by stimulating endogenous fructose production and metabolism. Proc. Natl Acad. Sci. USA 115, 3138–3143 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Wang, M. et al. Elevated fructose and uric acid through aldose reductase contribute to experimental and human alcoholic liver disease. Hepatology 72, 1617–1637 (2020).

    Article  CAS  PubMed  Google Scholar 

  • Mirtschink, P. & Krek, W. Hypoxia-driven glycolytic and fructolytic metabolic programs: pivotal to hypertrophic heart disease. Biochim. Biophys. Acta 1863, 1822–1828 (2016).

    Article  CAS  PubMed  Google Scholar 

  • Kanbay, M. et al. Responses to hypoxia: how fructose metabolism and hypoxia-inducible factor-1a pathways converge in health and disease. Curr. Nutr. Rep. 12, 181–190 (2023).

    Article  PubMed  Google Scholar 

  • Andres-Hernando, A. et al. Protective role of fructokinase blockade in the pathogenesis of acute kidney injury in mice. Nat. Commun. 8, 14181 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Mirtschink, P. et al. HIF-driven SF3B1 induces KHK-C to enforce fructolysis and heart disease. Nature 522, 444–449 (2015).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Shepherd, E. L. et al. Ketohexokinase inhibition improves NASH by reducing fructose-induced steatosis and fibrogenesis. JHEP Rep. 3, 100217 (2021).

    Article  PubMed  Google Scholar 

  • Wang, S. et al. Acute heat stress upregulates Akr1b3 through Nrf-2 to increase endogenous fructose leading to kidney injury. J. Biol. Chem. 301, 108121 (2025).

    Article  CAS  PubMed  Google Scholar 

  • van Zuylen, M. L. et al. Perioperative cerebrospinal fluid sorbitol and fructose concentrations in patients undergoing thoracic aortic surgery. Br. J. Anaesth. 129, e73–e76 (2022).

    Article  PubMed  Google Scholar 

  • Hwang, J. J. et al. Fructose levels are markedly elevated in cerebrospinal fluid compared to plasma in pregnant women. PLoS ONE 10, e0128582 (2015).

    Article  PubMed  PubMed Central  Google Scholar 

  • Lanaspa, M. A. et al. Endogenous fructose production and metabolism in the liver contributes to the development of metabolic syndrome. Nat. Commun. 4, 2434 (2013).

    Article  PubMed  PubMed Central  Google Scholar 

  • Andres-Hernando, A. et al. Identification of a common ketohexokinase-dependent link driving alcohol intake and alcohol-associated liver disease in mice. Nat. Metab. 7, 2250–2267 (2025).

  • Lanaspa, M. A. et al. Endogenous fructose production and fructokinase activation mediate renal injury in diabetic nephropathy. J. Am. Soc. Nephrol. 25, 2526–2538 (2014).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Roncal Jimenez, C. A. et al. Fructokinase activity mediates dehydration-induced renal injury. Kidney Int. 86, 294–302 (2014).

    Article  CAS  PubMed  Google Scholar 

  • Park, T. J. et al. Fructose-driven glycolysis supports anoxia resistance in the naked mole-rat. Science 356, 307–311 (2017).

    Article  CAS  PubMed  Google Scholar 

  • Hwang, J. J. et al. The human brain produces fructose from glucose. JCI Insight 2, e90508 (2017).

    Article  PubMed  PubMed Central  Google Scholar 

  • Prockop, L. D. Hyperglycemia, polyol accumulation, and increased intracranial pressure. Arch. Neurol. 25, 126–140 (1971).

    Article  CAS  PubMed  Google Scholar 

  • Regenold, W. T. et al. Relationship of cerebrospinal fluid glucose metabolites to MRI deep white matter hyperintensities and treatment resistance in bipolar disorder patients. Bipolar Disord. 10, 753–764 (2008).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Regenold, W. T., Phatak, P., Makley, M. J., Stone, R. D. & Kling, M. A. Cerebrospinal fluid evidence of increased extra-mitochondrial glucose metabolism implicates mitochondrial dysfunction in multiple sclerosis disease progression. J. Neurol. Sci. 275, 106–112 (2008).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Smith, S. L., Novotny, M. & Karmen, A. Elevation of certain polyols in the cerebrospinal fluid of patients with multiple sclerosis. J. Chromatogr. 336, 351–355 (1984).

    Article  CAS  PubMed  Google Scholar 

  • Tigchelaar, C. et al. Elevated cerebrospinal fluid glucose levels and diabetes mellitus are associated with activation of the neurotoxic polyol pathway. Diabetologia 65, 1098–1107 (2022).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Watanabe, S., Kamiyama, J., Chigasaki, H. & Yoshioka, S. Polyol content of cerebrospinal fluid in brain-tumor patients. J. Neurosurg. 70, 183–189 (1989).

    Article  CAS  PubMed  Google Scholar 

  • Xu, J. et al. Elevation of brain glucose and polyol-pathway intermediates with accompanying brain-copper deficiency in patients with Alzheimer’s disease: metabolic basis for dementia. Sci. Rep. 6, 27524 (2016).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Zhao, Q. et al. AKR1B1-dependent fructose metabolism enhances malignancy of cancer cells. Cell Death Differ. 31, 1611–1624 (2024).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Aloia, J. F. Monosaccharides and polyols in diabetes mellitus and uremia. J. Lab. Clin. Med. 82, 809–817 (1973).

    CAS  PubMed  Google Scholar 

  • Daniels, L. J. et al. Elevated myocardial fructose and sorbitol levels are associated with diastolic dysfunction in diabetic patients, and cardiomyocyte lipid inclusions in vitro. Nutr. Diabetes 11, 8 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Heaf, D. J. & Galton, D. J. Sorbitol and other polyols in lens, adipose tissue and urine in diabetes mellitus. Clin. Chim. Acta 63, 41–47 (1975).

    Article  CAS  PubMed  Google Scholar 

  • Nakatsuka, Y. et al. Hyperfructosemia in sleep disordered breathing: metabolome analysis of Nagahama study. Sci. Rep. 13, 12735 (2023).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Canovas, J. A., Wang, L., Mohamed, A. A. M., Abbott, L. F. & Zuker, C. S. A brain center that controls consummatory responses. Cell 118, 6907–6922.e17 (2025).

    Article  Google Scholar 

  • de Araujo, I. E. et al. Food reward in the absence of taste receptor signaling. Neuron 57, 930–941 (2008).

    Article  PubMed  Google Scholar 

  • Andres-Hernando, A. et al. Sugar causes obesity and metabolic syndrome in mice independently of sweet taste. Am. J. Physiol. Endocrinol. Metab. 319, E276–E290 (2020).

    Article  PubMed  PubMed Central  Google Scholar 

  • Payant, M. A. & Chee, M. J. Neural mechanisms underlying the role of fructose in overfeeding. Neurosci. Biobehav. Rev. 128, 346–357 (2021).

    Article  CAS  PubMed  Google Scholar 

  • Cha, S. H., Wolfgang, M., Tokutake, Y., Chohnan, S. & Lane, M. D. Differential effects of central fructose and glucose on hypothalamic malonyl-CoA and food intake. Proc. Natl Acad. Sci. USA 105, 16871–16875 (2008).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Luo, S., Monterosso, J. R., Sarpelleh, K. & Page, K. A. Differential effects of fructose versus glucose on brain and appetitive responses to food cues and decisions for food rewards. Proc. Natl Acad. Sci. USA 112, 6509–6514 (2015).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Purnell, J. Q. et al. Brain functional magnetic resonance imaging response to glucose and fructose infusions in humans. Diabetes Obes. Metab. 13, 229–234 (2011).

    Article  CAS  PubMed  Google Scholar 

  • Johnson, R. J., Wilson, W. L., Bland, S. T. & Lanaspa, M. A. Fructose and uric acid as drivers of a hyperactive foraging response: a clue to behavioral disorders associated with impulsivity or mania? Evol. Hum. Behav. 42, 194–203 (2021).

    Article  PubMed  Google Scholar 

  • Johnson, R. J. et al. Could Alzheimer’s disease be a maladaptation of an evolutionary survival pathway mediated by intracerebral fructose and uric acid metabolism? Am. J. Clin. Nutr. 117, 455–466 (2023).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Friedman, M. I., Harris, R. B., Ji, H., Ramirez, I. & Tordoff, M. G. Fatty acid oxidation affects food intake by altering hepatic energy status. Am. J. Physiol. 276, R1046–R1053 (1999).

    CAS  PubMed  Google Scholar 

  • Ishimoto, T. et al. Opposing effects of fructokinase C and A isoforms on fructose-induced metabolic syndrome in mice. Proc. Natl Acad. Sci. USA 109, 4320–4325 (2012).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Shapiro, A. et al. Fructose-induced leptin resistance exacerbates weight gain in response to subsequent high-fat feeding. Am. J. Physiol. Regul. Integr. Comp. Physiol. 295, R1370–R1375 (2008).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Shapiro, A., Tumer, N., Gao, Y., Cheng, K. Y. & Scarpace, P. J. Prevention and reversal of diet-induced leptin resistance with a sugar-free diet despite high fat content. Br. J. Nutr. 106, 390–397 (2011).

    Article  CAS  PubMed  Google Scholar 

  • Dushay, J. R. et al. Fructose ingestion acutely stimulates circulating FGF21 levels in humans. Mol. Metab. 4, 51–57 (2015).

    Article  CAS  PubMed  Google Scholar 

  • Togo, J., Hu, S., Li, M., Niu, C. & Speakman, J. R. Impact of dietary sucrose on adiposity and glucose homeostasis in C57BL/6J mice depends on mode of ingestion: liquid or solid. Mol. Metab. 27, 22–32 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Miller, C. O. et al. Ketohexokinase knockout mice, a model for essential fructosuria, exhibit altered fructose metabolism and are protected from diet-induced metabolic defects. Am. J. Physiol. Endocrinol. Metab. 315, E386–E393 (2018).

    Article  CAS  PubMed  Google Scholar 

  • Hallfrisch, J. et al. Effects of dietary fructose on plasma glucose and hormone responses in normal and hyperinsulinemic men. J. Nutr. 113, 1819–1826 (1983).

    Article  CAS  PubMed  Google Scholar 

  • Smajis, S. et al. Metabolic effects of a prolonged, very-high-dose dietary fructose challenge in healthy subjects. Am. J. Clin. Nutr. 111, 369–377 (2020).

    Article  PubMed  Google Scholar 

  • Perez-Pozo, S. E. et al. Excessive fructose intake induces the features of metabolic syndrome in healthy adult men: role of uric acid in the hypertensive response. Int. J. Obes. 34, 454–461 (2010).

    Article  CAS  Google Scholar 

  • Cox, C. L. et al. Circulating concentrations of monocyte chemoattractant protein-1, plasminogen activator inhibitor-1, and soluble leukocyte adhesion molecule-1 in overweight/obese men and women consuming fructose- or glucose-sweetened beverages for 10 weeks. J. Clin. Endocrinol. Metab. 96, E2034–E2038 (2011).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Reungjui, S. et al. Thiazide-induced subtle renal injury not observed in states of equivalent hypokalemia. Kidney Int. 72, 1483–1492 (2007).

    Article  CAS  PubMed  Google Scholar 

  • Sievenpiper, J. L. et al. Effect of fructose on body weight in controlled feeding trials: a systematic review and meta-analysis. Ann. Intern. Med. 156, 291–304 (2012).

    Article  PubMed  Google Scholar 

  • Sullivan, J. S. et al. Oral fructose absorption in obese children with non-alcoholic fatty liver disease. Pediatr. Obes. 10, 188–195 (2015).

    Article  CAS  PubMed  Google Scholar 

  • Nakagawa, T. et al. A causal role for uric acid in fructose-induced metabolic syndrome. Am. J. Physiol. Renal Physiol. 290, F625–F631 (2006).

    Article  CAS  PubMed  Google Scholar 

  • Reungjui, S. et al. Thiazide diuretics exacerbate fructose-induced metabolic syndrome. J. Am. Soc. Nephrol. 18, 2724–2731 (2007).

    Article  CAS  PubMed  Google Scholar 

  • Erkin-Cakmak, A. et al. Isocaloric fructose restriction reduces serum d-lactate concentration in children with obesity and metabolic syndrome. J. Clin. Endocrinol. Metab. 104, 3003–3011 (2019).

    Article  PubMed  PubMed Central  Google Scholar 

  • Jensen, T. et al. Fructose and sugar: a major mediator of non-alcoholic fatty liver disease. J. Hepatol. 68, 1063–1075 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Ouyang, X. et al. Fructose consumption as a risk factor for non-alcoholic fatty liver disease. J. Hepatol. 48, 993–999 (2008).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Maersk, M. et al. Sucrose-sweetened beverages increase fat storage in the liver, muscle, and visceral fat depot: a 6-mo randomized intervention study. Am. J. Clin. Nutr. 95, 283–289 (2012).

    Article  CAS  PubMed  Google Scholar 

  • Schwimmer, J. B. et al. Effect of a low free sugar diet vs usual diet on nonalcoholic fatty liver disease in adolescent boys: a randomized clinical trial. JAMA 321, 256–265 (2019).

    Article  PubMed  PubMed Central  Google Scholar 

  • Schwarz, J. M. et al. Effects of dietary fructose restriction on liver fat, de novo lipogenesis, and insulin kinetics in children with obesity. Gastroenterology 153, 743–752 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Ishimoto, T. et al. High-fat and high-sucrose (Western) diet induces steatohepatitis that is dependent on fructokinase. Hepatology 58, 1632–1643 (2013).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Wang, M. et al. Elevated fructose and uric acid via aldose reductase contribute to experimental and human alcoholic liver disease. Hepatology 72, 1617–1637 (2020).

    Article  CAS  PubMed  Google Scholar 

  • Shi, C. et al. Inhibition of aldose reductase ameliorates alcoholic liver disease by activating AMPK and modulating oxidative stress and inflammatory cytokines. Mol. Med. Rep. 16, 2767–2772 (2017).

    Article  CAS  PubMed  Google Scholar 

  • Singh, A. K. et al. Fructose-induced hypertension: essential role of chloride and fructose absorbing transporters PAT1 and Glut5. Kidney Int. 74, 438–447 (2008).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Zhang, R. et al. Abnormal activation of the mineralocorticoid receptor in the aldosterone-sensitive distal nephron contributes to fructose-induced salt-sensitive hypertension. Preprint at bioRxiv https://doi.org/10.1101/2024.08.19.608663 (2024).

  • Sanchez-Lozada, L. G. et al. Sugar, salt, immunity and the cause of primary hypertension. Clin. Kidney J. 16, 1239–1248 (2023).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Cirillo, P. et al. Ketohexokinase-dependent metabolism of fructose induces proinflammatory mediators in proximal tubular cells. J. Am. Soc. Nephrol. 20, 545–553 (2009).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Lodge, M. et al. Fructose regulates the pentose phosphate pathway and induces an inflammatory and resolution phenotype in Kupffer cells. Sci. Rep. 14, 4020 (2024).

    Article  PubMed  PubMed Central  Google Scholar 

  • Johnson, R. J. et al. Do thrifty genes exist? Revisiting uricase. Obesity 30, 1917–1926 (2022).

  • Roncal-Jimenez, C. A. et al. Aging-associated renal disease in mice is fructokinase dependent. Am. J. Physiol. Renal Physiol. 311, F722–F730 (2016).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Chen, W. L. et al. GLUT5-mediated fructose utilization drives lung cancer growth by stimulating fatty acid synthesis and AMPK/mTORC1 signaling. JCI Insight 5, e131596 (2020).

    Article  PubMed  PubMed Central  Google Scholar 

  • Carreno, D. V. et al. Dietary fructose promotes prostate cancer growth. Cancer Res. 81, 2824–2832 (2021).

    Article  CAS  PubMed  Google Scholar 

  • Liu, H. et al. Fructose induces transketolase flux to promote pancreatic cancer growth. Cancer Res. 70, 6368–6376 (2010).

    Article  CAS  PubMed  Google Scholar 

  • Kang, Y. L. et al. The polyol pathway and nuclear ketohexokinase A signaling drive hyperglycemia-induced metastasis of gastric cancer. Exp. Mol. Med. 56, 220–234 (2024).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Kim, J. et al. Ketohexokinase-A acts as a nuclear protein kinase that mediates fructose-induced metastasis in breast cancer. Nat. Commun. 11, 5436 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Goncalves, M. D. et al. High-fructose corn syrup enhances intestinal tumor growth in mice. Science 363, 1345–1349 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Bu, P. et al. Aldolase B-mediated fructose metabolism drives metabolic reprogramming of colon cancer liver metastasis. Cell Metab. 27, 1249–1262 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Xu, D. et al. The protein kinase activity of fructokinase A specifies the antioxidant responses of tumor cells by phosphorylating p62. Sci. Adv. 5, eaav4570 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Tee, S. S. et al. Ketohexokinase-mediated fructose metabolism is lost in hepatocellular carcinoma and can be leveraged for metabolic imaging. Sci. Adv. 8, eabm7985 (2022).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Jeong, S. et al. High fructose drives the serine synthesis pathway in acute myeloid leukemic cells. Cell Metab. 33, 145–159 (2021).

    Article  CAS  PubMed  Google Scholar 

  • Yan, H. et al. Hexokinase 2 senses fructose in tumor-associated macrophages to promote colorectal cancer growth. Cell Metab. 36, 2449–2467 (2024).

    Article  CAS  PubMed  Google Scholar 

  • Schild, T. et al. Metabolic engineering to facilitate anti-tumor immunity. Cancer Cell 43, 552–562 (2025).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Page, K. A. et al. Effects of fructose vs glucose on regional cerebral blood flow in brain regions involved with appetite and reward pathways. JAMA 309, 63–70 (2013).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Regenold, W. T., Phatak, P., Kling, M. A. & Hauser, P. Post-mortem evidence from human brain tissue of disturbed glucose metabolism in mood and psychotic disorders. Mol. Psychiatry 9, 731–733 (2004).

    Article  CAS  PubMed  Google Scholar 

  • Wang, Z. et al. Early life high fructose impairs microglial phagocytosis and neurodevelopment. Nature 644, 759–768 (2025).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Cisternas, P. et al. Fructose consumption reduces hippocampal synaptic plasticity underlying cognitive performance. Biochim. Biophys. Acta 1852, 2379–2390 (2015).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Mohamed, H. E., Asker, M. E., Shaheen, M. A., Eissa, R. G. & Younis, N. N. Alleviation of fructose-induced Alzheimer’s disease in rats by pioglitazone and decaffeinated green coffee bean extract. J. Food Biochem. 45, e13715 (2021).

    Article  CAS  PubMed  Google Scholar 

  • Mohamed, H. E., Asker, M. E., Younis, N. N., Shaheen, M. A. & Eissa, R. G. Modulation of brain insulin signaling in Alzheimer’s disease: new insight on the protective role of green coffee bean extract. Nutr. Neurosci. 23, 27–36 (2020).

    Article  CAS  PubMed  Google Scholar 

  • Steinmann, B., Gitzelmann, R. & Van den Berghe, G. in The Metabolic and Molecular Basis of Inherited Disease (eds Scriver C. et al.) 1489–1520 (McGraw-Hill, 2001).

  • Lanaspa, M. A. et al. Ketohexokinase C blockade ameliorates fructose-induced metabolic dysfunction in fructose-sensitive mice. J. Clin. Invest. 128, 2226–2238 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  • Andres-Hernando, A. et al. Endogenous fructose production and metabolism drive metabolic dysregulation and liver disease in mice with hereditary fructose intolerance. Nutrients 15, 4376 (2023).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Koene, E. J. et al. Safety and efficacy of pharmacological inhibition of ketohexokinase in hereditary fructose intolerance. J. Clin. Invest. 135, e187376 (2025).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Cleave, T. L. & Campbell, G. D. The saccharine disease. Am. J. Proctol. 18, 202–210 (1967).

    CAS  PubMed  Google Scholar 

  • US Department of Health and Human Services. Centers for Disease Control and Prevention. After 20-year increase, new diabetes cases decline. CDC Archive https://archive.cdc.gov/www_cdc_gov/diabetes/research/reports/cdc-research-20yr-report.html (2018).

  • Rader, B., Hazan, R. & Brownstein, J. S. Changes in adult obesity trends in the US. JAMA Health Forum 5, e243685 (2024).

    Article  PubMed  PubMed Central  Google Scholar 

  • Korsmo, H. W., Ekperikpe, U. S. & Daehn, I. S. Emerging roles of xanthine oxidoreductase in chronic kidney disease. Antioxidants 13, 712 (2024).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Saxena, A. R. et al. A phase 2a, randomized, double-blind, placebo-controlled, three-arm, parallel-group study to assess the efficacy, safety, tolerability and pharmacodynamics of PF-06835919 in patients with non-alcoholic fatty liver disease and type 2 diabetes. Diabetes Obes. Metab. 25, 992–1001 (2023).

    Article  CAS  PubMed  Google Scholar 

  • Park, S. H. et al. Knockdown of ketohexokinase versus inhibition of its kinase activity exert divergent effects on fructose metabolism. JCI Insight 9, e184396 (2024).

    Article  PubMed  PubMed Central  Google Scholar 

  • Johnson, R. J. et al. Water scarcity and conservation and their role in obesity in nature and in humans. J. Intern. Med. 298, 562–577 (2025).

    Article  CAS  PubMed  Google Scholar 

  • Perheentupa, J. & Raivio, K. Fructose-induced hyperuricaemia. Lancet 2, 528–531 (1967).

    Article  CAS  PubMed  Google Scholar 

  • Brown, C. M., Dulloo, A. G., Yepuri, G. & Montani, J. P. Fructose ingestion acutely elevates blood pressure in healthy young humans. Am. J. Physiol. Regul. Integr. Comp. Physiol. 294, R730–R737 (2008).

    Article  CAS  PubMed  Google Scholar 

  • Sanchez-Lozada, L. G. et al. Fructose-induced metabolic syndrome is associated with glomerular hypertension and renal microvascular damage in rats. Am. J. Physiol. Renal Physiol. 292, F423–F429 (2007).

    Article  CAS  PubMed  Google Scholar 

  • Read the whole story
    emrox
    3 days ago
    reply
    Hamburg, Germany
    Share this story
    Delete

    The Physics Of GPS | An Interactive Exploration

    1 Share

    How geometry, stopwatches, and Einstein's theories work together to make GPS possible.

    Shri Khalpada

    Shri Khalpada

    If you're like me, you might be entirely dependent on GPS to navigate the world. At some point, you may have caught yourself wondering during those panicked moments when an exit is coming up and your phone is recalibrating: how does my phone even know where I am?

    The answer is in some ways simpler than you'd expect, and in other ways more complex. GPS is fundamentally a translation tool: it converts time into distance. A satellite sends a signal, your phone catches it, and the delay between those two events tells the phone exactly how far away the satellite is. Everything else is about making that measurement precise enough to be useful: accounting for bad clocks, satellite geometry, and eventually, Einstein's theories.

    The Ruler

    TL;DR

    GPS turns time into distance. 1 nanosecond of signal travel = 0.3 meters.

    Every GPS measurement starts with a stopwatch. A satellite broadcasts a signal at the speed of light. Your phone receives it and checks how long the trip took. Multiply the travel time by the speed of light, and you get the distance.

    This is the fundamental building block of GPS.

    One Satellite, One Ring

    TL;DR

    One satellite tells you how far away you are, but not which direction. You could be anywhere on a ring.

    Measuring a single satellite gives you a distance, but not a direction. If a signal takes to reach your phone, you are roughly from the satellite. If you took every point at that distance from the satellite, you would get a ring on the surface of the Earth (technically an oblate spheroid, but effectively a ring for our purposes). One satellite tells us we're somewhere on that ring, but it can't tell us where exactly.

    Not to scale

    Satellite A sends a signal to your phone at the speed of light.

    The ring shows every point on Earth at the same distance from the satellite. You are somewhere on this ring.

    Three Satellites, One Point

    TL;DR

    Three satellites produce three rings that intersect at a single point: your location.

    One ring isn't enough since you could be anywhere along it. A second satellite produces a second ring which crosses the first one at exactly two points. A third satellite produces a third ring, which passes through only one of those two points.

    This process is called trilateration. Each satellite gives you one equation:

    is the known position of satellite , and is the measured distance. We can solve for three unknowns with three equations.

    Not to scale

    Each satellite's ring passes through your location.

    Three rings converge on a single point. We've turned time into a coordinate!

    The Clock Problem

    TL;DR

    Your phone's clock is (relatively) bad. A 4th satellite fixes it because with four satellites, there is only one clock correction that makes all four spheres intersect at a single point.

    There's a problem with the math above: it assumes your phone knows the travel time perfectly.

    Each GPS satellite carries an incredibly precise atomic clock, accurate to about . Your phone has a much cheaper quartz crystal oscillator that can naturally drift by microseconds (thousands of nanoseconds). Since of clock error produces of position error, even of drift puts you off. Without accounting for this, GPS would become pretty useless pretty quickly!

    The fix is to add another satellite.

    In simple terms: there is only one specific clock correction possible where all four spheres intersect at a single, perfect point. The 4th satellite gives the receiver enough information to find it. Once it does, it corrects every distance measurement at once, and the previously fuzzy answer snaps into focus. Conceptually, you can think about the system doing some math to figure out how to make the new red ring below perfectly intersect with the other three rings.

    Not to scale

    The 4th satellite adds a 4th equation. With three satellites, any clock error produces multiple possible intersections. With four, there is only one clock correction that makes all four spheres meet at a single point.

    This is also why your phone's clock is so accurate. It's constantly being synced to atomic clocks in space!

    The Relativity Tax

    TL;DR

    Without Einstein's corrections, GPS drifts by ~10 km per day.

    Even with four satellites and a solved clock, we're not quite done yet.

    To understand why, we have to think of time itself as a clock that can be sped up or slowed down by its surroundings. GPS has to account for two specific distortions:

    • Special Relativity (speed): Einstein discovered that the faster an object moves, the slower time passes for it. GPS satellites move at roughly , so their clocks lose about per day compared to ours.
    • General Relativity (gravity): Gravity also warps time. The further you are from a massive object like Earth, the faster time ticks. The satellites orbit at altitude in weaker gravity, so their clocks gain about per day.

    These two effects don't cancel out. The gravity gain is much stronger than the speed loss.

    Without a correction, the satellite clocks would run ahead of ground clocks every day. Because light travels every microsecond, that small offset would cause your position to drift by roughly every 24 hours.

    Engineers bake this correction into the hardware. The satellite clocks are built to tick slightly too slow on the ground, at instead of the nominal . Once in orbit, the combination of weaker gravity and orbital speed makes them tick at exactly the correct rate.

    Not to scale

    Day 0: drift = 0 μs≈ 0 km error

    Without these corrections, GPS would become unusable within hours. The fact that your phone can pinpoint your location to within a few meters is, in addition to being a modern miracle, a quiet and continuous proof that Einstein was right.

    A Joint Effort

    In practice, your phone doesn't stop at four satellites. Modern receivers typically lock onto 8 to 12 at once, sometimes more. The extra signals don't change the core math, but they let the receiver average out errors and pick the best satellite geometry. More satellites means sharper intersections and a more stable fix.

    And it's not just the American GPS constellation. Russia operates GLONASS, the EU has Galileo, and China has BeiDou. Your phone can listen to all of them simultaneously. That means over 100 atomic stopwatches orbiting overhead, built by different countries, all working together to tell you where you are.

    Distances and Earth's size are to scale. Showing 147 live GNSS satellites via CelesTrak (data refreshed within last hour).

    GPS (USA) GLONASS (Russia) BeiDou (China) Galileo (EU)

    Satellite placement also matters. If the satellites are clumped together in one part of the sky, their rings intersect at very shallow angles. This creates a wide, blurry area of uncertainty around the true position. GPS engineers call this Geometric Dilution of Precision (GDOP). Good geometry means satellites spread across the sky, so that their rings cross at sharp angles and produce a tight, high-confidence intersection point. Your phone's GPS chip automatically selects the best combination of visible satellites to minimize GDOP.

    In cities, GPS signals can bounce off buildings before reaching your phone. This makes the stopwatch think you are further away than you actually are, because the signal took a longer path. This is called multipath error, and it's the main reason GPS gets less accurate in dense urban areas. Modern receivers use multiple techniques to detect and filter out these reflected signals, but it remains one of the hardest problems in GPS.

    With all that said, I find it amazing that your phone can pinpoint your location to within a few meters using nothing more than the time it takes light to travel from a few satellites tens of thousands of kilometers away.

    If you want to go much deeper, Bartosz Ciechanowski's interactive explainer on GPS is the gold standard. It covers signal modulation, orbital mechanics, and receiver architecture in far more detail than we do here.

    Thank you!

    If you like this type of content, you can follow me on BlueSky. If you wanted to support me further, buying me a coffee would be much appreciated. It helps us keep the lights on and the servers running! ☕

    Read the whole story
    emrox
    9 days ago
    reply
    Hamburg, Germany
    Share this story
    Delete

    Morale

    1 Share

    Morale

    And more PROD3000.

    Read the whole story
    emrox
    29 days ago
    reply
    Hamburg, Germany
    Share this story
    Delete

    Announcing TypeScript 6.0 - TypeScript

    1 Share

    Today we are excited to announce the availability of TypeScript 6.0!

    If you are not familiar with TypeScript, it’s a language that builds on JavaScript by adding syntax for types, which enables type-checking to catch errors, and provide rich editor tooling. You can learn more about TypeScript and how to get started on the TypeScript website.

    But if you’re already familiar with the language, you can get TypeScript 6.0 through npm with the following command:

    npm install -D typescript
    

    TypeScript 6.0 is a unique release in that we intend for it to be the last release based on the current JavaScript codebase. As announced last year (with recent updates here), we are working on a new codebase for the TypeScript compiler and language service written in Go that takes advantage of the speed of native code and shared-memory multi-threading. That new codebase will be the foundation of TypeScript 7.0 and beyond.

    TypeScript 6.0 acts as the bridge between TypeScript 5.9 and 7.0. As such, most changes in TypeScript 6.0 are meant to help align and prepare for adopting TypeScript 7.0. It may seem surprising to say, but TypeScript 7.0 is actually extremely close to completion. You can try it out in Visual Studio Code or install it from npm. In fact, if you’re able to adopt TypeScript 6.0, we encourage you to try out the native previews of TypeScript 7.0.

    With that said, there are some new features and improvements in TypeScript 6.0s that are not just about alignment. Let’s take a look at some of the highlights of this release, followed by a more detailed look at what’s changing for 7.0 and how to prepare for it.

    What’s New Since the Beta and RC?

    Since TypeScript 6.0 beta, we have made a few noteworthy changes – mostly to align with the behavior of TypeScript 7.0.

    One adjustment is in type-checking for function expressions in generic calls, especially those occurring in generic JSX expressions (see this pull request). This will typically catch more bugs in existing code, though you may find that some generic calls may need an explicit type argument.

    We have also extended our deprecation of import assertion syntax (i.e. import ... assert {...}) to import() calls like import(..., { assert: {...}})

    Finally, we have updated the DOM types to reflect the latest web standards, including some adjustments to the Temporal APIs as well.

    Less Context-Sensitivity on this-less Functions

    When parameters don’t have explicit types written out, TypeScript can usually infer them based on an expected type, or even through other arguments in the same function call.

    declare function callIt<T>(obj: {
        produce: (x: number) => T,
        consume: (y: T) => void,
    }): void;
    
    // Works, no issues.
    callIt({
        produce: (x: number) => x * 2,
        consume: y => y.toFixed(),
    });
    
    // Works, no issues even though the order of the properties is flipped.
    callIt({
        consume: y => y.toFixed(),
        produce: (x: number) => x * 2,
    });
    

    Here, TypeScript can infer the type of y in the consume function based on the inferred T from the produce function, regardless of the order of the properties. But what about if these functions were written using method syntax instead of arrow function syntax?

    declare function callIt<T>(obj: {
        produce: (x: number) => T,
        consume: (y: T) => void,
    }): void;
    
    // Works fine, `x` is inferred to be a number.
    callIt({
        produce(x: number) { return x * 2; },
        consume(y) { return y.toFixed(); },
    });
    
    callIt({
        consume(y) { return y.toFixed(); },
        //                  ~
        // error: 'y' is of type 'unknown'.
    
        produce(x: number) { return x * 2; },
    });
    

    Strangely enough, the second call to callIt results in an error because TypeScript is not able to infer the type of y in the consume method. What’s happening here is that when TypeScript is trying to find candidates for T, it will first skip over functions whose parameters don’t have explicit types. It does this because certain functions may need the inferred type of T to be correctly checked – in our case, we need to know the type of T to analyze our consume function.

    These functions are called contextually sensitive functions – basically, functions that have parameters without explicit types. Eventually the type system will need to figure out types for these parameters – but this is a bit at odds with how inference works in generic functions because the two "pull" on types in different directions.

    function callFunc<T>(callback: (x: T) => void, value: T) {
        return callback(value);
    }
    
    callFunc(x => x.toFixed(), 42);
    //       ^
    // We need to figure out the type of `x` here,
    // but we also need to figure out the type of `T` to check the callback.
    

    To solve this, TypeScript skips over contextually sensitive functions during type argument inference, and instead checks and infers from other arguments first. If skipping over contextually sensitive functions doesn’t work, inference just continues across any unchecked arguments, going left-to-right in the argument list. In the example immediately above, TypeScript will skip over the callback during inference for T, but will then look at the second argument, 42, and infer that T is number. Then, when it comes back to check the callback, it will have a contextual type of (x: number) => void, which allows it to infer that x is a number as well.

    So what’s going on in our earlier examples?

    // Arrow syntax - no errors.
    callIt({
        consume: y => y.toFixed(),
        produce: (x: number) => x * 2,
    });
    
    // Method syntax - errors!
    callIt({
        consume(y) { return y.toFixed(); },
        //                  ~
        // error: 'y' is of type 'unknown'.
    
        produce(x: number) { return x * 2; },
    });
    

    In both examples, produce is assigned a function with an explicitly-typed x parameter. Shouldn’t they be checked identically?

    The issue is subtle: most functions (like the ones using method syntax) have an implicit this parameter, but arrow functions do not. Any usage of this could require "pulling" on the type of T – for example, knowing the type of the containing object literal could in turn require the type of consume, which uses T.

    But we’re not using this! Sure, the function might have a this value at runtime, but it’s never used!

    TypeScript 6.0 takes this into account when it decides if a function is contextually sensitive or not. If this is never actually used in a function, then it is not considered contextually sensitive. That means these functions will be seen as higher-priority when it comes to type inference, and all of our examples above now work!

    This change was provided thanks to the work of Mateusz Burzyński.

    Subpath Imports Starting with #/

    When Node.js added support for modules, it added a feature called "subpath imports". This is basically a field called imports which allows packages to create internal aliases for modules within their package.

    {
        "name": "my-package",
        "type": "module",
        "imports": {
            "#root/*": "./dist/*"
        }
    }
    

    This allows modules in my-package to import from paths starting with #root/

    import * as utils from "#root/utils.js";
    

    instead of using a relative path like the following.

    import * as utils from "../../utils.js";
    

    One minor annoyance with this feature has been that developers always had to write something after the # when specifying a subpath import. Here, we used root, but it is a bit useless since there is no directory we’re mapping over other than ./dist/

    Developers who have used bundlers are also accustomed to using path-mapping to avoid long relative paths. A familiar convention with bundlers has been to use a simple @/ as the prefix. Unfortunately, subpath imports could not start with #/ at all, leading to a lot of confusion for developers trying to adopt them in their projects.

    But more recently, Node.js added support for subpath imports starting with #/. This allows packages to use a simple #/ prefix for their subpath imports without needing to add an extra segment.

    {
        "name": "my-package",
        "type": "module",
        "imports": {
            "#/*": "./dist/*"
        }
    }
    

    This is supported in newer Node.js 20 releases, and so TypeScript now supports it under the options nodenext and bundler for the --moduleResolution setting.

    This work was done thanks to magic-akari, and the implementing pull request can be found here.

    Combining --moduleResolution bundler with --module commonjs

    TypeScript’s --moduleResolution bundler setting was previously only allowed to be used with --module esnext or --module preserve; however, with the deprecation of --moduleResolution node (a.k.a. --moduleResolution node10), this new combination is often the most suitable upgrade path for many projects.

    Projects will often want to instead plan out a migration towards either

    • --module preserve and --moduleResolution bundler
    • --module nodenext

    depending on your project type (e.g. bundled web app, Bun app, or Node.js app).

    More information can be found at this implementing pull request.

    The --stableTypeOrdering Flag

    As part of our ongoing work on TypeScript’s native port, we’ve introduced a new flag called --stableTypeOrdering intended to assist with 6.0-to-7.0 migrations.

    Today, TypeScript assigns type IDs (internal tracking numbers) to types in the order they are encountered, and uses these IDs to sort union types in a consistent manner. A similar process occurs for properties. As a result, the order in which things are declared in a program can have possibly surprising effects on things like declaration emit.

    For example, consider the declaration emit from this file:

    // Input: some-file.ts
    export function foo(condition: boolean) {
        return condition ? 100 : 500;
    }
    
    // Output: some-file.d.ts
    export declare function foo(condition: boolean): 100 | 500;
    //                                               ^^^^^^^^^
    //             Note the order of this union: 100, then 500.
    

    If we add an unrelated const above foo, the declaration emit changes:

    // Input: some-file.ts
    const x = 500;
    export function foo(condition: boolean) {
        return condition ? 100 : 500;
    }
    
    // Output: some-file.d.ts
    export declare function foo(condition: boolean): 500 | 100;
    //                                               ^^^^^^^^^
    //                           Note the change in order here.
    

    This happens because the literal type 500 gets a lower type ID than 100 because it was processed first when analyzing the const x declaration. In very rare cases this change in ordering can even cause errors to appear or disappear based on program processing order, but in general, the main place you might notice this ordering is in the emitted declaration files, or in the way types are displayed in your editor.

    One of the major architectural improvements in TypeScript 7 is parallel type checking, which dramatically improves overall check time. However, parallelism introduces a challenge: when different type-checkers visit nodes, types, and symbols in different orders, the internal IDs assigned to these constructs become non-deterministic. This in turn leads to confusing non-deterministic output, where two files with identical contents in the same program can produce different declaration files, or even calculate different errors when analyzing the same file. To fix this, TypeScript 7.0 sorts its internal objects (e.g. types and symbols) according to a deterministic algorithm based on the content of the object. This ensures that all checkers encounter the same object order regardless of how and when they were created. As a consequence, in the given example, TypeScript 7 will always print 100 | 500, removing the ordering instability entirely.

    This means that TypeScript 6 and 7 can and do sometimes display different ordering. While these ordering changes are almost always benign, if you’re comparing compiler outputs between runs (for example, checking emitted declaration files in 6.0 vs 7.0), these different orderings can produce a lot of noise that makes it difficult to assess correctness. Occasionally though, you may witness a change in ordering that causes a type error to appear or disappear, which can be even more confusing.

    To help with this situation, in 6.0, you can specify the new --stableTypeOrdering flag. This makes 6.0’s type ordering behavior match 7.0’s, reducing the number of differences between the two codebases. Note that we don’t necessarily encourage using this flag all the time as it can add a substantial slowdown to type-checking (up to 25% depending on codebase).

    If you encounter a type error using --stableTypeOrdering, this is typically due to inference differences. The previous inference without --stableTypeOrdering happened to work based on the current ordering of types in your program. To help with this, you’ll often benefit from providing an explicit type somewhere. Often, this will be a type argument

    - someFunctionCall(/*...*/);
    + someFunctionCall<SomeExplicitType>(/*...*/);
    

    or a variable annotation for an argument you intend to pass into a call.

    - const someVariable = { /*... some complex object ...*/ };
    + const someVariable: SomeExplicitType = { /*... some complex object ...*/ };
    
    someFunctionCall(someVariable);
    

    Note that this flag is only intended to help diagnose differences between 6.0 and 7.0 – it is not intended to be used as a long-term feature

    See more at this pull-request.

    es2025 option for target and lib

    TypeScript 6.0 adds support for the es2025 option for both target and lib. While there are no new JavaScript language features in ES2025, this new target adds new types for built-in APIs (e.g. RegExp.escape), and moves a few declarations from esnext into es2025 (e.g. Promise.try, Iterator methods, and Set methods). Work to enable the new target was contributed thanks to Kenta Moriuchi.

    New Types for Temporal

    The long-awaited Temporal proposal has reached stage 4 and will be part of a future ECMAScript standard. TypeScript 6.0 now includes built-in types for the Temporal API, so you can start using it in your TypeScript code today via --target esnext or "lib": ["esnext"] (or the more-granular esnext.temporal).

    let yesterday = Temporal.Now.instant().subtract({
        hours: 24,
    });
    
    let tomorrow = Temporal.Now.instant().add({
        hours: 24,
    });
    
    console.log(`Yesterday: ${yesterday}`);
    console.log(`Tomorrow: ${tomorrow}`);
    

    Temporal is already usable in several runtimes, and with stage 4 status it is now officially part of the JavaScript language. Documentation on the Temporal APIs is available on MDN.

    This work was contributed thanks to GitHub user Renegade334.

    New Types for "upsert" Methods (a.k.a. getOrInsert)

    A common pattern with Maps is to check if a key exists, and if not, set and fetch a default value.

    function processOptions(compilerOptions: Map<string, unknown>) {
        let strictValue: unknown;
        if (compilerOptions.has("strict")) {
            strictValue = compilerOptions.get("strict");
        }
        else {
            strictValue = true;
            compilerOptions.set("strict", strictValue);
        }
        // ...
    }
    

    This pattern can be tedious. ECMAScript’s "upsert" proposal recently reached stage 4, and introduces 2 new methods on Map and WeakMap:

    • getOrInsert
    • getOrInsertComputed

    These methods have been added to the esnext lib so that you can start using them immediately in TypeScript 6.0.

    With getOrInsert, we can replace our code above with the following:

    function processOptions(compilerOptions: Map<string, unknown>) {
        let strictValue = compilerOptions.getOrInsert("strict", true);
        // ...
    }
    

    getOrInsertComputed works similarly, but is for cases where the default value may be expensive to compute (e.g. requires lots of computations, allocations, or does long-running synchronous I/O). Instead, it takes a callback that will only be called if the key is not already present.

    someMap.getOrInsertComputed("someKey", () => {
        return computeSomeExpensiveValue(/*...*/);
    });
    

    This callback is also given the key as an argument, which can be useful for cases where the default value is based on the key.

    someMap.getOrInsertComputed(someKey, computeSomeExpensiveDefaultValue);
    
    function computeSomeExpensiveValue(key: string) {
        // ...
    }
    

    This update was contributed thanks to GitHub user Renegade334.

    RegExp.escape

    When constructing some literal string to match within a regular expression, it is important to escape special regular expression characters like *, +, ?, (, ), etc. The RegExp Escaping ECMAScript proposal has reached stage 4, and introduces a new RegExp.escape function that takes care of this for you.

    function matchWholeWord(word: string, text: string) {
        const escapedWord = RegExp.escape(word);
        const regex = new RegExp(`\\b${escapedWord}\\b`, "g");
        return text.match(regex);
    }
    

    RegExp.escape is available in the es2025 lib, so you can start using it in TypeScript 6.0 today.

    This work was contributed thanks Kenta Moriuchi.

    The dom lib Now Contains dom.iterable and dom.asynciterable

    TypeScript’s lib option allows you to specify which global declarations your target runtime has. One option is dom to represent web environments (i.e. browsers, who implement the DOM APIs). Previously, the DOM APIs were partially split out into dom.iterable and dom.asynciterable for environments that didn’t support Iterables and AsyncIterables. This meant that you had to explicitly add dom.iterable to use iteration methods on DOM collections like NodeList or HTMLCollection.

    In TypeScript 6.0, the contents of lib.dom.iterable.d.ts and lib.dom.asynciterable.d.ts are fully included in lib.dom.d.ts. You can still reference dom.iterable and dom.asynciterable in your configuration file’s "lib" array, but they are now just empty files.

    // Before TypeScript 6.0, this required "lib": ["dom", "dom.iterable"]
    // Now it works with just "lib": ["dom"]
    for (const element of document.querySelectorAll("div")) {
        console.log(element.textContent);
    }
    

    This is a quality-of-life improvement that eliminates a common point of confusion, since no major modern browser lacks these capabilities. If you were already including both dom and dom.iterable, you can now simplify to just dom.

    See more at this issue and its corresponding pull request.

    Breaking Changes and Deprecations in TypeScript 6.0

    TypeScript 6.0 arrives as a significant transition release, designed to prepare developers for TypeScript 7.0, the upcoming native port of the TypeScript compiler. While TypeScript 6.0 maintains full compatibility with your existing TypeScript knowledge and continues to be API compatible with TypeScript 5.9, this release introduces a number of breaking changes and deprecations that reflect the evolving JavaScript ecosystem and set the stage for TypeScript 7.0.

    In the two years since TypeScript 5.0, we’ve seen ongoing shifts in how developers write and ship JavaScript:

    • Virtually every runtime environment is now "evergreen". True legacy environments (ES5) are vanishingly rare.
    • Bundlers and ESM have become the most common module targets for new projects, though CommonJS remains a major target. AMD and other in-browser userland module systems are much rarer than they were in 2012.
    • Almost all packages can be consumed through some module system. UMD packages still exist, but virtually no new code is available only as a global variable.
    • tsconfig.json is nearly universal as a configuration mechanism.
    • Appetite for "stricter" typing continues to grow.
    • TypeScript build performance is top of mind. Despite the gains of TypeScript 7, performance must always remain a key goal, and options which can’t be supported in a performant way need to be more strongly justified.

    So TypeScript 6.0 and 7.0 are designed with these realities in mind. For TypeScript 6.0, these deprecations can be ignored by setting "ignoreDeprecations": "6.0" in your tsconfig; however, note that TypeScript 7.0 will not support any of these deprecated options.

    Some necessary adjustments can be automatically performed with a codemod or tool. For example, the experimental ts5to6 tool can automatically adjust baseUrl and rootDir across your codebase.

    Up-Front Adjustments

    We’ll cover specific adjustments below, but we have to note that some deprecations and behavior changes do not necessarily have an error message that directly points to the underlying issue. So we’ll note up-front that many projects will need to do at least one of the following:

    • Set the "types" array in tsconfig, typically to "types": ["node"].

      "types": ["*"] will restore the 5.9 behavior, but we recommend using an explicit array to improve build performance and predictability.

      You’ll typically know this is the issue if you see a lot of type errors related to missing identifiers or unresolved built-in modules.

    • Set "rootDir": "./src" if you were previously relying on this being inferred

      You’ll often know this is the issue if you see files being written to ./dist/src/index.js instead of ./dist/index.js.

    Simple Default Changes

    Several compiler options now have updated default values that better reflect modern development practices.

    • strict is now true by default: The appetite for stricter typing continues to grow, and we’ve found that most new projects want strict mode enabled. If you were already using "strict": true, nothing changes for you. If you were relying on the previous default of false, you’ll need to explicitly set "strict": false in your tsconfig.json.

    • module defaults to esnext: Similarly, the new default module is esnext, acknowledging that ESM is now the dominant module format.

    • target defaults to current-year ES version: The new default target is the most recent supported ECMAScript spec version (effectively a floating target). Right now, that target is es2025. This reflects the reality that most developers are shipping to evergreen runtimes and don’t need to transpile down to older ECMAScript versions.

    • noUncheckedSideEffectImports is now true by default: This helps catch issues with typos in side-effect-only imports.

    • libReplacement is now false by default: This flag previously incurred a large number of failed module resolutions for every run, which in turn increased the number of locations we needed to watch under --watch and editor scenarios. In a new project, libReplacement never does anything until other explicit configuration takes place, so it makes sense to turn this off by default for the sake of better performance by default.

    If these new defaults break your project, you can specify the previous values explicitly in your tsconfig.json.

    rootDir now defaults to .

    rootDir controls the directory structure of your output files relative to the output directory. Previously, if you did not specify a rootDir, it was inferred based on the common directory of all non-declaration input files. But this often meant that it was impossible to know if a file belonged to a project without trying to load and parse that project. It also meant that TypeScript had to spend more time inferring that common source directory by analyzing every file path in the program.

    In TypeScript 6.0, the default rootDir will always be the directory containing the tsconfig.json file. rootDir will only be inferred when using tsc from the command line without a tsconfig.json file.

    If you have source files any level deeper than your tsconfig.json directory and were relying on TypeScript to infer a common root directory for source files, you’ll need to explicitly set rootDir:

      {
          "compilerOptions": {
              // ...
    +         "rootDir": "./src"
          },
          "include": ["./src"]
      }
    

    Likewise, if your tsconfig.json referenced files outside of the containing tsconfig.json, you would need to adjust your rootDir to include those files.

      {
          "compilerOptions": {
              // ...
    +         "rootDir": "../src"
          },
          "include": ["../src/**/*.tests.ts"]
      }
    

    See more at the discussion here and the implementation here.

    types now defaults to []

    In a tsconfig.json, the types field of compilerOptions specifies a list of package names to be included in the global scope during compilation. Typically, packages in node_modules are automatically included via imports in your source code; but for convenience, TypeScript would also include all packages in node_modules/@types by default, so that you can get global declarations like process or the "fs" module from @types/node, or describe and it from @types/jest, without needing to import them directly.

    In a sense, the types value previously defaulted to "enumerate everything in node_modules/@types". This can be very expensive, as a normal repository setup these days might transitively pull in hundreds of @types packages, especially in multi-project workspaces with flattened node_modules. Modern projects almost always need only @types/node, @types/jest, or a handful of other common global-affecting packages.

    In TypeScript 6.0, the default types value will be [] (an empty array). This change prevents projects from unintentionally pulling in hundreds or even thousands of unneeded declaration files at build time. Many projects we’ve looked at have improved their build time anywhere from 20-50% just by setting types appropriately.

    This will affect many projects. You will likely need to add "types": ["node"] or a few others:

      {
          "compilerOptions": {
              // Explicitly list the @types packages you need
    +         "types": ["node", "jest"]
          }
      }
    

    You can also specify a * entry to re-enable the old enumeration behavior:

      {
          "compilerOptions": {
              // Load ALL the types - the default from TypeScript 5.9 and before.
    +         "types": ["*"]
          }
      }
    

    If you end up with new error messages like the following:

    Cannot find module '...' or its corresponding type declarations.
    Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
    Cannot find name 'path'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
    Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
    Cannot find name 'Bun'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig.
    Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
    

    it’s likely that you need to add some entries to your types field.

    See more at the proposal here along with the implementing pull request here.

    Deprecated: target: es5

    The ECMAScript 5 target was important for a long time to support legacy browsers; but its successor, ECMAScript 2015 (ES6), was released over a decade ago, and all modern browsers have supported it for many years. With Internet Explorer’s retirement, and the universality of evergreen browsers, there are very few use cases for ES5 output today.

    TypeScript’s lowest target will now be ES2015, and the target: es5 option is deprecated. If you were using target: es5, you’ll need to migrate to a newer target or use an external compiler. If you still need ES5 output, we recommend using an external compiler to either directly compile your TypeScript source, or to post-process TypeScript’s outputs.

    See more about this deprecation here along with its implementing pull request.

    Deprecated: --downlevelIteration

    --downlevelIteration only has effects on ES5 emit, and since --target es5 has been deprecated, --downlevelIteration no longer serves a purpose.

    Subtly, using --downlevelIteration false with --target es2015 did not error in TypeScript 5.9 and earlier, even though it had no effect. In TypeScript 6.0, setting --downlevelIteration at all will lead to a deprecation error.

    See the implementation here.

    Deprecated: --moduleResolution node (a.k.a. --moduleResolution node10)

    --moduleResolution node encoded a specific version of Node.js’s module resolution algorithm that most-accurately reflected the behavior of Node.js 10. Unfortunately, this target (and its name) ignores many updates to Node.js’s resolution algorithm that have occurred since then, and it is no longer a good representation of the behavior of modern Node.js versions.

    In TypeScript 6.0, --moduleResolution node (specifically, --moduleResolution node10) is deprecated. Users who were using --moduleResolution node should usually migrate to --moduleResolution nodenext if they plan on targeting Node.js directly, or --moduleResolution bundler if they plan on using a bundler or Bun.

    See more at this issue and its corresponding pull request.

    Deprecated: amd, umd, and systemjs values of module

    The following flag values are no longer supported

    • --module amd
    • --module umd
    • --module systemjs
    • --module none

    AMD, UMD, and SystemJS were important during the early days of JavaScript modules when browsers lacked native module support. The semantics of "none" were never well-defined and often led to confusion. Today, ESM is universally supported in browsers and Node.js, and both import maps and bundlers have become favored ways for filling in the gaps. If you’re still targeting these module systems, consider migrating to an appropriate ECMAScript module-emitting target, adopt a bundler or different compiler, or stay on TypeScript 5.x until you can migrate.

    This also implies dropped support for the amd-module directive, which will no longer have any effect.

    See more at the proposal issue along with the implementing pull request.

    Deprecated: --baseUrl

    The baseUrl option is most-commonly used in conjunction with paths, and is typically used as a prefix for every value in paths. Unfortunately, baseUrl is also considered a look-up root for module resolution.

    For example, given the following tsconfig.json

    {
      "compilerOptions": {
        // ...
        "baseUrl": "./src",
        "paths": {
          "@app/*": ["app/*"],
          "@lib/*": ["lib/*"]
        }
      }
    }
    

    and an import like

    import * as someModule from "someModule.js";
    

    TypeScript will probably resolve this to src/someModule.js, even if the developer only intended to add mappings for modules starting with @app/ and @lib/.

    In the best case, this also often leads to "worse-looking" paths that bundlers would ignore; but it often meant that that many import paths that would never have worked at runtime are considered "just fine" by TypeScript.

    path mappings have not required specifying baseUrl for a long time, and in practice, most projects that use baseUrl only use it as a prefix for their paths entries. In TypeScript 6.0, baseUrl is deprecated and will no longer be considered a look-up root for module resolution.

    Developers who used baseUrl as a prefix for path-mapping entries can simply remove baseUrl and add the prefix to their paths entries:

      {
        "compilerOptions": {
          // ...
    -     "baseUrl": "./src",
          "paths": {
    -       "@app/*": ["app/*"],
    -       "@lib/*": ["lib/*"]
    +       "@app/*": ["./src/app/*"],
    +       "@lib/*": ["./src/lib/*"]
          }
        }
      }
    

    Developers who actually did use baseUrl as a look-up root can also add an explicit path mapping to preserve the old behavior:

    {
      "compilerOptions": {
        // ...
        "paths": {
          // A new catch-all that replaces the baseUrl:
          "*": ["./src/*"],
    
          // Every other path now has an explicit common prefix:
          "@app/*": ["./src/app/*"],
          "@lib/*": ["./src/lib/*"],
        }
      }
    }
    

    However, this is extremely rare. We recommend most developers simply remove baseUrl and add the appropriate prefixes to their paths entries.

    See more at this issue and the corresponding pull request.

    Deprecated: --moduleResolution classic

    The moduleResolution: classic setting has been removed. The classic resolution strategy was TypeScript’s original module resolution algorithm, and predates Node.js’s resolution algorithm becoming a de facto standard. Today, all practical use cases are served by nodenext or bundler. If you were using classic, migrate to one of these modern resolution strategies.

    See more at this issue and the implementing pull request.

    Deprecated: --esModuleInterop false and --allowSyntheticDefaultImports false

    The following settings can no longer be set to false:

    • esModuleInterop
    • allowSyntheticDefaultImports

    esModuleInterop and allowSyntheticDefaultImports were originally opt-in to avoid breaking existing projects. However, the behavior they enable has been the recommended default for years. Setting them to false often led to subtle runtime issues when consuming CommonJS modules from ESM. In TypeScript 6.0, the safer interop behavior is always enabled.

    If you have imports that rely on the old behavior, you may need to adjust them:

    // Before (with esModuleInterop: false)
    import * as express from "express";
    
    // After (with esModuleInterop always enabled)
    import express from "express";
    

    See more at this issue and its implementing pull request.

    Deprecated: --alwaysStrict false

    The alwaysStrict flag refers to inference and emit of the "use strict"; directive. In TypeScript 6.0, all code will be assumed to be in JavaScript strict mode, which is a set of JS semantics that most-noticeably affects syntactic corner cases around reserved words. If you have "sloppy mode" code that uses reserved words like await, static, private, or public as regular identifiers, you’ll need to rename them. If you relied on subtle semantics around the meaning of this in non-strict code, you may need to adjust your code as well.

    See more at this issue and its corresponding pull request.

    Deprecated: outFile

    The --outFile option has been removed from TypeScript 6.0. This option was originally designed to concatenate multiple input files into a single output file. However, external bundlers like Webpack, Rollup, esbuild, Vite, Parcel, and others now do this job faster, better, and with far more configurability. Removing this option simplifies the implementation and allows us to focus on what TypeScript does best: type-checking and declaration emit. If you’re currently using --outFile, you’ll need to migrate to an external bundler. Most modern bundlers have excellent TypeScript support out of the box.

    Deprecated: legacy module Syntax for namespaces

    Early versions of TypeScript used the module keyword to declare namespaces:

    // ❌ Deprecated syntax - now an error
    module Foo {
        export const bar = 10;
    }
    

    This syntax was later aliased to the modern preferred form using the namespace keyword:

    // ✅ The correct syntax
    namespace Foo {
        export const bar = 10;
    }
    

    When namespace was introduced, the module syntax was simply discouraged. A few years ago, the TypeScript language service started marking the keyword as deprecated, suggesting namespace in its place.

    In TypeScript 6.0, using module where namespace is expected is now a hard deprecation. This change is necessary because module blocks are a potential ECMAScript proposal that would conflict with the legacy TypeScript syntax.

    The ambient module declaration form remains fully supported:

    // ✅ Still works perfectly
    declare module "some-module" {
        export function doSomething(): void;
    }
    

    See this issue and its corresponding pull request for more details.

    Deprecated: asserts Keyword on Imports

    The asserts keyword was proposed to the JavaScript language via the import assertions proposal; however, the proposal eventually morphed into the import attributes proposal, which uses the with keyword instead of asserts.

    Thus, the asserts syntax is now deprecated in TypeScript 6.0, and using it will lead to an error:

    // ❌ Deprecated syntax - now an error.
    import blob from "./blahb.json" asserts { type: "json" }
    //                              ~~~~~~~
    // error: Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'.
    

    Instead, use the with syntax for import attributes:

    // ✅ Works with the new import attributes syntax.
    import blob from "./blahb.json" with { type: "json" }
    

    See more at this issue and its corresponding pull request.

    Deprecated: no-default-lib Directives

    The /// <reference no-default-lib="true"/> directive has been largely misunderstood and misused. In TypeScript 6.0, this directive is no longer supported. If you were using it, consider using --noLib or --libReplacement instead.

    See more here and at the corresponding pull request.

    Specifying Command-Line Files When tsconfig.json Exists is Now an Error

    Currently, if you run tsc foo.ts in a folder where a tsconfig.json exists, the config file is completely ignored. This was often very confusing if you expected checking and emit options to apply to the input file.

    In TypeScript 6.0, if you run tsc with file arguments in a directory containing a tsconfig.json, an error will be issued to make this behavior explicit:

    error TS5112: tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error.
    

    If it is the case that you wanted to ignore the tsconfig.json and just compile foo.ts with TypeScript’s defaults, you can use the new --ignoreConfig flag.

    tsc --ignoreConfig foo.ts
    

    See more at this issue and its corresponding pull request.

    Preparing for TypeScript 7.0

    TypeScript 6.0 is designed as a transition release. While options deprecated in TypeScript 6.0 will continue to work without errors when "ignoreDeprecations": "6.0" is set, those options will be removed entirely in TypeScript 7.0 (the native TypeScript port). If you’re seeing deprecation warnings after upgrading to TypeScript 6.0, we strongly recommend addressing them before adopting TypeScript 7.0 (or trying native previews) in your project.

    What’s Next?

    Now that TypeScript 6.0 is available on npm, the team will be focused on bringing TypeScript 7.0 to stability. This is much closer than it might sound: we expect a release within a few months, and we are already seeing broad adoption inside and outside of Microsoft on extremely large codebases. So we encourage teams to try out nightly builds of TypeScript 7.0’s native previews on npm along with the VS Code extension too. Feedback on TypeScript 7.0 will go a long way, and you can file issues on our issue tracker.

    Still, TypeScript 6.0 is a stable release that you should be able to adopt today, and it includes a number of improvements and new features that you can start using right away. We hope this release will be a smooth transition for everyone, and we look forward to hearing about your experiences with it.

    Happy Hacking!

    – Daniel Rosenwasser and the TypeScript Team

    Author

    Daniel Rosenwasser

    Principal Product Manager

    Daniel Rosenwasser is the product manager of the TypeScript team. He has a passion for programming languages, compilers, and great developer tooling.

    Read the whole story
    emrox
    29 days ago
    reply
    Hamburg, Germany
    Share this story
    Delete
    Next Page of Stories