Skip to content

Commit b7b5f73

Browse files
authored
add missing typeof
1 parent 1725af4 commit b7b5f73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Writing-a-Language-Service-Plugin.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ When your plugin is loaded, it's first initialized as a factory function with it
2929

3030
Here's the minimal code that handles this injected `ts` value:
3131
```ts
32-
function init(modules: { typescript: import("typescript/lib/tsserverlibrary") }) {
32+
function init(modules: { typescript: typeof import("typescript/lib/tsserverlibrary") }) {
3333
const ts = modules.typescript;
3434
/* More to come here */
3535
}
@@ -43,7 +43,7 @@ TypeScript Language Service Plugins use the [Decorator Pattern](https://en.wikip
4343

4444
Let's fill in some more code to properly set up a decorator:
4545
```ts
46-
function init(modules: { typescript: import("typescript/lib/tsserverlibrary") }) {
46+
function init(modules: { typescript: typeof import("typescript/lib/tsserverlibrary") }) {
4747
const ts = modules.typescript;
4848

4949
function create(info: ts.server.PluginCreateInfo) {
@@ -158,7 +158,7 @@ function create(info: ts.server.PluginCreateInfo) {
158158
## Putting it all together
159159

160160
```ts
161-
function init(modules: { typescript: import("typescript/lib/tsserverlibrary") }) {
161+
function init(modules: { typescript: typeof import("typescript/lib/tsserverlibrary") }) {
162162
const ts = modules.typescript;
163163

164164
function create(info: ts.server.PluginCreateInfo) {

0 commit comments

Comments
 (0)