Skip to content

Commit 401d121

Browse files
committed
fix option structure
1 parent b420924 commit 401d121

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/import.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import ts, { CodeFixAction, InferencePriority, ScriptElementKind } from 'typescript/lib/tsserverlibrary';
22
import * as path from 'path';
33

4-
type PluginConfig = {
4+
type PluginOptions = {
55
paths: readonly string[];
66
};
77

88
export function getCompletionEntries(info: ts.server.PluginCreateInfo): ts.CompletionEntry[] {
9-
const config = info.config as PluginConfig;
9+
const options = info.config.options as PluginOptions;
1010

1111
const currentDir = info.project.getCurrentDirectory();
12-
const filePaths = config.paths.flatMap((dirPath) => {
12+
const filePaths = options.paths.flatMap((dirPath) => {
1313
return info.project.readDirectory(path.resolve(currentDir, dirPath), ['.ts', '.js']);
1414
});
1515

0 commit comments

Comments
 (0)