Giter Site home page Giter Site logo

Comments (5)

ssalbdivad avatar ssalbdivad commented on May 18, 2024 1

@DanielRosenwasser Thank you very much and I'm sorry I'm a bit swamped at the moment or I would have done this initially. Apologies @RyanCavanaugh.

I have no intuitions about what is actionable here so if it's primarily #3 feel free to close this issue any time.

from typescript.

RyanCavanaugh avatar RyanCavanaugh commented on May 18, 2024

Sorry for the haphazard format of this issue.

I actually do need this turned into separate concrete actionable items.

from typescript.

DanielRosenwasser avatar DanielRosenwasser commented on May 18, 2024

I've turned (3) into its own issue: #58449

May or may not be something we can address easily.

from typescript.

DanielRosenwasser avatar DanielRosenwasser commented on May 18, 2024

For (4), that's a known pain-point. I'm not sure what the right solution there is. In that case, I would begrudgingly convert that to a module (or in reality I'd use an enum, but people have mixed feelings on that).

What would be nice is if we had something like

export const TIME_RATIOS: preserveinit = Object.freeze({
  ns: 0.000_0001,
  us: 0.001,
  ms: 1,
  s: 1000,
});

to say "actually preserve the entire expression in the declaration file". That means that anyone who runs this has to have Object.freeze globally in scope - which is obviously not a problem for most people in this case, but could be for certain other libraries. JSX also raises a weird question here (because now you possibly need .d.tsx).

from typescript.

DanielRosenwasser avatar DanielRosenwasser commented on May 18, 2024

Nobody reacted with a 😕 or 👎 on my preserveinit idea- but I'm not even sure if I like it. I might convince myself to file an issue if someone hasn't already done it.

I think the first actionable thing is to figure out where we can defer some work on these quick fixes.

from typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.