Skip to main content

Typescript

To use the Cardinal SDK in Typescript, you can install it using yarn:

yarn add @icure/cardinal-sdk

You can also use npm:

npm install @icure/cardinal-sdk

We strongly recommend using strict null checks when developing your application.

note

To use the Cardinal SDK on node, you need node 19 or greater.

Template app​

We provide a template for TypeScript that showcases several self-contained use cases that highlight the main features of the Cardinal SDK.

Launching the Tutorial in Typescript​

To run the tutorial in Typescript, clone this repository:

git clone https://github.com/icure/cardinal-introductory-tutorial.git
cd cardinal-introductory-tutorial

The minimum supported Node version is 19. You can install it using nvm.

nvm install 19
nvm use 19

Then, you can navigate to the typescript directory and install the required dependencies using yarn.

cd typescript
yarn install

Finally, run the example Typescript code using yarn:

yarn ts-node --esm src/main.ts

Boilerplate​

We provide a boilerplate for React that already includes the dependencies, the registration/login flow, and some example usage of the sdk.

Cardinal SDK Introductory Tutorial​

Please proceed to the Introductory Tutorial to discover how the Cardinal solution enables you to create, search, and share medical data. This will guide you in understanding your next steps toward integrating Cardinal.