conjure-typescript
conjure-typescript is a Conjure generator for TypeScript, written in TypeScript.
Overview
conjure-typescript is tool that allows you to generate TypeScript clients for a Conjure-defined API.
The generated clients provide a simple Promise based interface for executing strongly typed remote procedure calls from
the browser or server.
Usage
The easiest way to use conjure-typescript is through one of the follow build tools:
Usage from a npm package is also supported by adding a devDependency on the conjure-typescript
and invoking the exposed script:
{
"devDependencies": {
"conjure-typescript": "^1.0.0"
}
}
Usage from any other environment is supported by downloading a standalone executable from
bintray at com.palantir.conjure.typescript:conjure-typscript:<version>
maven coordinates.
The conjure-typescript cli has the following command:
conjure-typescript generate
Generate TypeScript bindings for a conjure API
Positionals:
input The location of the apis IR
output The output location of the generated code
Options:
--version Show version number [boolean]
--help Show help [boolean]
--packageVersion The version of the generated package [string] [required]
--packageName The name of the generated package [string] [required]
--nodeCompatibleModules Generate node compatible javascript [boolean] [default: false]
SemVer releases
This project is versioned according to SemVer. We consider the generated code to be part of the 'public API' of conjure-typescript, i.e. TypeScript generated by old conjure-typescript and new conjure-typescript (within a major version) should be compatible, so your consumers should be able to upgrade without compilation problems.
We also consider the command line interface and feature flags to be public API.
Contributing
See the CONTRIBUTING.md document.