Skip to content

Commit

Permalink
feat: shims fileExists for TS 4.8
Browse files Browse the repository at this point in the history
close #1507, close #1332
  • Loading branch information
johnsoncodehk committed Jul 17, 2022
1 parent 4900f4b commit fb08658
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/vue-typescript/src/lsContext.ts
Expand Up @@ -27,6 +27,12 @@ export function createLanguageServiceContext(
const _tsHost: Partial<ts.LanguageServiceHost> = {
fileExists: host.fileExists
? fileName => {

const basename = path.basename(fileName);
if (basename === localTypes.typesFileName) {
return true;
}

// .vue.js -> .vue
// .vue.ts -> .vue
// .vue.d.ts (never)
Expand Down

0 comments on commit fb08658

Please sign in to comment.