File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed
packages/svelte/tests/migrate/samples Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 2424 /**
2525 * This is optional
2626 */
27- export let optional = {stuff: true };
27+ export let optional = {stuff: true };
28+
29+ export let inline_commented; // this should stay a comment
30+
31+ /**
32+ * This comment should be merged
33+ */
34+ export let inline_commented_merged; // with this inline comment
2835 </script >
Original file line number Diff line number Diff line change 99
1010
1111
12+
13+
14+
1215 /**
1316 * @typedef {Object} Props
1417 * @property {string} comment - My wonderful comment
1720 * @property {any} no_comment
1821 * @property {boolean} type_no_comment
1922 * @property {any} [optional] - This is optional
23+ * @property {any} inline_commented - this should stay a comment
24+ * @property {any} inline_commented_merged - This comment should be merged - with this inline comment
2025 */
2126
2227 /** @type {Props} */
2631 one_line,
2732 no_comment,
2833 type_no_comment,
29- optional = {stuff: true }
34+ optional = {stuff: true },
35+ inline_commented,
36+ inline_commented_merged
3037 } = $props ();
3138 </script >
Original file line number Diff line number Diff line change 66 export let bindingOptional: string | undefined = ' bar' ;
77 /** this should stay a comment */
88 export let no_type_but_comment = 0 ;
9+ export let type_and_inline_comment: number ; // this should also stay a comment
10+ export let no_type_and_inline_comment = 0 ; // this should stay as well
911 </script >
1012
1113{readonly }
Original file line number Diff line number Diff line change 99 bindingOptional? : string | undefined ;
1010 /** this should stay a comment */
1111 no_type_but_comment? : number ;
12+ type_and_inline_comment: number ; // this should also stay a comment
13+ no_type_and_inline_comment? : number ; // this should stay as well
1214 }
1315
1416 let {
1517 readonly,
1618 optional = ' foo' ,
1719 binding = $bindable (),
1820 bindingOptional = $bindable (' bar' ),
19- no_type_but_comment = 0
21+ no_type_but_comment = 0 ,
22+ type_and_inline_comment,
23+ no_type_and_inline_comment = 0
2024 }: Props = $props ();
2125 </script >
2226
You can’t perform that action at this time.
0 commit comments