File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,12 @@ Svelte uses the `export` keyword to mark a variable declaration as a *property*
35
35
// these properties can be set externally
36
36
export let foo;
37
37
export let bar = ' optional default value' ;
38
-
38
+
39
+ // you can use export { ... as ... } to have
40
+ // props whose names are reserved keywords
41
+ let clazz;
42
+ export { clazz as class };
43
+
39
44
// this property is readonly externally
40
45
export const buzz = ' buzz' ;
41
46
@@ -48,6 +53,13 @@ Svelte uses the `export` keyword to mark a variable declaration as a *property*
48
53
export function instanceMethod () {
49
54
alert (foo);
50
55
}
56
+
57
+ // you can also use export { ... as ... } to have
58
+ // methods whose names are reserved keywords
59
+ function del () {
60
+ do_something ();
61
+ }
62
+ export { del as delete };
51
63
</script >
52
64
```
53
65
You can’t perform that action at this time.
0 commit comments