Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ts2scala

Typescript importer based on « Importer from TypeScript type definitions to Scala.js »

This tool reads type definitions files written for TypeScript (.d.ts files) and use macros to generate the corresponding scala tree

Thank to Sébastien Doeraene for the parser's code and to Eugene Burmako for his precious help

There's also a JScala connector

Example of use :

@TS2Scala(file="/path/to/typescripts/global.d.ts")
object Global { }

@TS2Scala(file="/path/to/typescripts/jquery-ori.d.ts")
object JQuery { 
	import Global._
}

@TS2Scala(file="/path/to/typescripts/angular-1.0.d.ts")
object Angular { 
	import Global._
	import JQuery._
}

@TS2Scala(file="/path/to/typescripts/bootstrap.d.ts")
object Bootstrap { 
	import Global._
	import JQuery._
}

@TS2Scala(file="/path/to/typescripts/backbone.d.ts")
object Backbone { 
	import Global._
	import JQuery._
}


object Main {
	
	def main(args:Array[String]) {
		import JQuery.jquery._
		
		$("div").blur()
	}
	
}

SBT :

libraryDependencies += ("fr.apyx" %% "ts2scala-macros" % "0.2.1")

Arnaud PEZEL Apyx

About

typescript 2 scala macro based importer

Resources

Stars

8 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages