fix: correct typos in variable names (#8257)

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
pull/8295/head
Lioness100 3 years ago committed by GitHub
parent acba4b72e2
commit 5a3a1e488a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1043,7 +1043,7 @@ Also:
## 3.5.1 ## 3.5.1
* Accommodate webpack idiosyncracies * Accommodate webpack idiosyncrasies
## 3.5.0 ## 3.5.0

@ -44,7 +44,7 @@ export default {
code: 'invalid-binding', code: 'invalid-binding',
message: 'Cannot bind to a variable declared with {@const ...}' message: 'Cannot bind to a variable declared with {@const ...}'
}, },
invalid_binding_writibale: { invalid_binding_writable: {
code: 'invalid-binding', code: 'invalid-binding',
message: 'Cannot bind to a variable which is not writable' message: 'Cannot bind to a variable which is not writable'
}, },

@ -80,7 +80,7 @@ export default class Binding extends Node {
variable[this.expression.node.type === 'MemberExpression' ? 'mutated' : 'reassigned'] = true; variable[this.expression.node.type === 'MemberExpression' ? 'mutated' : 'reassigned'] = true;
if (info.expression.type === 'Identifier' && !variable.writable) { if (info.expression.type === 'Identifier' && !variable.writable) {
component.error(this.expression.node as any, compiler_errors.invalid_binding_writibale); component.error(this.expression.node as any, compiler_errors.invalid_binding_writable);
return; return;
} }
} }

@ -1034,14 +1034,14 @@ export default class Element extends Node {
} }
} }
const regex_starts_with_vovel = /^[aeiou]/; const regex_starts_with_vowel = /^[aeiou]/;
function should_have_attribute( function should_have_attribute(
node, node,
attributes: string[], attributes: string[],
name = node.name name = node.name
) { ) {
const article = regex_starts_with_vovel.test(attributes[0]) ? 'an' : 'a'; const article = regex_starts_with_vowel.test(attributes[0]) ? 'an' : 'a';
const sequence = attributes.length > 1 ? const sequence = attributes.length > 1 ?
attributes.slice(0, -1).join(', ') + ` or ${attributes[attributes.length - 1]}` : attributes.slice(0, -1).join(', ') + ` or ${attributes[attributes.length - 1]}` :
attributes[0]; attributes[0];

@ -48,7 +48,7 @@ function create_fragment(ctx) {
t8 = text(/*$prop*/ ctx[2]); t8 = text(/*$prop*/ ctx[2]);
t9 = space(); t9 = space();
t10 = text(/*shadowedByModule*/ ctx[4]); t10 = text(/*shadowedByModule*/ ctx[4]);
add_location(p, file, 22, 0, 430); add_location(p, file, 22, 0, 431);
}, },
l: function claim(nodes) { l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); 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) {
} }
let moduleLiveBinding; let moduleLiveBinding;
const moduleContantProps = 4; const moduleConstantProps = 4;
let moduleLet; let moduleLet;
const moduleConst = 2; const moduleConst = 2;
let shadowedByModule; let shadowedByModule;
@ -137,7 +137,7 @@ function instance($$self, $$props, $$invalidate) {
$$self.$capture_state = () => ({ $$self.$capture_state = () => ({
moduleLiveBinding, moduleLiveBinding,
moduleContantProps, moduleConstantProps,
moduleLet, moduleLet,
moduleConst, moduleConst,
shadowedByModule, shadowedByModule,
@ -197,4 +197,4 @@ class Component extends SvelteComponentDev {
} }
export default Component; export default Component;
export { moduleLiveBinding, moduleContantProps }; export { moduleLiveBinding, moduleConstantProps };

@ -1,6 +1,6 @@
<script context="module"> <script context="module">
export let moduleLiveBinding; export let moduleLiveBinding;
export const moduleContantProps = 4; export const moduleConstantProps = 4;
let moduleLet; let moduleLet;
const moduleConst = 2; const moduleConst = 2;
let shadowedByModule; let shadowedByModule;

Loading…
Cancel
Save