Skip to content

docs: description for use with pnpm #22

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

Merged
merged 1 commit into from
Feb 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ npm i -D better-typescript-lib

Starting from TypeScript 4.5, the TypeScript compiler detects existence of `@typescript/xxx` packages (e.g. `@typescript/es2015`) and uses them instead of the built-in definitions. By installing `better-typescript-lib`, these package names are mapped to corresponding `@better-typescript-lib/xxx` packages.

### with pnpm

With pnpm, you must append the following line to the `.npmrc` file:

```properties
public-hoist-pattern[]=@typescript/*
```

With pnpm the `@better-typescript-lib/xxx` packages are not installed to `node_modules/@typescript/xxx` without [`public-hoist-pattern`](https://pnpm.io/npmrc#public-hoist-pattern).

This is because, unlike npm and yarn, by default pnpm does not allow your source code to access dependencies that have not been added to your project as dependencies.

## Supported TypeScript Versions

| better-typescript-lib | TypeScript |
Expand Down