@@ -622,7 +622,7 @@ export class TypeInference {
622622 method : string ,
623623 objBase : ExprBase ,
624624 ) : ResolvedType | null {
625- if ( method === "slice" || method === "concat" ) {
625+ if ( method === "slice" || method === "splice" || method === " concat") {
626626 const objResolved = this . resolveExpressionType ( expr . object ) ;
627627 if ( objResolved ) return objResolved ;
628628 }
@@ -1329,7 +1329,11 @@ export class TypeInference {
13291329 return true ;
13301330 }
13311331 }
1332- if ( methodExpr . method === "slice" || methodExpr . method === "concat" ) {
1332+ if (
1333+ methodExpr . method === "slice" ||
1334+ methodExpr . method === "splice" ||
1335+ methodExpr . method === "concat"
1336+ ) {
13331337 const objBase = methodExpr . object as ExprBase ;
13341338 if ( objBase . type === "array" ) {
13351339 return true ;
@@ -1532,6 +1536,7 @@ export class TypeInference {
15321536 }
15331537 if (
15341538 methodExpr . method === "slice" ||
1539+ methodExpr . method === "splice" ||
15351540 methodExpr . method === "concat" ||
15361541 methodExpr . method === "filter"
15371542 ) {
@@ -2447,6 +2452,7 @@ export class TypeInference {
24472452 if (
24482453 methodExpr . method === "map" ||
24492454 methodExpr . method === "filter" ||
2455+ methodExpr . method === "splice" ||
24502456 methodExpr . method === "slice" ||
24512457 methodExpr . method === "concat"
24522458 ) {
0 commit comments