Skip to content

Commit

Permalink
chore: typo (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 authored Jan 13, 2024
1 parent 2fe3c5b commit 37762c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Breaking changes from `@typescript/twoslash`:

### `createTwoSlasher`

TwoSlash runs a TypeScript language server to get the information, which could be a heavy operation to load and parse all the files it needs. In repetitive usages, you may not want to initialize the language server every simple time. TwoSlash<sup>es</sup> provides a `createTwoslasher` factory function allows you to cache the language servers and reuse the already initialized files.
TwoSlash runs a TypeScript language server to get the information, which could be a heavy operation to load and parse all the files it needs. In repetitive usages, you may not want to initialize the language server every simple time. TwoSlash<sup>es</sup> provides a `createTwoSlasher` factory function allows you to cache the language servers and reuse the already initialized files.

```ts
import { createTwoSlasher } from 'twoslashes'
Expand Down Expand Up @@ -58,7 +58,7 @@ const twoslasher = createTwoSlasher()
// do something

// Clear the cached language servers, free the memory
twoSlasher.getCacheMap()?.clear()
twoslasher.getCacheMap()?.clear()
```

### Information Nodes
Expand Down

0 comments on commit 37762c5

Please sign in to comment.