mirror of https://github.com/sveltejs/svelte
parent
6bb5c79ad7
commit
75bb357e98
@ -1,15 +1,15 @@
|
|||||||
[{
|
[{
|
||||||
"code": "invalid-action",
|
"code": "invalid-action",
|
||||||
"message": "Actions can only be applied to DOM elements, not components",
|
"message": "Actions can only be applied to DOM elements, not components",
|
||||||
"pos": 8,
|
"pos": 84,
|
||||||
"start": {
|
"start": {
|
||||||
"line": 1,
|
"line": 7,
|
||||||
"column": 8,
|
"column": 8,
|
||||||
"character": 8
|
"character": 84
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
"line": 1,
|
"line": 7,
|
||||||
"column": 15,
|
"column": 15,
|
||||||
"character": 15
|
"character": 91
|
||||||
}
|
}
|
||||||
}]
|
}]
|
@ -1,15 +1,7 @@
|
|||||||
<Widget use:foo/>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Widget from './Widget.html';
|
import Widget from './Widget.html';
|
||||||
|
|
||||||
export default {
|
function foo(){}
|
||||||
components: {
|
</script>
|
||||||
Widget
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
<Widget use:foo/>
|
||||||
foo() {}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,17 +1,8 @@
|
|||||||
{#each things as thing (thing)}
|
|
||||||
<div animate:foo animate:bar></div>
|
|
||||||
{/each}
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
function foo() {}
|
||||||
animations: {
|
function bar() {}
|
||||||
foo(node, animation, params) {
|
</script>
|
||||||
// ...
|
|
||||||
},
|
|
||||||
|
|
||||||
bar(node, animation, params) {
|
{#each things as thing (thing)}
|
||||||
// ...
|
<div animate:foo animate:bar></div>
|
||||||
}
|
{/each}
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,11 +1,5 @@
|
|||||||
<div animate:foo></div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
function foo() {}
|
||||||
animations: {
|
</script>
|
||||||
foo(node, animation, params) {
|
|
||||||
// ...
|
<div animate:foo></div>
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,14 +1,8 @@
|
|||||||
|
<script>
|
||||||
|
function foo() {}
|
||||||
|
</script>
|
||||||
|
|
||||||
{#each things as thing}
|
{#each things as thing}
|
||||||
<div animate:foo></div>
|
<div animate:foo></div>
|
||||||
<div animate:foo></div>
|
<div animate:foo></div>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
animations: {
|
|
||||||
foo(node, animation, params) {
|
|
||||||
// ...
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,14 +1,8 @@
|
|||||||
|
<script>
|
||||||
|
function foo() {}
|
||||||
|
</script>
|
||||||
|
|
||||||
{#each things as thing (thing)}
|
{#each things as thing (thing)}
|
||||||
<div animate:foo></div>
|
<div animate:foo></div>
|
||||||
<div animate:foo></div>
|
<div animate:foo></div>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
animations: {
|
|
||||||
foo(node, animation, params) {
|
|
||||||
// ...
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,15 +0,0 @@
|
|||||||
[{
|
|
||||||
"code": "invalid-name",
|
|
||||||
"message": "Component constructors cannot be called 'state' due to technical limitations",
|
|
||||||
"pos": 73,
|
|
||||||
"start": {
|
|
||||||
"line": 6,
|
|
||||||
"column": 3,
|
|
||||||
"character": 73
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 6,
|
|
||||||
"column": 8,
|
|
||||||
"character": 78
|
|
||||||
}
|
|
||||||
}]
|
|
@ -1,9 +0,0 @@
|
|||||||
<script>
|
|
||||||
import state from 'foo';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
state
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,11 +1,7 @@
|
|||||||
<Nested>
|
|
||||||
<button slot='{foo}'>click me</button>
|
|
||||||
</Nested>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Nested from './Nested.html';
|
import Nested from './Nested.html';
|
||||||
|
</script>
|
||||||
|
|
||||||
export default {
|
<Nested>
|
||||||
components: { Nested }
|
<button slot={foo}>click me</button>
|
||||||
};
|
</Nested>
|
||||||
</script>
|
|
@ -1,15 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
import Nested from './Nested.html';
|
||||||
|
</script>
|
||||||
|
|
||||||
<Nested>
|
<Nested>
|
||||||
{#each things as thing}
|
{#each things as thing}
|
||||||
<div slot='foo'>{thing}</div>
|
<div slot='foo'>{thing}</div>
|
||||||
{/each}
|
{/each}
|
||||||
</Nested>
|
</Nested>
|
||||||
|
|
||||||
<script>
|
|
||||||
import Nested from './Nested.html';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
Nested
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,15 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
import Nested from './Nested.html';
|
||||||
|
</script>
|
||||||
|
|
||||||
<Nested>
|
<Nested>
|
||||||
{#if thing}
|
{#if thing}
|
||||||
<div slot='foo'>{thing}</div>
|
<div slot='foo'>{thing}</div>
|
||||||
{/if}
|
{/if}
|
||||||
</Nested>
|
</Nested>
|
||||||
|
|
||||||
<script>
|
|
||||||
import Nested from './Nested.html';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
Nested
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -0,0 +1,15 @@
|
|||||||
|
[{
|
||||||
|
"code": "default-export",
|
||||||
|
"message": "A component cannot have a default export",
|
||||||
|
"pos": 10,
|
||||||
|
"start": {
|
||||||
|
"line": 2,
|
||||||
|
"column": 1,
|
||||||
|
"character": 10
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 2,
|
||||||
|
"column": 19,
|
||||||
|
"character": 28
|
||||||
|
}
|
||||||
|
}]
|
@ -0,0 +1,3 @@
|
|||||||
|
<script>
|
||||||
|
export default 42;
|
||||||
|
</script>
|
@ -1,15 +0,0 @@
|
|||||||
[{
|
|
||||||
"code": "missing-ref",
|
|
||||||
"message": "'refs.inputx' does not exist (did you mean 'refs.input'?)",
|
|
||||||
"pos": 36,
|
|
||||||
"start": {
|
|
||||||
"line": 2,
|
|
||||||
"column": 18,
|
|
||||||
"character": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 2,
|
|
||||||
"column": 35,
|
|
||||||
"character": 53
|
|
||||||
}
|
|
||||||
}]
|
|
@ -1,2 +0,0 @@
|
|||||||
<input ref:input>
|
|
||||||
<button on:click='refs.inputx.focus()'>focus input</button>
|
|
@ -1,2 +0,0 @@
|
|||||||
<input ref:input>
|
|
||||||
<button on:click='{() => refs.input.focus()}'>focus input</button>
|
|
@ -1 +0,0 @@
|
|||||||
[]
|
|
@ -1,11 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let things = [ 'a', 'b', 'c' ];
|
|
||||||
|
|
||||||
function thing(x) {
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#each things as thing}
|
|
||||||
{thing}
|
|
||||||
{/each}
|
|
@ -1,15 +0,0 @@
|
|||||||
[{
|
|
||||||
"code": "each-context-clash",
|
|
||||||
"message": "Context clashes with a helper. Rename one or the other to eliminate any ambiguity",
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17,
|
|
||||||
"character": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22,
|
|
||||||
"character": 22
|
|
||||||
},
|
|
||||||
"pos": 17
|
|
||||||
}]
|
|
@ -1,15 +0,0 @@
|
|||||||
[{
|
|
||||||
"code": "named-export",
|
|
||||||
"message": "A component can only have a default export",
|
|
||||||
"pos": 10,
|
|
||||||
"start": {
|
|
||||||
"line": 2,
|
|
||||||
"column": 1,
|
|
||||||
"character": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 2,
|
|
||||||
"column": 21,
|
|
||||||
"character": 30
|
|
||||||
}
|
|
||||||
}]
|
|
@ -1,3 +0,0 @@
|
|||||||
<script>
|
|
||||||
export var foo = 42;
|
|
||||||
</script>
|
|
@ -1,5 +1 @@
|
|||||||
<script>
|
<svelte:meta namespace="lol"/>
|
||||||
export default {
|
|
||||||
namespace: 'lol'
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,5 +1 @@
|
|||||||
<script>
|
<svelte:meta namespace="http://www.w3.org/1999/svg"/>
|
||||||
export default {
|
|
||||||
namespace: 'http://www.w3.org/1999/svg'
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,7 +1 @@
|
|||||||
<script>
|
<svelte:meta namespace={ns}/>
|
||||||
const namespace = 'http://www.w3.org/1999/svg';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
namespace
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,5 +1 @@
|
|||||||
<script>
|
<svelte:meta tag="invalid"/>
|
||||||
export default {
|
|
||||||
tag: 'invalid'
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,5 +1 @@
|
|||||||
<script>
|
<svelte:meta tag={42}/>
|
||||||
export default {
|
|
||||||
tag: 42
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,10 +1,6 @@
|
|||||||
<div in:foo transition:bar>...</div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
function foo() {}
|
||||||
transitions: {
|
function bar() {}
|
||||||
foo,
|
</script>
|
||||||
bar
|
|
||||||
}
|
<div in:foo transition:bar>...</div>
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,10 +1,6 @@
|
|||||||
<div in:foo in:bar>...</div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
function foo() {}
|
||||||
transitions: {
|
function bar() {}
|
||||||
foo,
|
</script>
|
||||||
bar
|
|
||||||
}
|
<div in:foo in:bar>...</div>
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,10 +1,6 @@
|
|||||||
<div out:foo transition:bar>...</div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
function foo() {}
|
||||||
transitions: {
|
function bar() {}
|
||||||
foo,
|
</script>
|
||||||
bar
|
|
||||||
}
|
<div out:foo transition:bar>...</div>
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,10 +1,6 @@
|
|||||||
<div out:foo out:bar>...</div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
function foo() {}
|
||||||
transitions: {
|
function bar() {}
|
||||||
foo,
|
</script>
|
||||||
bar
|
|
||||||
}
|
<div out:foo out:bar>...</div>
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,10 +1,6 @@
|
|||||||
<div transition:foo in:bar>...</div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
function foo() {}
|
||||||
transitions: {
|
function bar() {}
|
||||||
foo,
|
</script>
|
||||||
bar
|
|
||||||
}
|
<div transition:foo in:bar>...</div>
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,10 +1,6 @@
|
|||||||
<div transition:foo out:bar>...</div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
function foo() {}
|
||||||
transitions: {
|
function bar() {}
|
||||||
foo,
|
</script>
|
||||||
bar
|
|
||||||
}
|
<div transition:foo out:bar>...</div>
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,10 +1,6 @@
|
|||||||
<div transition:foo transition:bar>...</div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
function foo() {}
|
||||||
transitions: {
|
function bar() {}
|
||||||
foo,
|
</script>
|
||||||
bar
|
|
||||||
}
|
<div transition:foo transition:bar>...</div>
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,15 +1,7 @@
|
|||||||
<Widget in:foo/>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Widget from './Widget.html';
|
import Widget from './Widget.html';
|
||||||
|
|
||||||
export default {
|
function foo() {}
|
||||||
components: {
|
</script>
|
||||||
Widget
|
|
||||||
},
|
|
||||||
|
|
||||||
transitions: {
|
<Widget in:foo/>
|
||||||
foo() {}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
Loading…
Reference in new issue