Giter Club home page Giter Club logo

Comments (6)

MartinJohns avatar MartinJohns commented on April 30, 2024 2

Note that the module keyword is on the edge of being deprecated: #57913

To me this just sounds like a duplicate of #420, just an alternative approach (which usually does not warrant a new issue and should be a comment). Both issues are about the very same problem.

from typescript.

fdaciuk avatar fdaciuk commented on April 30, 2024 1

@DanielRosenwasser should I comment this proposal in #420?

from typescript.

DanielRosenwasser avatar DanielRosenwasser commented on April 30, 2024 1

Yeah, I'd try to keep discussion there going forward.

from typescript.

snarbies avatar snarbies commented on April 30, 2024

module is only being deprecated as an alias for namespace, right? This looks like ESM which isn't going anywhere.

Well, I guess this syntax is a bit confusing as it's neither an internal module nor ESM...

module implements UserModuleInterface {
  export async function getUser(id) {}
  export async function createUser() {}
}

The rest appears to be ESM.

from typescript.

fdaciuk avatar fdaciuk commented on April 30, 2024

@snarbies I just need to say that that specific module is implementing an interface. I don't know if the suggested syntax is good or not, but it was the only thing that came to mind at the moment =)

And yes: the proposal is to maintain the ESM syntax, and just add module interface and module implements to improve type checking in functions without the need for a class or object, and also without adding anything at runtime .

from typescript.

DanielRosenwasser avatar DanielRosenwasser commented on April 30, 2024

It does feel like #420 roughly captures what's being described here, so I'm going to mark this as a duplicate.

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.