WKTypeScript
This project has been discontinued. See TypeSwift/TypeSwift for the next iteration of this project:
Install / Use
/learn @inter-ops/WKTypeScriptREADME
This project has been archived. For the modern version of this project, see TypeSwift.
<hr />Bridge the gap between TypeScript and Swift – a Node.js generator and WebKit extension framework, all in one.
Overview
Declare your functions in TypeScript. Call them, with type-safe parameters, in native Swift.
<img src="README/Syntax.png" /><!--<img src="assets/ScriptGen.png" />-->
WKTypeScript allows you to automate and streamline your TypeScript-Swift workflow. Go from declaring code in TypeScript, to implementing them in native Swift – with npm run build in the middle.
Evluate in WebView
webView.ts(.myVar)
webView.ts(.myFunc())
webView.ts(.myCallback(.forSomeVal)) { (result) in
switch result {
case success: print("\(success)")
}
}
Setup
Setup here.
Building
Building here.
Configuration
Config here.
Progress
- [x] JavaScript type-safe function reference generator for native Swift
- [x] Create example iOS project
- [x] Create example macOS project
- [x] Create cross-platform example project
- [ ] Make a better README <sup>working on it</sup>
Requirements
Swift
- iOS 11 or later
- macOS 10.14 or later
