typescript-svelte-plugin
Advanced tools
Comparing version 0.3.34 to 0.3.35
export interface Configuration { | ||
enable: boolean; | ||
/** Skip the Svelte detection and assume this is a Svelte project */ | ||
assumeIsSvelteProject: boolean; | ||
} | ||
@@ -4,0 +6,0 @@ export declare class ConfigManager { |
@@ -10,3 +10,4 @@ "use strict"; | ||
this.config = { | ||
enable: true | ||
enable: true, | ||
assumeIsSvelteProject: false | ||
}; | ||
@@ -13,0 +14,0 @@ } |
@@ -15,3 +15,4 @@ "use strict"; | ||
const logger = new logger_1.Logger(info.project.projectService.logger); | ||
if (!isSvelteProject(info.project.getCompilerOptions())) { | ||
if (!info.config?.assumeIsSvelteProject && | ||
!isSvelteProject(info.project.getCompilerOptions())) { | ||
logger.log('Detected that this is not a Svelte project, abort patching TypeScript'); | ||
@@ -18,0 +19,0 @@ return info.languageService; |
{ | ||
"name": "typescript-svelte-plugin", | ||
"version": "0.3.34", | ||
"version": "0.3.35", | ||
"description": "A TypeScript Plugin providing Svelte intellisense", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -27,3 +27,6 @@ # A TypeScript plugin for Svelte intellisense | ||
"plugins": [{ | ||
"name": "typescript-svelte-plugin" | ||
"name": "typescript-svelte-plugin", | ||
// the following options can be set additionally; they are optional; their default values are listed here | ||
"enabled": true, // enables this plugin | ||
"assumeIsSvelteProject": false // if true, skip detection and always assume it's a Svelte project | ||
}] | ||
@@ -30,0 +33,0 @@ } |
145394
3343
43