@scriptc/compiler 0.0.30 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3166,12 +3166,13 @@ export function lowerVarDecl(L, decl, isLet) {
3166
3166
  // adopt the initializer's type. Checker-`any[]` decls take the same
3167
3167
  // rule (`const tlds = Array.isArray(u) ? u : [u]` — tsc's readonly
3168
3168
  // Array.isArray quirk types the ternary any[], while the arms lower
3169
- // to the union's real array arm). Const only — an evolving-`any`
3169
+ // to the union's real array arm; readonly fixed-tuple narrows adopt
3170
+ // their tuple record likewise). Const only — an evolving-`any`
3170
3171
  // `let` may be reassigned a different shape later; genuine `any`
3171
3172
  // only — every other unmappable keeps its own diagnostic.
3172
3173
  if (type === null && !isLet &&
3173
3174
  ((L.typeOf(decl.name).flags & ts.TypeFlags.Any) !== 0 ||
3174
- (L.checkerAnyArray(decl.name) && init.type.kind === "array") ||
3175
+ (L.checkerAnyArray(decl.name) && L.isArrayValueType(init.type)) ||
3175
3176
  // JS declarations carry no annotations: an unmappable inferred
3176
3177
  // type (a union with a fence-folded arm — the typeof-'bigint'
3177
3178
  // dual-mode ternary) adopts the initializer's static type, the