Skip to content

Commit 5a3a1e4

Browse files
fix: correct typos in variable names (#8257)
Co-authored-by: Ben McCann <[email protected]>
1 parent acba4b7 commit 5a3a1e4

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ Also:
10431043

10441044
## 3.5.1
10451045

1046-
* Accommodate webpack idiosyncracies
1046+
* Accommodate webpack idiosyncrasies
10471047

10481048
## 3.5.0
10491049

src/compiler/compile/compiler_errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default {
4444
code: 'invalid-binding',
4545
message: 'Cannot bind to a variable declared with {@const ...}'
4646
},
47-
invalid_binding_writibale: {
47+
invalid_binding_writable: {
4848
code: 'invalid-binding',
4949
message: 'Cannot bind to a variable which is not writable'
5050
},

src/compiler/compile/nodes/Binding.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default class Binding extends Node {
8080
variable[this.expression.node.type === 'MemberExpression' ? 'mutated' : 'reassigned'] = true;
8181

8282
if (info.expression.type === 'Identifier' && !variable.writable) {
83-
component.error(this.expression.node as any, compiler_errors.invalid_binding_writibale);
83+
component.error(this.expression.node as any, compiler_errors.invalid_binding_writable);
8484
return;
8585
}
8686
}

src/compiler/compile/nodes/Element.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,14 +1034,14 @@ export default class Element extends Node {
10341034
}
10351035
}
10361036

1037-
const regex_starts_with_vovel = /^[aeiou]/;
1037+
const regex_starts_with_vowel = /^[aeiou]/;
10381038

10391039
function should_have_attribute(
10401040
node,
10411041
attributes: string[],
10421042
name = node.name
10431043
) {
1044-
const article = regex_starts_with_vovel.test(attributes[0]) ? 'an' : 'a';
1044+
const article = regex_starts_with_vowel.test(attributes[0]) ? 'an' : 'a';
10451045
const sequence = attributes.length > 1 ?
10461046
attributes.slice(0, -1).join(', ') + ` or ${attributes[attributes.length - 1]}` :
10471047
attributes[0];

test/js/samples/capture-inject-state/expected.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function create_fragment(ctx) {
4848
t8 = text(/*$prop*/ ctx[2]);
4949
t9 = space();
5050
t10 = text(/*shadowedByModule*/ ctx[4]);
51-
add_location(p, file, 22, 0, 430);
51+
add_location(p, file, 22, 0, 431);
5252
},
5353
l: function claim(nodes) {
5454
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@@ -91,7 +91,7 @@ function create_fragment(ctx) {
9191
}
9292

9393
let moduleLiveBinding;
94-
const moduleContantProps = 4;
94+
const moduleConstantProps = 4;
9595
let moduleLet;
9696
const moduleConst = 2;
9797
let shadowedByModule;
@@ -137,7 +137,7 @@ function instance($$self, $$props, $$invalidate) {
137137

138138
$$self.$capture_state = () => ({
139139
moduleLiveBinding,
140-
moduleContantProps,
140+
moduleConstantProps,
141141
moduleLet,
142142
moduleConst,
143143
shadowedByModule,
@@ -197,4 +197,4 @@ class Component extends SvelteComponentDev {
197197
}
198198

199199
export default Component;
200-
export { moduleLiveBinding, moduleContantProps };
200+
export { moduleLiveBinding, moduleConstantProps };

test/js/samples/capture-inject-state/input.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script context="module">
22
export let moduleLiveBinding;
3-
export const moduleContantProps = 4;
3+
export const moduleConstantProps = 4;
44
let moduleLet;
55
const moduleConst = 2;
66
let shadowedByModule;

0 commit comments

Comments
 (0)