TL;DR: Using a react flavour? look in
typings.<lib>.components. Else look in
Ok, you generated thousands of lines of code. Great! Now how to use it? (If you haven't, check how to setup the plugin)
Have a look around!
The converter plugin generates source jars which are attached to your IDE, as such you can browse just as any other library.
Anatomy of a typing library
All typing libraries follow the same hierarchy. Not all libraries will have all these entities, and many will have a substantial amount of top-level traits in the root folder as well.
typings foo anon/ components/ mod/ *Mod/ global/ fooStrings.scala fooNumbers.scala fooBooleans.scala fooRequire.scala ... top-level types
For react it can look like this:
typings react anon components experimentalMod mod package.scala reactBooleans.scala reactRequire.scala reactStrings.scala
React has two modules,
'react/experimental'. The module which corresponds to the library itself
'react' here) by convention ends up as
that's where you should look first.
All the other modules receive names ending in
Mod. Since there was considerable pushback against directly translated
long package names (
reactExperimentalMod in this case) they are abbreviated.
In this case
'react/experimental' ends up as just
Some libraries such as std, node, electron and others offer some/all functionality through the global namespace.
To clarify when you make use of it, all global references are reachable through
_ suffix, in case of name clashes).
If you use a react flavour, all generated components will be put in tje
Typescript has a lot of unnamed types, which we try to give a name in ScalablyTyped.
Since these are not stable in the same sense as named API is stable, they are extracted into the
You won't always have a choice, but try to limit use of these.
Whenever concrete strings, numbers or booleans appear in source code, they are collected into objects and reused for the entire typing library, see encoding.
These end up in for instance
I still cannot find out where to start!
Here is one concrete pattern you might come across:
This is one of many libraries which work by monkey-patching jquery when loaded, as such there isn't really an "entry point", like most other libraries. In Typescript this is modelled with interface augmentation, which we don't have in Scala.js.
Your only hint from the code itself is that it has a
trait, same as
jquery itself. The solution here is to ensure jqueryui is loaded by touching
typings.jqueryui.jqueryuiRequire, and casting
See an entire solution in the demo