@algorandfoundation/puya-ts 1.0.0-beta.2 → 1.0.0-beta.4

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.
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { S as SourceLocation, T as TypeResolver, c as compile, e as encodingUtil, f as ptypes, r as registerPTypes, t as typeRegistry } from './index-D4-4PUG7.js';
1
+ export { S as SourceLocation, T as TypeResolver, c as compile, e as encodingUtil, f as ptypes, r as registerPTypes, t as typeRegistry } from './index-Cg8BBwmU.js';
2
2
  import 'change-case';
3
3
  import 'node:path';
4
4
  import 'typescript';
@@ -8,6 +8,7 @@ import 'node:util';
8
8
  import 'upath';
9
9
  import 'polytype';
10
10
  import 'tslib';
11
+ import 'arcsecond';
11
12
  import 'crypto';
12
13
  import 'fs';
13
14
  import 'glob';
package/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.7";
21
- var version = "5.7.2";
21
+ var version = "5.7.3";
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -11143,6 +11143,7 @@ function sortAndDeduplicateDiagnostics(diagnostics) {
11143
11143
  }
11144
11144
  var targetToLibMap = /* @__PURE__ */ new Map([
11145
11145
  [99 /* ESNext */, "lib.esnext.full.d.ts"],
11146
+ [11 /* ES2024 */, "lib.es2024.full.d.ts"],
11146
11147
  [10 /* ES2023 */, "lib.es2023.full.d.ts"],
11147
11148
  [9 /* ES2022 */, "lib.es2022.full.d.ts"],
11148
11149
  [8 /* ES2021 */, "lib.es2021.full.d.ts"],
@@ -11158,6 +11159,7 @@ function getDefaultLibFileName(options) {
11158
11159
  const target = getEmitScriptTarget(options);
11159
11160
  switch (target) {
11160
11161
  case 99 /* ESNext */:
11162
+ case 11 /* ES2024 */:
11161
11163
  case 10 /* ES2023 */:
11162
11164
  case 9 /* ES2022 */:
11163
11165
  case 8 /* ES2021 */:
@@ -46776,6 +46778,12 @@ function createTypeChecker(host) {
46776
46778
  /*isReadonly*/
46777
46779
  true
46778
46780
  );
46781
+ var anyBaseTypeIndexInfo = createIndexInfo(
46782
+ stringType,
46783
+ anyType,
46784
+ /*isReadonly*/
46785
+ false
46786
+ );
46779
46787
  var iterationTypesCache = /* @__PURE__ */ new Map();
46780
46788
  var noIterationTypes = {
46781
46789
  get yieldType() {
@@ -50319,7 +50327,7 @@ function createTypeChecker(host) {
50319
50327
  return true;
50320
50328
  }
50321
50329
  if (requiresAddingUndefined && annotationType) {
50322
- annotationType = getOptionalType(annotationType, !isParameter(node));
50330
+ annotationType = addOptionality(annotationType, !isParameter(node));
50323
50331
  }
50324
50332
  return !!annotationType && typeNodeIsEquivalentToType(node, type, annotationType) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type);
50325
50333
  }
@@ -56577,12 +56585,7 @@ function createTypeChecker(host) {
56577
56585
  addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType));
56578
56586
  callSignatures = concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */));
56579
56587
  constructSignatures = concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */));
56580
- const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [createIndexInfo(
56581
- stringType,
56582
- anyType,
56583
- /*isReadonly*/
56584
- false
56585
- )];
56588
+ const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [anyBaseTypeIndexInfo];
56586
56589
  indexInfos = concatenate(indexInfos, filter(inheritedIndexInfos, (info) => !findIndexInfo(indexInfos, info.keyType)));
56587
56590
  }
56588
56591
  }
@@ -57108,12 +57111,7 @@ function createTypeChecker(host) {
57108
57111
  members = createSymbolTable(getNamedOrIndexSignatureMembers(members));
57109
57112
  addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
57110
57113
  } else if (baseConstructorType === anyType) {
57111
- baseConstructorIndexInfo = createIndexInfo(
57112
- stringType,
57113
- anyType,
57114
- /*isReadonly*/
57115
- false
57116
- );
57114
+ baseConstructorIndexInfo = anyBaseTypeIndexInfo;
57117
57115
  }
57118
57116
  }
57119
57117
  const indexSymbol = getIndexSymbolFromSymbolTable(members);
@@ -70460,12 +70458,13 @@ function createTypeChecker(host) {
70460
70458
  const jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found : void 0;
70461
70459
  const jsxFactoryNamespace = getJsxNamespace(node);
70462
70460
  const jsxFactoryLocation = isJsxOpeningLikeElement(node) ? node.tagName : node;
70461
+ const shouldFactoryRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */;
70463
70462
  let jsxFactorySym;
70464
70463
  if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
70465
70464
  jsxFactorySym = resolveName(
70466
70465
  jsxFactoryLocation,
70467
70466
  jsxFactoryNamespace,
70468
- compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */,
70467
+ shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
70469
70468
  jsxFactoryRefErr,
70470
70469
  /*isUse*/
70471
70470
  true
@@ -70484,7 +70483,7 @@ function createTypeChecker(host) {
70484
70483
  resolveName(
70485
70484
  jsxFactoryLocation,
70486
70485
  localJsxNamespace,
70487
- compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */,
70486
+ shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
70488
70487
  jsxFactoryRefErr,
70489
70488
  /*isUse*/
70490
70489
  true
@@ -74045,6 +74044,13 @@ function createTypeChecker(host) {
74045
74044
  return getIntersectionType(x);
74046
74045
  }
74047
74046
  function reportNonexistentProperty(propNode, containingType, isUncheckedJS) {
74047
+ const links = getNodeLinks(propNode);
74048
+ const cache = links.nonExistentPropCheckCache || (links.nonExistentPropCheckCache = /* @__PURE__ */ new Set());
74049
+ const key = `${getTypeId(containingType)}|${isUncheckedJS}`;
74050
+ if (cache.has(key)) {
74051
+ return;
74052
+ }
74053
+ cache.add(key);
74048
74054
  let errorInfo;
74049
74055
  let relatedInfo;
74050
74056
  if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) {
@@ -76003,12 +76009,14 @@ function createTypeChecker(host) {
76003
76009
  const sourceFileLinks = getNodeLinks(getSourceFileOfNode(node));
76004
76010
  if (sourceFileLinks.jsxFragmentType !== void 0) return sourceFileLinks.jsxFragmentType;
76005
76011
  const jsxFragmentFactoryName = getJsxNamespace(node);
76006
- if (jsxFragmentFactoryName === "null") return sourceFileLinks.jsxFragmentType = anyType;
76012
+ const shouldResolveFactoryReference = (compilerOptions.jsx === 2 /* React */ || compilerOptions.jsxFragmentFactory !== void 0) && jsxFragmentFactoryName !== "null";
76013
+ if (!shouldResolveFactoryReference) return sourceFileLinks.jsxFragmentType = anyType;
76014
+ const shouldModuleRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */;
76007
76015
  const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0;
76008
76016
  const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ?? resolveName(
76009
76017
  node,
76010
76018
  jsxFragmentFactoryName,
76011
- compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */,
76019
+ shouldModuleRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
76012
76020
  /*nameNotFoundMessage*/
76013
76021
  jsxFactoryRefErr,
76014
76022
  /*isUse*/
@@ -78574,7 +78582,9 @@ function createTypeChecker(host) {
78574
78582
  switch (node.kind) {
78575
78583
  case 223 /* AwaitExpression */:
78576
78584
  case 213 /* CallExpression */:
78585
+ case 215 /* TaggedTemplateExpression */:
78577
78586
  case 212 /* ElementAccessExpression */:
78587
+ case 236 /* MetaProperty */:
78578
78588
  case 214 /* NewExpression */:
78579
78589
  case 211 /* PropertyAccessExpression */:
78580
78590
  case 229 /* YieldExpression */:
@@ -78590,6 +78600,8 @@ function createTypeChecker(host) {
78590
78600
  case 56 /* AmpersandAmpersandToken */:
78591
78601
  case 77 /* AmpersandAmpersandEqualsToken */:
78592
78602
  return 3 /* Sometimes */;
78603
+ case 28 /* CommaToken */:
78604
+ return getSyntacticNullishnessSemantics(node.right);
78593
78605
  }
78594
78606
  return 2 /* Never */;
78595
78607
  case 227 /* ConditionalExpression */:
@@ -84702,7 +84714,7 @@ function createTypeChecker(host) {
84702
84714
  }
84703
84715
  }
84704
84716
  }
84705
- if (isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node)) {
84717
+ if (!importClause.isTypeOnly && moduleKind === 199 /* NodeNext */ && isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node)) {
84706
84718
  error(node.moduleSpecifier, Diagnostics.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, ModuleKind[moduleKind]);
84707
84719
  }
84708
84720
  } else if (noUncheckedSideEffectImports && !importClause) {
@@ -86986,6 +86998,7 @@ function createTypeChecker(host) {
86986
86998
  result || (result = []);
86987
86999
  for (const info of infoList) {
86988
87000
  if (info.declaration) continue;
87001
+ if (info === anyBaseTypeIndexInfo) continue;
86989
87002
  const node = nodeBuilder.indexInfoToIndexSignatureDeclaration(info, enclosing, flags, internalFlags, tracker);
86990
87003
  if (node && infoList === staticInfos) {
86991
87004
  (node.modifiers || (node.modifiers = factory.createNodeArray())).unshift(factory.createModifier(126 /* StaticKeyword */));
@@ -131703,9 +131716,9 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
131703
131716
  }
131704
131717
  if (!result && node.kind === 303 /* PropertyAssignment */) {
131705
131718
  const initializer = node.initializer;
131706
- const type = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0;
131707
- if (type && !isConstTypeReference(type)) {
131708
- result = serializeExistingTypeNode(type, context);
131719
+ const assertionNode = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0;
131720
+ if (assertionNode && !isConstTypeReference(assertionNode) && resolver.canReuseTypeNodeAnnotation(context, node, assertionNode, symbol)) {
131721
+ result = serializeExistingTypeNode(assertionNode, context);
131709
131722
  }
131710
131723
  }
131711
131724
  return result ?? inferTypeOfDeclaration(
@@ -2278,7 +2278,7 @@ module.exports = __toCommonJS(typescript_exports);
2278
2278
 
2279
2279
  // src/compiler/corePublic.ts
2280
2280
  var versionMajorMinor = "5.7";
2281
- var version = "5.7.2";
2281
+ var version = "5.7.3";
2282
2282
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2283
2283
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2284
2284
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -14547,6 +14547,7 @@ function sortAndDeduplicateDiagnostics(diagnostics) {
14547
14547
  }
14548
14548
  var targetToLibMap = /* @__PURE__ */ new Map([
14549
14549
  [99 /* ESNext */, "lib.esnext.full.d.ts"],
14550
+ [11 /* ES2024 */, "lib.es2024.full.d.ts"],
14550
14551
  [10 /* ES2023 */, "lib.es2023.full.d.ts"],
14551
14552
  [9 /* ES2022 */, "lib.es2022.full.d.ts"],
14552
14553
  [8 /* ES2021 */, "lib.es2021.full.d.ts"],
@@ -14562,6 +14563,7 @@ function getDefaultLibFileName(options) {
14562
14563
  const target = getEmitScriptTarget(options);
14563
14564
  switch (target) {
14564
14565
  case 99 /* ESNext */:
14566
+ case 11 /* ES2024 */:
14565
14567
  case 10 /* ES2023 */:
14566
14568
  case 9 /* ES2022 */:
14567
14569
  case 8 /* ES2021 */:
@@ -51380,6 +51382,12 @@ function createTypeChecker(host) {
51380
51382
  /*isReadonly*/
51381
51383
  true
51382
51384
  );
51385
+ var anyBaseTypeIndexInfo = createIndexInfo(
51386
+ stringType,
51387
+ anyType,
51388
+ /*isReadonly*/
51389
+ false
51390
+ );
51383
51391
  var iterationTypesCache = /* @__PURE__ */ new Map();
51384
51392
  var noIterationTypes = {
51385
51393
  get yieldType() {
@@ -54923,7 +54931,7 @@ function createTypeChecker(host) {
54923
54931
  return true;
54924
54932
  }
54925
54933
  if (requiresAddingUndefined && annotationType) {
54926
- annotationType = getOptionalType(annotationType, !isParameter(node));
54934
+ annotationType = addOptionality(annotationType, !isParameter(node));
54927
54935
  }
54928
54936
  return !!annotationType && typeNodeIsEquivalentToType(node, type, annotationType) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type);
54929
54937
  }
@@ -61181,12 +61189,7 @@ function createTypeChecker(host) {
61181
61189
  addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType));
61182
61190
  callSignatures = concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */));
61183
61191
  constructSignatures = concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */));
61184
- const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [createIndexInfo(
61185
- stringType,
61186
- anyType,
61187
- /*isReadonly*/
61188
- false
61189
- )];
61192
+ const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [anyBaseTypeIndexInfo];
61190
61193
  indexInfos = concatenate(indexInfos, filter(inheritedIndexInfos, (info) => !findIndexInfo(indexInfos, info.keyType)));
61191
61194
  }
61192
61195
  }
@@ -61712,12 +61715,7 @@ function createTypeChecker(host) {
61712
61715
  members = createSymbolTable(getNamedOrIndexSignatureMembers(members));
61713
61716
  addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
61714
61717
  } else if (baseConstructorType === anyType) {
61715
- baseConstructorIndexInfo = createIndexInfo(
61716
- stringType,
61717
- anyType,
61718
- /*isReadonly*/
61719
- false
61720
- );
61718
+ baseConstructorIndexInfo = anyBaseTypeIndexInfo;
61721
61719
  }
61722
61720
  }
61723
61721
  const indexSymbol = getIndexSymbolFromSymbolTable(members);
@@ -75067,12 +75065,13 @@ function createTypeChecker(host) {
75067
75065
  const jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found : void 0;
75068
75066
  const jsxFactoryNamespace = getJsxNamespace(node);
75069
75067
  const jsxFactoryLocation = isJsxOpeningLikeElement(node) ? node.tagName : node;
75068
+ const shouldFactoryRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */;
75070
75069
  let jsxFactorySym;
75071
75070
  if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
75072
75071
  jsxFactorySym = resolveName(
75073
75072
  jsxFactoryLocation,
75074
75073
  jsxFactoryNamespace,
75075
- compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */,
75074
+ shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
75076
75075
  jsxFactoryRefErr,
75077
75076
  /*isUse*/
75078
75077
  true
@@ -75091,7 +75090,7 @@ function createTypeChecker(host) {
75091
75090
  resolveName(
75092
75091
  jsxFactoryLocation,
75093
75092
  localJsxNamespace,
75094
- compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */,
75093
+ shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
75095
75094
  jsxFactoryRefErr,
75096
75095
  /*isUse*/
75097
75096
  true
@@ -78652,6 +78651,13 @@ function createTypeChecker(host) {
78652
78651
  return getIntersectionType(x);
78653
78652
  }
78654
78653
  function reportNonexistentProperty(propNode, containingType, isUncheckedJS) {
78654
+ const links = getNodeLinks(propNode);
78655
+ const cache = links.nonExistentPropCheckCache || (links.nonExistentPropCheckCache = /* @__PURE__ */ new Set());
78656
+ const key = `${getTypeId(containingType)}|${isUncheckedJS}`;
78657
+ if (cache.has(key)) {
78658
+ return;
78659
+ }
78660
+ cache.add(key);
78655
78661
  let errorInfo;
78656
78662
  let relatedInfo;
78657
78663
  if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) {
@@ -80610,12 +80616,14 @@ function createTypeChecker(host) {
80610
80616
  const sourceFileLinks = getNodeLinks(getSourceFileOfNode(node));
80611
80617
  if (sourceFileLinks.jsxFragmentType !== void 0) return sourceFileLinks.jsxFragmentType;
80612
80618
  const jsxFragmentFactoryName = getJsxNamespace(node);
80613
- if (jsxFragmentFactoryName === "null") return sourceFileLinks.jsxFragmentType = anyType;
80619
+ const shouldResolveFactoryReference = (compilerOptions.jsx === 2 /* React */ || compilerOptions.jsxFragmentFactory !== void 0) && jsxFragmentFactoryName !== "null";
80620
+ if (!shouldResolveFactoryReference) return sourceFileLinks.jsxFragmentType = anyType;
80621
+ const shouldModuleRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */;
80614
80622
  const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0;
80615
80623
  const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ?? resolveName(
80616
80624
  node,
80617
80625
  jsxFragmentFactoryName,
80618
- compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */,
80626
+ shouldModuleRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
80619
80627
  /*nameNotFoundMessage*/
80620
80628
  jsxFactoryRefErr,
80621
80629
  /*isUse*/
@@ -83181,7 +83189,9 @@ function createTypeChecker(host) {
83181
83189
  switch (node.kind) {
83182
83190
  case 223 /* AwaitExpression */:
83183
83191
  case 213 /* CallExpression */:
83192
+ case 215 /* TaggedTemplateExpression */:
83184
83193
  case 212 /* ElementAccessExpression */:
83194
+ case 236 /* MetaProperty */:
83185
83195
  case 214 /* NewExpression */:
83186
83196
  case 211 /* PropertyAccessExpression */:
83187
83197
  case 229 /* YieldExpression */:
@@ -83197,6 +83207,8 @@ function createTypeChecker(host) {
83197
83207
  case 56 /* AmpersandAmpersandToken */:
83198
83208
  case 77 /* AmpersandAmpersandEqualsToken */:
83199
83209
  return 3 /* Sometimes */;
83210
+ case 28 /* CommaToken */:
83211
+ return getSyntacticNullishnessSemantics(node.right);
83200
83212
  }
83201
83213
  return 2 /* Never */;
83202
83214
  case 227 /* ConditionalExpression */:
@@ -89309,7 +89321,7 @@ function createTypeChecker(host) {
89309
89321
  }
89310
89322
  }
89311
89323
  }
89312
- if (isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node)) {
89324
+ if (!importClause.isTypeOnly && moduleKind === 199 /* NodeNext */ && isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node)) {
89313
89325
  error2(node.moduleSpecifier, Diagnostics.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, ModuleKind[moduleKind]);
89314
89326
  }
89315
89327
  } else if (noUncheckedSideEffectImports && !importClause) {
@@ -91593,6 +91605,7 @@ function createTypeChecker(host) {
91593
91605
  result || (result = []);
91594
91606
  for (const info of infoList) {
91595
91607
  if (info.declaration) continue;
91608
+ if (info === anyBaseTypeIndexInfo) continue;
91596
91609
  const node = nodeBuilder.indexInfoToIndexSignatureDeclaration(info, enclosing, flags, internalFlags, tracker);
91597
91610
  if (node && infoList === staticInfos) {
91598
91611
  (node.modifiers || (node.modifiers = factory.createNodeArray())).unshift(factory.createModifier(126 /* StaticKeyword */));
@@ -136667,9 +136680,9 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
136667
136680
  }
136668
136681
  if (!result && node.kind === 303 /* PropertyAssignment */) {
136669
136682
  const initializer = node.initializer;
136670
- const type = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0;
136671
- if (type && !isConstTypeReference(type)) {
136672
- result = serializeExistingTypeNode(type, context);
136683
+ const assertionNode = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0;
136684
+ if (assertionNode && !isConstTypeReference(assertionNode) && resolver.canReuseTypeNodeAnnotation(context, node, assertionNode, symbol)) {
136685
+ result = serializeExistingTypeNode(assertionNode, context);
136673
136686
  }
136674
136687
  }
136675
136688
  return result ?? inferTypeOfDeclaration(
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.7.2",
5
+ "version": "5.7.3",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -116,5 +116,5 @@
116
116
  "node": "20.1.0",
117
117
  "npm": "8.19.4"
118
118
  },
119
- "gitHead": "d701d908d534e68cfab24b6df15539014ac348a3"
119
+ "gitHead": "a5e123d9e0690fcea92878ea8a0a382922009fc9"
120
120
  }
package/package.json CHANGED
@@ -4,12 +4,13 @@
4
4
  "**"
5
5
  ],
6
6
  "name": "@algorandfoundation/puya-ts",
7
- "version": "1.0.0-beta.2",
7
+ "version": "1.0.0-beta.4",
8
8
  "description": "Compiles Algorand TypeScript into byte code which runs on the Algorand Virtual Machine (AVM)",
9
9
  "private": false,
10
10
  "author": "Algorand foundation",
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
+ "arcsecond": "^5.0.0",
13
14
  "chalk": "^5.3.0",
14
15
  "change-case": "^5.4.4",
15
16
  "commander": "^12.1.0",
@@ -0,0 +1,6 @@
1
+ import * as arc4Types from '../awst_build/ptypes/arc4-types';
2
+ export declare class Arc4ParseError extends Error {
3
+ index: number;
4
+ constructor(message: string, index: number);
5
+ }
6
+ export declare const parseArc4Type: (signature: string) => arc4Types.ARC4EncodedType;