Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite JavaScript snippets in TypeScript #528

Open
alexjpwalker opened this issue Jun 2, 2021 · 2 comments
Open

Rewrite JavaScript snippets in TypeScript #528

alexjpwalker opened this issue Jun 2, 2021 · 2 comments
Labels

Comments

@alexjpwalker
Copy link
Member

alexjpwalker commented Jun 2, 2021

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.

@izmalk
Copy link
Contributor

izmalk commented Jan 10, 2023

Why do we need it?

@alexjpwalker alexjpwalker changed the title TypeScript examples Rewrite JavaScript snippets in TypeScript Jan 11, 2023
@alexjpwalker
Copy link
Member Author

alexjpwalker commented Jan 11, 2023

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.

@izmalk izmalk added javascript Pull requests that update Javascript code domain: examples labels Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants