Skip to content

Commit

Permalink
- fixes #30 adds missing tsconfig configurations
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Apr 30, 2024
1 parent 0d7d8cb commit 71cb82d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions OpenAPI/kiota/quickstarts/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ In this tutorial, you will build a sample app in TypeScript that calls a REST AP

## Required tools

- [NodeJS 18](https://nodejs.org/en/)
- [TypeScript](https://www.typescriptlang.org/)
- [NodeJS 18 or above](https://nodejs.org/en/)
- [TypeScript 5 or above](https://www.typescriptlang.org/)

## Create a project

Expand All @@ -26,6 +26,17 @@ npm install -D typescript ts-node
npx tsc --init
```

## Project configuration

In case you're adding a kiota client to an existing project, the following configuration is required for the project:

- **tsconfig** > **compilerOptions** > **esModuleInterop** set to "true".
- **tsconfig** > **compilerOptions** > **forceConsistentCasingInFileNames** set to "true".
- **tsconfig** > **compilerOptions** > **lib** with an entry of "es2015".
- **tsconfig** > **compilerOptions** > **module** set to "NodeNext".
- **tsconfig** > **compilerOptions** > **moduleResolution** set to "NodeNext".
- **tsconfig** > **compilerOptions** > **target** set to "es2016" or above.

## Add dependencies

Before you can compile and run the generated API client, you will need to make sure the generated source files are part of a project with the required dependencies. Your project must have a reference to the [abstraction package](https://www.npmjs.com/package/@microsoft/kiota-abstractions). Additionally, you must either use the Kiota default implementations or provide your own custom implementations of the following packages.
Expand Down

0 comments on commit 71cb82d

Please sign in to comment.