2 - Opening a TypeScript Repository

This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.

📖 Task Introduction

Foundry’s Code Repositories environment is most often used for authoring production data transformations in Python, SQL, or Java. Application builders use it to write, test, publish, and manage TypeScript Functions. This task will step you through the process of generating a TypeScript repository.

If this is the first time you’ve accessed a Code Repository in Foundry, we recommend reviewing the following documentation links to familiarize yourself with the key concepts and interaction patterns. This will be helpful even if your day-to-day job doesn’t involve data transformation. As you read these pages, bear in mind (1) that a Functions repository differs from one dedicated to transforms and (2) you do not need to follow the links embedded in the documentation pages recommended below.

🔨 Task Instructions

  1. Proceed to your /Temporary Training Artifacts/ folder or preferred save location and, using the green ➕ New ▾ button in the top right of your screen, choose Code Repository from the dropdown list.

  2. On the Initialize Repository page, click into the Functions block, then select the button labeled Typescript Functions. Your repository is now being bootstrapped with the resources and structure you’ll need to start writing.

  3. Then click the Initialize repository

  4. Rename your repository by clicking either in the File ▾ menu in the top left and choosing Rename or directly on the file name at the top left. Change the name to Functions Training Repository.

  5. Let’s review the default files.

  6. In the Files panel on the left, mouse over the functions-typescript folder and click the ... that appears to the right of the file name.

  7. In the fly-out menu, choose Expand all.

    • In this training, we will concern ourselves only with the two files called index.ts. The first (../src/__tests__/index.ts) contains unit tests, and by default, a simple one has been included. The second contains your Functions code. We will address each file in the next two tasks.