mirror of https://github.com/sveltejs/svelte
commit
7d4a36af2d
@ -0,0 +1,7 @@
|
||||
export default {
|
||||
props: {
|
||||
greeting: 'Good day'
|
||||
},
|
||||
|
||||
html: '<h1>Good day, world</h1>'
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<script>
|
||||
export let greeting = 'Hello'
|
||||
let name = 'world';
|
||||
|
||||
// both functions, and `name` are hoistable, but hoistMe does not get hoisted
|
||||
function hoistMeMaybe () {
|
||||
return hoistMe(name) // comment out this line => hoistMe is hoisted
|
||||
}
|
||||
|
||||
function hoistMe (name) {
|
||||
return name
|
||||
}
|
||||
</script>
|
||||
|
||||
<h1>{greeting}, {hoistMeMaybe()}</h1>
|
Loading…
Reference in new issue