File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/svelte/src/compiler/phases Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ const UNKNOWN = Symbol('unknown');
2121/** Includes `BigInt` */
2222export const NUMBER = Symbol ( 'number' ) ;
2323export const STRING = Symbol ( 'string' ) ;
24+ const NOT_NULL = Symbol ( 'not null' ) ;
2425/** @typedef {NUMBER | STRING | UNKNOWN | undefined | boolean } TYPE */
2526/** @type {Record<string, [type: TYPE | TYPE[], fn?: Function]> } */
2627const globals = {
@@ -298,6 +299,11 @@ class Evaluation {
298299 binding . scope . evaluate ( /** @type {Expression } */ ( binding . initial ) , this . values ) ;
299300 break ;
300301 }
302+
303+ if ( binding . kind === 'rest_prop' && ! binding . updated ) {
304+ this . values . add ( NOT_NULL ) ;
305+ break ;
306+ }
301307 } else if ( expression . name === 'undefined' ) {
302308 this . values . add ( undefined ) ;
303309 break ;
You can’t perform that action at this time.
0 commit comments