ScalablyTyped

ScalablyTyped

  • Github

›Usage

ScalablyTyped

  • Use Typescript libraries with Scala.js!

Getting started (application)

  • SBT plugin
  • SBT plugin without scalajs-bundler
  • Command line tool

Getting started (library)

  • How to share code

Usage

  • What do I do now?
  • Working with objects
  • Flavour
  • Encoding

Configuration

  • Customize the generated code.
  • Remote cache

Development

  • What if I hit problems importing libraries?
  • Development
  • Running

Flavour

ScalablyTyped flavours so far enables rich interop with react.

I just want to see example code

  • Slinky
  • Scalajs-react demos

Getting started

You first setup your sbt build, and then specify which one you want like this:

project.settings(
 // for Slinky web projects
  stFlavour := Flavour.Slinky,
  // for Slinky native projects
  stFlavour := Flavour.SlinkyNative,
  // for scalajs-react projects
  stFlavour := Flavour.ScalajsReact
)

Then look in the components package of the generated libraries:

import typings.antd.components.Button

How?

They all work quite similarly:

  • Replace all possible type references from generated types to types from scala-js-dom and the relevant React wrapper
  • Identify all react components
  • Generate a scala package with all the necessary boilerplate to make usage smooth.

Slinky

The following video showcases how the Slinky flavour works:

← Working with objectsEncoding →
  • I just want to see example code
  • Getting started
  • How?
  • Slinky
ScalablyTyped
Community
Project Chat
More
GitHubStar
Copyright © 2023 Øyvind Raddum Berg