Releases: sveltejs/language-tools
extensions-105.1.0
- (fix) add vector-effect css property (#977)
- (fix) don't show jsx attribute completions on html start tags, as they are doubled to those of the html language service (#989)
- (fix) normalize paths, deduplicate snapshots. Needed to support editing files that are used in multiple projects (#1040)
- (feat) allow rename of component props in another component (#1043)
- (feat) add postcss syntax grammar based on https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS/blob/master/Syntaxes/PostCSS.tmLanguage (#1044)
typescript-plugin-0.2.1
- (perf) only try to resolve on our own if filename ends with
.svelte - (breaking) be more strict with required props (#1030)
Breaking Change
Previously, properties that had no initializer were only required if the user was using both TypeScript and activated strict mode. This is changed now: People using TypeScript, and those using checkJs also in JavaScript files, will always see this behavior now.
svelte2tsx-0.2.0
- (fix) correct attribute name: fill-rule instead of fillRule
- (feat) add aria jsx type declarations (#957)
- (breaking) be more strict with required props: remove
strictModeoption (#1030)
Breaking Change
The strictMode option was removed. It was only used to determine whether or not all properties should be marked as optional. This behavior was adjusted: Now all properties that are not initialized are treated as required. This applies to both TS and JS files.
svelte-check-2.0.0
- (fix) correct attribute name: fill-rule instead of fillRule
- (fix) more robust mapping for Svelte diagnostics (#1035)
- (feat) add aria jsx type declarations (#957)
- (breaking) be more strict with required props (#1030)
Breaking Change
Previously, properties that had no initializer were only required if the user was using both TypeScript and activated strict mode. This is changed now: People using TypeScript, and those using checkJs also in JavaScript files, will always see this behavior now.
The fix is to provide a default value for properties that are optional. That's either the specific value kind or undefined.
Example TS:
export let optional: string;
Becomes
export let optional: string = ''; (or just export let optional = '')
Example JS:
export let optional;
Becomes
export let optional = undefined;
If you don't have control over the code because it's from a library, ask the author of that library to adjust their code. In the meantime you can create a d.ts file where you specify the types yourself.
Example:
<script>
import { Foo } from 'package';
import Bar from 'package/File.svelte';
</script>Create a .d.ts file:
declare module 'package' {
import { SvelteComponentTyped } from 'svelte';
export class Foo extends SvelteComponentTyped<{..props definition here..}> {}
}
declare module 'package/File.svelte' {
import { SvelteComponentTyped } from 'svelte';
export default class Bar extends SvelteComponentTyped<{..props definition here..}> {}
}language-server-0.14.0
- (chore) bump typescript to 4.3 and support semantic tokens on js (#1032)
- (fix) more robust mapping for Svelte diagnostics (#1035)
- (breaking) be more strict with required props (#1030)
Breaking Change
Previously, properties that had no initializer were only required if the user was using both TypeScript and activated strict mode. This is changed now: People using TypeScript, and those using checkJs also in JavaScript files, will always see this behavior now.
The fix is to provide a default value for properties that are optional. That's either the specific value kind or undefined.
Example TS:
export let optional: string;
Becomes
export let optional: string = ''; (or just export let optional = '')
Example JS:
export let optional;
Becomes
export let optional = undefined;
If you don't have control over the code because it's from a library, ask the author of that library to adjust their code. In the meantime you can create a d.ts file where you specify the types yourself.
Example:
<script>
import { Foo } from 'package';
import Bar from 'package/File.svelte';
</script>Create a .d.ts file:
declare module 'package' {
import { SvelteComponentTyped } from 'svelte';
export class Foo extends SvelteComponentTyped<{..props definition here..}> {}
}
declare module 'package/File.svelte' {
import { SvelteComponentTyped } from 'svelte';
export default class Bar extends SvelteComponentTyped<{..props definition here..}> {}
}extensions-105.0.0
- (fix) correct attribute name: fill-rule instead of fillRule
- (fix) more robust mapping for Svelte diagnostics (#1035)
- (feat) add aria jsx type declarations (#957)
- (breaking) be more strict with required props (#1030)
Breaking Change
Previously, properties that had no initializer were only required if the user was using both TypeScript and activated strict mode. This is changed now: People using TypeScript, and those using checkJs also in JavaScript files, will always see this behavior now.
The fix is to provide a default value for properties that are optional. That's either the specific value kind or undefined.
Example TS:
export let optional: string;
Becomes
export let optional: string = ''; (or just export let optional = '')
Example JS:
export let optional;
Becomes
export let optional = undefined;
If you don't have control over the code because it's from a library, ask the author of that library to adjust their code. In the meantime you can create a d.ts file where you specify the types yourself.
Example:
<script>
import { Foo } from 'package';
import Bar from 'package/File.svelte';
</script>Create a .d.ts file:
declare module 'package' {
import { SvelteComponentTyped } from 'svelte';
export class Foo extends SvelteComponentTyped<{..props definition here..}> {}
}
declare module 'package/File.svelte' {
import { SvelteComponentTyped } from 'svelte';
export default class Bar extends SvelteComponentTyped<{..props definition here..}> {}
}svelte2tsx-0.1.193
- (fix) align type def of
$setwith Svelte type def
language-server-0.13.9
svelte-check-1.6.0
- (feat) new tsconfig feature: pass in the path to your tsconfig/jsconfig and get diagnostics for all referenced files, including Svelte, JavaScript and TypeScript (#1014)
- (feat) add
--helpcommand for CLI (#1027) - (perf) also cache unresolved modules (#1015)
- (fix) add beforeinput event typing
- (fix) better transform of custom css properties (#1024)
- (fix) better css error diagnostics (#1009)
svelte2tsx-0.1.192
- (fix) add beforeinput event typing
- (fix) better transform of custom css properties (#1024)