Skip to content

0.9: TypeScript and jbuilder

Pre-release
Pre-release
Compare
Choose a tag to compare
@rrdelaney rrdelaney released this 06 Jul 13:51
· 260 commits to master since this release

TypeScript

TypeScript support is here! Pass any file to ReasonablyTyped with the extension .d.ts and the TypeScript compilation mode will be used! Note that TypeScript support is still in it's early stages, and might now always produce output. With that said, here's an example!

declare module 'numbers' {
  export var xfg: number

  export function add(
    a: number,
    b: number
  ): number
}

compiles to

external xfg : float = "" [@@bs.module "numbers"];

external add : a::float => b::float => float = "" [@@bs.module "numbers"];

ReasonablyTyped also supports modules with names determined by their filename, as is often seen in DefinitelyTyped.

jbuilder

Previously there was a build system in place that depended on Make and rebuild command manually to compile. This system was non-standard and didn't manage libraries or anything like that for you. Now we're using ReasonNativeProject as the basis for our build, sprinkled in with some JSOO goodness.