Skip to content

Commit 232862d

Browse files
authored
(fix) always update files from .svelte-kit/types (#1591)
sveltejs/kit#5940
1 parent db23238 commit 232862d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/language-server/src/plugins/typescript/TypeScriptPlugin.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,14 @@ export class TypeScriptPlugin
458458
const declarationExtensions = [ts.Extension.Dcts, ts.Extension.Dts, ts.Extension.Dmts];
459459
const canSafelyIgnore =
460460
declarationExtensions.every((ext) => !fileName.endsWith(ext)) &&
461-
ignoredBuildDirectories.some((dir) => dirPathParts.includes(dir));
462-
461+
ignoredBuildDirectories.some((dir) => {
462+
const index = dirPathParts.indexOf(dir);
463+
464+
return (
465+
// Files in .svelte-kit/types should always come through
466+
index > 0 && (dir !== '.svelte-kit' || dirPathParts[index + 1] !== 'types')
467+
);
468+
});
463469
if (canSafelyIgnore) {
464470
continue;
465471
}

0 commit comments

Comments
 (0)