File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
packages/svelte/src/compiler Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,11 @@ export function compile(source, options) {
4343 instance : parsed . instance && remove_typescript_nodes ( parsed . instance ) ,
4444 module : parsed . module && remove_typescript_nodes ( parsed . module )
4545 } ;
46+ if ( combined_options . customElementOptions ?. extend ) {
47+ combined_options . customElementOptions . extend = remove_typescript_nodes (
48+ combined_options . customElementOptions ?. extend
49+ ) ;
50+ }
4651 }
4752
4853 const analysis = analyze_component ( parsed , source , combined_options ) ;
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ export class Parser {
143143 if ( options_index !== - 1 ) {
144144 const options = /** @type {AST.SvelteOptionsRaw } */ ( this . root . fragment . nodes [ options_index ] ) ;
145145 this . root . fragment . nodes . splice ( options_index , 1 ) ;
146- this . root . options = read_options ( options , this . ts ) ;
146+ this . root . options = read_options ( options ) ;
147147
148148 disallow_children ( options ) ;
149149
Original file line number Diff line number Diff line change 22/** @import { AST } from '#compiler' */
33import { NAMESPACE_MATHML , NAMESPACE_SVG } from '../../../../constants.js' ;
44import * as e from '../../../errors.js' ;
5- import { remove_typescript_nodes } from '../remove_typescript_nodes.js' ;
65
76/**
87 * @param {AST.SvelteOptionsRaw } node
9- * @param {boolean } ts
108 * @returns {AST.Root['options'] }
119 */
12- export default function read_options ( node , ts ) {
10+ export default function read_options ( node ) {
1311 /** @type {AST.SvelteOptions } */
1412 const component_options = {
1513 start : node . start ,
@@ -144,7 +142,7 @@ export default function read_options(node, ts) {
144142
145143 const extend = properties . find ( ( [ name ] ) => name === 'extend' ) ?. [ 1 ] ;
146144 if ( extend ) {
147- ce . extend = ts ? remove_typescript_nodes ( extend ) : extend ;
145+ ce . extend = extend ;
148146 }
149147
150148 component_options . customElement = ce ;
You can’t perform that action at this time.
0 commit comments