@esportsplus/reactivity 0.30.0 → 0.30.2

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.
@@ -17,6 +17,15 @@ function analyzeProperty(prop, sourceFile) {
17
17
  while (ts.isAsExpression(unwrapped) || ts.isTypeAssertionExpression(unwrapped) || ts.isParenthesizedExpression(unwrapped)) {
18
18
  unwrapped = unwrapped.expression;
19
19
  }
20
+ if (ts.isAsExpression(value) || ts.isTypeAssertionExpression(value)) {
21
+ let type = value.type;
22
+ if (ts.isArrayTypeNode(type) ||
23
+ (ts.isTypeReferenceNode(type) &&
24
+ ts.isIdentifier(type.typeName) &&
25
+ type.typeName.text === 'Array')) {
26
+ return { isStatic: false, key, type: TYPES.Array, valueText };
27
+ }
28
+ }
20
29
  if (ts.isArrowFunction(unwrapped) || ts.isFunctionExpression(unwrapped)) {
21
30
  return { isStatic: false, key, type: TYPES.Computed, valueText };
22
31
  }
package/package.json CHANGED
@@ -4,8 +4,8 @@
4
4
  "@esportsplus/utilities": "^0.27.2"
5
5
  },
6
6
  "devDependencies": {
7
- "@esportsplus/typescript": "^0.28.4",
8
- "@types/node": "^25.0.8",
7
+ "@esportsplus/typescript": "^0.29.0",
8
+ "@types/node": "^25.0.9",
9
9
  "vite": "^7.3.1"
10
10
  },
11
11
  "exports": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "type": "module",
37
37
  "types": "build/index.d.ts",
38
- "version": "0.30.0",
38
+ "version": "0.30.2",
39
39
  "scripts": {
40
40
  "build": "tsc",
41
41
  "build:test": "pnpm build && vite build --config test/vite.config.ts",
@@ -55,6 +55,21 @@ function analyzeProperty(prop: ts.ObjectLiteralElementLike, sourceFile: ts.Sourc
55
55
  unwrapped = unwrapped.expression;
56
56
  }
57
57
 
58
+ if (ts.isAsExpression(value) || ts.isTypeAssertionExpression(value)) {
59
+ let type = (value as ts.AsExpression).type;
60
+
61
+ if (
62
+ ts.isArrayTypeNode(type) ||
63
+ (
64
+ ts.isTypeReferenceNode(type) &&
65
+ ts.isIdentifier(type.typeName) &&
66
+ type.typeName.text === 'Array'
67
+ )
68
+ ) {
69
+ return { isStatic: false, key, type: TYPES.Array, valueText };
70
+ }
71
+ }
72
+
58
73
  if (ts.isArrowFunction(unwrapped) || ts.isFunctionExpression(unwrapped)) {
59
74
  return { isStatic: false, key, type: TYPES.Computed, valueText };
60
75
  }