Open alexjpwalker opened 3 years ago
Why do we need it?
Given the strongly-typed structure of the TypeDB client that makes heavy use of typing and inheritance, there is no doubt that TypeScript will represent a sharply better experience for users than JS. We should encourage its use.
Problem to Solve
All of our
client-nodejs
examples are written in JavaScript. They should be written in TypeScript. We would strongly encourage users to use TypeScript for its type safety features; it will also result in a smoother dev workflow.Current Workaround
People can read our TypeScript code in the BDD tests of
typedb-client-nodejs
repo.Proposed Solution
We should replace our JS snippets in docs with TypeScript.
Additional Information
Verifying that a TypeScript example compiles is slightly more work than for JavaScript. You need to first transpile TypeScript to JavaScript using, for example,
tsc
.