Giter Site home page Giter Site logo

How to add new typings about discussions HOT 3 OPEN

typings avatar typings commented on May 27, 2024
How to add new typings

from discussions.

Comments (3)

blakeembrey avatar blakeembrey commented on May 27, 2024

Let's say for instance Immutable-js. The project already have the d.ts file, so I don't have to create it. Should I create a repository on github for the typings.json? Or would it be better to add the file to their repository?

Their repo is best, Typings is a good fallback - use your own repo for type definitions. This is described https://github.com/typings/registry#contributing.

Also, in that case, what's the difference between the main and the browser properties for the typings.json?

See https://github.com/typings/typings/blob/master/docs/faq.md#how-do-i-write-typings-definitions, it has a formal definition.

Finally, in the example used in the docs for the debug.json version file, there's a hash there, I could no find a commit related to that hash? From where that hash came?

https://github.com/typings/registry/blob/master/npm/debug.json#L3 is typed-typings/npm-debug@0e398cb.

from discussions.

thitemple avatar thitemple commented on May 27, 2024

OK, I guess I understand a few things better. I still have some questions. If I'm writing the typings for a package that's only intended to be used on the browser, should I still have the config for main and browser? Both will then point to the same file?

Thanks for the help

from discussions.

blakeembrey avatar blakeembrey commented on May 27, 2024

Still use main and document that's it's made for browsers. It's pretty much the same approach as NPM packages there. Typings 1.0 will try to tidy up this issue/confusion.

from discussions.

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.