mirror of https://github.com/sveltejs/svelte
update periscopic (#6471)
parent
7eebe6e7d0
commit
98ddf8b588
@ -1,8 +1,8 @@
|
||||
import { Node } from 'estree';
|
||||
import { analyze, Scope, extract_names, extract_identifiers } from 'periscopic';
|
||||
import { Node as PeriscopicNode, analyze, Scope, extract_names, extract_identifiers } from 'periscopic';
|
||||
|
||||
export function create_scopes(expression: Node) {
|
||||
return analyze(expression);
|
||||
return analyze(expression as PeriscopicNode);
|
||||
}
|
||||
|
||||
export { Scope, extract_names, extract_identifiers };
|
||||
|
@ -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": 30,
|
||||
"character": 39
|
||||
}
|
||||
}]
|
@ -0,0 +1,3 @@
|
||||
<script>
|
||||
export default function () {};
|
||||
</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": 24,
|
||||
"character": 33
|
||||
}
|
||||
}]
|
@ -0,0 +1,3 @@
|
||||
<script>
|
||||
export default class {};
|
||||
</script>
|
Loading…
Reference in new issue