Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ export class C {

This call will fail because `key` expects a `string | symbol`, but constructor parameters receive a key of `undefined`.
The correct fix is to change the type of `key` within `inject`.
A reasonable workaround if you're using a library that can't be upgraded is is to wrap `inject` in a more type-safe decorator function, and use a type-assertion on `key`.
A reasonable workaround if you're using a library that can't be upgraded is to wrap `inject` in a more type-safe decorator function, and use a type-assertion on `key`.

For more details, [see this issue](https://github.com/microsoft/TypeScript/issues/52435).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ import * as someModule from "someModule.js";
TypeScript will probably resolve this to `src/someModule.js`, even if the developer only intended to add mappings for modules starting with `@app/` and `@lib/`.

In the best case, this also often leads to "worse-looking" paths that bundlers would ignore;
but it often meant that that many import paths that would never have worked at runtime are considered "just fine" by TypeScript.
but it often meant that many import paths that would never have worked at runtime are considered "just fine" by TypeScript.

`path` mappings have not required specifying `baseUrl` for a long time, and in practice, most projects that use `baseUrl` only use it as a prefix for their `paths` entries.
In TypeScript 6.0, `baseUrl` is deprecated and will no longer be considered a look-up root for module resolution.
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript-vfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ interface LanguageService {

It's **very** likely that you will need to set up your lib `*.d.ts` files to use this.

If you are running in an environment where you have access to the `node_modules` folder, then you can can write some code like this:
If you are running in an environment where you have access to the `node_modules` folder, then you can write some code like this:

```ts
const getLib = (name: string) => {
Expand Down Expand Up @@ -137,7 +137,7 @@ const createDefaultMap2015 = () => {

This list is the default set of definitions (it's important to note that different options for `target` or `lib` will affect what this list looks like) and you are grabbing the library's content from the local dependency of TypeScript.

Keeping on top of this list is quite a lot of work, so this library ships functions for generating a map with with these pre-filled from a version of TypeScript available on disk.
Keeping on top of this list is quite a lot of work, so this library ships functions for generating a map with these pre-filled from a version of TypeScript available on disk.

Note: it's possible for this list to get out of sync with TypeScript over time. It was last synced with TypeScript 3.8.0-rc.

Expand Down