@typescript-deploys/pr-build 5.0.0-pr-52703-9 → 5.0.0-pr-52696-39

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/lib/tsc.js CHANGED
@@ -23,7 +23,7 @@ var __export = (target, all) => {
23
23
 
24
24
  // src/compiler/corePublic.ts
25
25
  var versionMajorMinor = "5.0";
26
- var version = `${versionMajorMinor}.0-insiders.20230209`;
26
+ var version = `${versionMajorMinor}.0-insiders.20230211`;
27
27
 
28
28
  // src/compiler/core.ts
29
29
  var emptyArray = [];
@@ -614,6 +614,12 @@ function first(array) {
614
614
  Debug.assert(array.length !== 0);
615
615
  return array[0];
616
616
  }
617
+ function firstIterator(iter) {
618
+ for (const value of iter) {
619
+ return value;
620
+ }
621
+ Debug.fail("iterator is empty");
622
+ }
617
623
  function lastOrUndefined(array) {
618
624
  return array === void 0 || array.length === 0 ? void 0 : array[array.length - 1];
619
625
  }
@@ -6174,6 +6180,7 @@ var Diagnostics = {
6174
6180
  To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: diag(1483, 3 /* Message */, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", 'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),
6175
6181
  _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1484, 1 /* Error */, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484", "'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),
6176
6182
  _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1485, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),
6183
+ Decorator_used_before_export_here: diag(1486, 1 /* Error */, "Decorator_used_before_export_here_1486", "Decorator used before 'export' here."),
6177
6184
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
6178
6185
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
6179
6186
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -7530,7 +7537,7 @@ var Diagnostics = {
7530
7537
  You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."),
7531
7538
  You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."),
7532
7539
  Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, 1 /* Error */, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."),
7533
- Decorators_must_come_after_export_or_export_default_in_JavaScript_files: diag(8038, 1 /* Error */, "Decorators_must_come_after_export_or_export_default_in_JavaScript_files_8038", "Decorators must come after 'export' or 'export default' in JavaScript files."),
7540
+ Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export: diag(8038, 1 /* Error */, "Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038", "Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),
7534
7541
  Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, 1 /* Error */, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),
7535
7542
  Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, 1 /* Error */, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),
7536
7543
  JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17e3, 1 /* Error */, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."),
@@ -11650,101 +11657,400 @@ function getInternalEmitFlags(node) {
11650
11657
  return emitNode && emitNode.internalFlags || 0;
11651
11658
  }
11652
11659
  function getScriptTargetFeatures() {
11653
- return {
11654
- es2015: {
11655
- Array: ["find", "findIndex", "fill", "copyWithin", "entries", "keys", "values"],
11656
- RegExp: ["flags", "sticky", "unicode"],
11657
- Reflect: ["apply", "construct", "defineProperty", "deleteProperty", "get", " getOwnPropertyDescriptor", "getPrototypeOf", "has", "isExtensible", "ownKeys", "preventExtensions", "set", "setPrototypeOf"],
11658
- ArrayConstructor: ["from", "of"],
11659
- ObjectConstructor: ["assign", "getOwnPropertySymbols", "keys", "is", "setPrototypeOf"],
11660
- NumberConstructor: ["isFinite", "isInteger", "isNaN", "isSafeInteger", "parseFloat", "parseInt"],
11661
- Math: ["clz32", "imul", "sign", "log10", "log2", "log1p", "expm1", "cosh", "sinh", "tanh", "acosh", "asinh", "atanh", "hypot", "trunc", "fround", "cbrt"],
11662
- Map: ["entries", "keys", "values"],
11663
- Set: ["entries", "keys", "values"],
11664
- Promise: emptyArray,
11665
- PromiseConstructor: ["all", "race", "reject", "resolve"],
11666
- Symbol: ["for", "keyFor"],
11667
- WeakMap: ["entries", "keys", "values"],
11668
- WeakSet: ["entries", "keys", "values"],
11669
- Iterator: emptyArray,
11670
- AsyncIterator: emptyArray,
11671
- String: ["codePointAt", "includes", "endsWith", "normalize", "repeat", "startsWith", "anchor", "big", "blink", "bold", "fixed", "fontcolor", "fontsize", "italics", "link", "small", "strike", "sub", "sup"],
11672
- StringConstructor: ["fromCodePoint", "raw"]
11673
- },
11674
- es2016: {
11675
- Array: ["includes"]
11676
- },
11677
- es2017: {
11678
- Atomics: emptyArray,
11679
- SharedArrayBuffer: emptyArray,
11680
- String: ["padStart", "padEnd"],
11681
- ObjectConstructor: ["values", "entries", "getOwnPropertyDescriptors"],
11682
- DateTimeFormat: ["formatToParts"]
11683
- },
11684
- es2018: {
11685
- Promise: ["finally"],
11686
- RegExpMatchArray: ["groups"],
11687
- RegExpExecArray: ["groups"],
11688
- RegExp: ["dotAll"],
11689
- Intl: ["PluralRules"],
11690
- AsyncIterable: emptyArray,
11691
- AsyncIterableIterator: emptyArray,
11692
- AsyncGenerator: emptyArray,
11693
- AsyncGeneratorFunction: emptyArray,
11694
- NumberFormat: ["formatToParts"]
11695
- },
11696
- es2019: {
11697
- Array: ["flat", "flatMap"],
11698
- ObjectConstructor: ["fromEntries"],
11699
- String: ["trimStart", "trimEnd", "trimLeft", "trimRight"],
11700
- Symbol: ["description"]
11701
- },
11702
- es2020: {
11703
- BigInt: emptyArray,
11704
- BigInt64Array: emptyArray,
11705
- BigUint64Array: emptyArray,
11706
- PromiseConstructor: ["allSettled"],
11707
- SymbolConstructor: ["matchAll"],
11708
- String: ["matchAll"],
11709
- DataView: ["setBigInt64", "setBigUint64", "getBigInt64", "getBigUint64"],
11710
- RelativeTimeFormat: ["format", "formatToParts", "resolvedOptions"]
11711
- },
11712
- es2021: {
11713
- PromiseConstructor: ["any"],
11714
- String: ["replaceAll"]
11715
- },
11716
- es2022: {
11717
- Array: ["at"],
11718
- String: ["at"],
11719
- Int8Array: ["at"],
11720
- Uint8Array: ["at"],
11721
- Uint8ClampedArray: ["at"],
11722
- Int16Array: ["at"],
11723
- Uint16Array: ["at"],
11724
- Int32Array: ["at"],
11725
- Uint32Array: ["at"],
11726
- Float32Array: ["at"],
11727
- Float64Array: ["at"],
11728
- BigInt64Array: ["at"],
11729
- BigUint64Array: ["at"],
11730
- ObjectConstructor: ["hasOwn"],
11731
- Error: ["cause"]
11732
- },
11733
- es2023: {
11734
- Array: ["findLastIndex", "findLast"],
11735
- Int8Array: ["findLastIndex", "findLast"],
11736
- Uint8Array: ["findLastIndex", "findLast"],
11737
- Uint8ClampedArray: ["findLastIndex", "findLast"],
11738
- Int16Array: ["findLastIndex", "findLast"],
11739
- Uint16Array: ["findLastIndex", "findLast"],
11740
- Int32Array: ["findLastIndex", "findLast"],
11741
- Uint32Array: ["findLastIndex", "findLast"],
11742
- Float32Array: ["findLastIndex", "findLast"],
11743
- Float64Array: ["findLastIndex", "findLast"],
11744
- BigInt64Array: ["findLastIndex", "findLast"],
11745
- BigUint64Array: ["findLastIndex", "findLast"]
11746
- }
11747
- };
11660
+ return new Map(Object.entries({
11661
+ Array: new Map(Object.entries({
11662
+ es2015: [
11663
+ "find",
11664
+ "findIndex",
11665
+ "fill",
11666
+ "copyWithin",
11667
+ "entries",
11668
+ "keys",
11669
+ "values"
11670
+ ],
11671
+ es2016: [
11672
+ "includes"
11673
+ ],
11674
+ es2019: [
11675
+ "flat",
11676
+ "flatMap"
11677
+ ],
11678
+ es2022: [
11679
+ "at"
11680
+ ],
11681
+ es2023: [
11682
+ "findLastIndex",
11683
+ "findLast"
11684
+ ]
11685
+ })),
11686
+ Iterator: new Map(Object.entries({
11687
+ es2015: emptyArray
11688
+ })),
11689
+ AsyncIterator: new Map(Object.entries({
11690
+ es2015: emptyArray
11691
+ })),
11692
+ Atomics: new Map(Object.entries({
11693
+ es2017: emptyArray
11694
+ })),
11695
+ SharedArrayBuffer: new Map(Object.entries({
11696
+ es2017: emptyArray
11697
+ })),
11698
+ AsyncIterable: new Map(Object.entries({
11699
+ es2018: emptyArray
11700
+ })),
11701
+ AsyncIterableIterator: new Map(Object.entries({
11702
+ es2018: emptyArray
11703
+ })),
11704
+ AsyncGenerator: new Map(Object.entries({
11705
+ es2018: emptyArray
11706
+ })),
11707
+ AsyncGeneratorFunction: new Map(Object.entries({
11708
+ es2018: emptyArray
11709
+ })),
11710
+ RegExp: new Map(Object.entries({
11711
+ es2015: [
11712
+ "flags",
11713
+ "sticky",
11714
+ "unicode"
11715
+ ],
11716
+ es2018: [
11717
+ "dotAll"
11718
+ ]
11719
+ })),
11720
+ Reflect: new Map(Object.entries({
11721
+ es2015: [
11722
+ "apply",
11723
+ "construct",
11724
+ "defineProperty",
11725
+ "deleteProperty",
11726
+ "get",
11727
+ " getOwnPropertyDescriptor",
11728
+ "getPrototypeOf",
11729
+ "has",
11730
+ "isExtensible",
11731
+ "ownKeys",
11732
+ "preventExtensions",
11733
+ "set",
11734
+ "setPrototypeOf"
11735
+ ]
11736
+ })),
11737
+ ArrayConstructor: new Map(Object.entries({
11738
+ es2015: [
11739
+ "from",
11740
+ "of"
11741
+ ]
11742
+ })),
11743
+ ObjectConstructor: new Map(Object.entries({
11744
+ es2015: [
11745
+ "assign",
11746
+ "getOwnPropertySymbols",
11747
+ "keys",
11748
+ "is",
11749
+ "setPrototypeOf"
11750
+ ],
11751
+ es2017: [
11752
+ "values",
11753
+ "entries",
11754
+ "getOwnPropertyDescriptors"
11755
+ ],
11756
+ es2019: [
11757
+ "fromEntries"
11758
+ ],
11759
+ es2022: [
11760
+ "hasOwn"
11761
+ ]
11762
+ })),
11763
+ NumberConstructor: new Map(Object.entries({
11764
+ es2015: [
11765
+ "isFinite",
11766
+ "isInteger",
11767
+ "isNaN",
11768
+ "isSafeInteger",
11769
+ "parseFloat",
11770
+ "parseInt"
11771
+ ]
11772
+ })),
11773
+ Math: new Map(Object.entries({
11774
+ es2015: [
11775
+ "clz32",
11776
+ "imul",
11777
+ "sign",
11778
+ "log10",
11779
+ "log2",
11780
+ "log1p",
11781
+ "expm1",
11782
+ "cosh",
11783
+ "sinh",
11784
+ "tanh",
11785
+ "acosh",
11786
+ "asinh",
11787
+ "atanh",
11788
+ "hypot",
11789
+ "trunc",
11790
+ "fround",
11791
+ "cbrt"
11792
+ ]
11793
+ })),
11794
+ Map: new Map(Object.entries({
11795
+ es2015: [
11796
+ "entries",
11797
+ "keys",
11798
+ "values"
11799
+ ]
11800
+ })),
11801
+ Set: new Map(Object.entries({
11802
+ es2015: [
11803
+ "entries",
11804
+ "keys",
11805
+ "values"
11806
+ ]
11807
+ })),
11808
+ PromiseConstructor: new Map(Object.entries({
11809
+ es2015: [
11810
+ "all",
11811
+ "race",
11812
+ "reject",
11813
+ "resolve"
11814
+ ],
11815
+ es2020: [
11816
+ "allSettled"
11817
+ ],
11818
+ es2021: [
11819
+ "any"
11820
+ ]
11821
+ })),
11822
+ Symbol: new Map(Object.entries({
11823
+ es2015: [
11824
+ "for",
11825
+ "keyFor"
11826
+ ],
11827
+ es2019: [
11828
+ "description"
11829
+ ]
11830
+ })),
11831
+ WeakMap: new Map(Object.entries({
11832
+ es2015: [
11833
+ "entries",
11834
+ "keys",
11835
+ "values"
11836
+ ]
11837
+ })),
11838
+ WeakSet: new Map(Object.entries({
11839
+ es2015: [
11840
+ "entries",
11841
+ "keys",
11842
+ "values"
11843
+ ]
11844
+ })),
11845
+ String: new Map(Object.entries({
11846
+ es2015: [
11847
+ "codePointAt",
11848
+ "includes",
11849
+ "endsWith",
11850
+ "normalize",
11851
+ "repeat",
11852
+ "startsWith",
11853
+ "anchor",
11854
+ "big",
11855
+ "blink",
11856
+ "bold",
11857
+ "fixed",
11858
+ "fontcolor",
11859
+ "fontsize",
11860
+ "italics",
11861
+ "link",
11862
+ "small",
11863
+ "strike",
11864
+ "sub",
11865
+ "sup"
11866
+ ],
11867
+ es2017: [
11868
+ "padStart",
11869
+ "padEnd"
11870
+ ],
11871
+ es2019: [
11872
+ "trimStart",
11873
+ "trimEnd",
11874
+ "trimLeft",
11875
+ "trimRight"
11876
+ ],
11877
+ es2020: [
11878
+ "matchAll"
11879
+ ],
11880
+ es2021: [
11881
+ "replaceAll"
11882
+ ],
11883
+ es2022: [
11884
+ "at"
11885
+ ]
11886
+ })),
11887
+ StringConstructor: new Map(Object.entries({
11888
+ es2015: [
11889
+ "fromCodePoint",
11890
+ "raw"
11891
+ ]
11892
+ })),
11893
+ DateTimeFormat: new Map(Object.entries({
11894
+ es2017: [
11895
+ "formatToParts"
11896
+ ]
11897
+ })),
11898
+ Promise: new Map(Object.entries({
11899
+ es2015: emptyArray,
11900
+ es2018: [
11901
+ "finally"
11902
+ ]
11903
+ })),
11904
+ RegExpMatchArray: new Map(Object.entries({
11905
+ es2018: [
11906
+ "groups"
11907
+ ]
11908
+ })),
11909
+ RegExpExecArray: new Map(Object.entries({
11910
+ es2018: [
11911
+ "groups"
11912
+ ]
11913
+ })),
11914
+ Intl: new Map(Object.entries({
11915
+ es2018: [
11916
+ "PluralRules"
11917
+ ]
11918
+ })),
11919
+ NumberFormat: new Map(Object.entries({
11920
+ es2018: [
11921
+ "formatToParts"
11922
+ ]
11923
+ })),
11924
+ SymbolConstructor: new Map(Object.entries({
11925
+ es2020: [
11926
+ "matchAll"
11927
+ ]
11928
+ })),
11929
+ DataView: new Map(Object.entries({
11930
+ es2020: [
11931
+ "setBigInt64",
11932
+ "setBigUint64",
11933
+ "getBigInt64",
11934
+ "getBigUint64"
11935
+ ]
11936
+ })),
11937
+ BigInt: new Map(Object.entries({
11938
+ es2020: emptyArray
11939
+ })),
11940
+ RelativeTimeFormat: new Map(Object.entries({
11941
+ es2020: [
11942
+ "format",
11943
+ "formatToParts",
11944
+ "resolvedOptions"
11945
+ ]
11946
+ })),
11947
+ Int8Array: new Map(Object.entries({
11948
+ es2022: [
11949
+ "at"
11950
+ ],
11951
+ es2023: [
11952
+ "findLastIndex",
11953
+ "findLast"
11954
+ ]
11955
+ })),
11956
+ Uint8Array: new Map(Object.entries({
11957
+ es2022: [
11958
+ "at"
11959
+ ],
11960
+ es2023: [
11961
+ "findLastIndex",
11962
+ "findLast"
11963
+ ]
11964
+ })),
11965
+ Uint8ClampedArray: new Map(Object.entries({
11966
+ es2022: [
11967
+ "at"
11968
+ ],
11969
+ es2023: [
11970
+ "findLastIndex",
11971
+ "findLast"
11972
+ ]
11973
+ })),
11974
+ Int16Array: new Map(Object.entries({
11975
+ es2022: [
11976
+ "at"
11977
+ ],
11978
+ es2023: [
11979
+ "findLastIndex",
11980
+ "findLast"
11981
+ ]
11982
+ })),
11983
+ Uint16Array: new Map(Object.entries({
11984
+ es2022: [
11985
+ "at"
11986
+ ],
11987
+ es2023: [
11988
+ "findLastIndex",
11989
+ "findLast"
11990
+ ]
11991
+ })),
11992
+ Int32Array: new Map(Object.entries({
11993
+ es2022: [
11994
+ "at"
11995
+ ],
11996
+ es2023: [
11997
+ "findLastIndex",
11998
+ "findLast"
11999
+ ]
12000
+ })),
12001
+ Uint32Array: new Map(Object.entries({
12002
+ es2022: [
12003
+ "at"
12004
+ ],
12005
+ es2023: [
12006
+ "findLastIndex",
12007
+ "findLast"
12008
+ ]
12009
+ })),
12010
+ Float32Array: new Map(Object.entries({
12011
+ es2022: [
12012
+ "at"
12013
+ ],
12014
+ es2023: [
12015
+ "findLastIndex",
12016
+ "findLast"
12017
+ ]
12018
+ })),
12019
+ Float64Array: new Map(Object.entries({
12020
+ es2022: [
12021
+ "at"
12022
+ ],
12023
+ es2023: [
12024
+ "findLastIndex",
12025
+ "findLast"
12026
+ ]
12027
+ })),
12028
+ BigInt64Array: new Map(Object.entries({
12029
+ es2020: emptyArray,
12030
+ es2022: [
12031
+ "at"
12032
+ ],
12033
+ es2023: [
12034
+ "findLastIndex",
12035
+ "findLast"
12036
+ ]
12037
+ })),
12038
+ BigUint64Array: new Map(Object.entries({
12039
+ es2020: emptyArray,
12040
+ es2022: [
12041
+ "at"
12042
+ ],
12043
+ es2023: [
12044
+ "findLastIndex",
12045
+ "findLast"
12046
+ ]
12047
+ })),
12048
+ Error: new Map(Object.entries({
12049
+ es2022: [
12050
+ "cause"
12051
+ ]
12052
+ }))
12053
+ }));
11748
12054
  }
11749
12055
  function getLiteralText(node, sourceFile, flags) {
11750
12056
  var _a2;
@@ -22501,14 +22807,114 @@ function createEmitHelperFactory(context) {
22501
22807
  factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name)
22502
22808
  ]);
22503
22809
  }
22810
+ function createESDecorateClassElementAccessGetMethod(elementName) {
22811
+ const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name);
22812
+ return factory2.createPropertyAssignment(
22813
+ "get",
22814
+ factory2.createArrowFunction(
22815
+ /*modifiers*/
22816
+ void 0,
22817
+ /*typeParameters*/
22818
+ void 0,
22819
+ [factory2.createParameterDeclaration(
22820
+ /*modifiers*/
22821
+ void 0,
22822
+ /*dotDotDotToken*/
22823
+ void 0,
22824
+ factory2.createIdentifier("obj")
22825
+ )],
22826
+ /*type*/
22827
+ void 0,
22828
+ /*equalsGreaterThanToken*/
22829
+ void 0,
22830
+ accessor
22831
+ )
22832
+ );
22833
+ }
22834
+ function createESDecorateClassElementAccessSetMethod(elementName) {
22835
+ const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name);
22836
+ return factory2.createPropertyAssignment(
22837
+ "set",
22838
+ factory2.createArrowFunction(
22839
+ /*modifiers*/
22840
+ void 0,
22841
+ /*typeParameters*/
22842
+ void 0,
22843
+ [
22844
+ factory2.createParameterDeclaration(
22845
+ /*modifiers*/
22846
+ void 0,
22847
+ /*dotDotDotToken*/
22848
+ void 0,
22849
+ factory2.createIdentifier("obj")
22850
+ ),
22851
+ factory2.createParameterDeclaration(
22852
+ /*modifiers*/
22853
+ void 0,
22854
+ /*dotDotDotToken*/
22855
+ void 0,
22856
+ factory2.createIdentifier("value")
22857
+ )
22858
+ ],
22859
+ /*type*/
22860
+ void 0,
22861
+ /*equalsGreaterThanToken*/
22862
+ void 0,
22863
+ factory2.createBlock([
22864
+ factory2.createExpressionStatement(
22865
+ factory2.createAssignment(
22866
+ accessor,
22867
+ factory2.createIdentifier("value")
22868
+ )
22869
+ )
22870
+ ])
22871
+ )
22872
+ );
22873
+ }
22874
+ function createESDecorateClassElementAccessHasMethod(elementName) {
22875
+ const propertyName = elementName.computed ? elementName.name : isIdentifier(elementName.name) ? factory2.createStringLiteralFromNode(elementName.name) : elementName.name;
22876
+ return factory2.createPropertyAssignment(
22877
+ "has",
22878
+ factory2.createArrowFunction(
22879
+ /*modifiers*/
22880
+ void 0,
22881
+ /*typeParameters*/
22882
+ void 0,
22883
+ [factory2.createParameterDeclaration(
22884
+ /*modifiers*/
22885
+ void 0,
22886
+ /*dotDotDotToken*/
22887
+ void 0,
22888
+ factory2.createIdentifier("obj")
22889
+ )],
22890
+ /*type*/
22891
+ void 0,
22892
+ /*equalsGreaterThanToken*/
22893
+ void 0,
22894
+ factory2.createBinaryExpression(
22895
+ propertyName,
22896
+ 101 /* InKeyword */,
22897
+ factory2.createIdentifier("obj")
22898
+ )
22899
+ )
22900
+ );
22901
+ }
22902
+ function createESDecorateClassElementAccessObject(name, access) {
22903
+ const properties = [];
22904
+ properties.push(createESDecorateClassElementAccessHasMethod(name));
22905
+ if (access.get)
22906
+ properties.push(createESDecorateClassElementAccessGetMethod(name));
22907
+ if (access.set)
22908
+ properties.push(createESDecorateClassElementAccessSetMethod(name));
22909
+ return factory2.createObjectLiteralExpression(properties);
22910
+ }
22504
22911
  function createESDecorateClassElementContextObject(contextIn) {
22505
22912
  return factory2.createObjectLiteralExpression([
22506
22913
  factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral(contextIn.kind)),
22507
22914
  factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name.computed ? contextIn.name.name : factory2.createStringLiteralFromNode(contextIn.name.name)),
22508
22915
  factory2.createPropertyAssignment(factory2.createIdentifier("static"), contextIn.static ? factory2.createTrue() : factory2.createFalse()),
22509
- factory2.createPropertyAssignment(factory2.createIdentifier("private"), contextIn.private ? factory2.createTrue() : factory2.createFalse())
22510
- // Disabled, pending resolution of https://github.com/tc39/proposal-decorators/issues/494
22511
- // factory.createPropertyAssignment(factory.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access))
22916
+ factory2.createPropertyAssignment(factory2.createIdentifier("private"), contextIn.private ? factory2.createTrue() : factory2.createFalse()),
22917
+ factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access))
22512
22918
  ]);
22513
22919
  }
22514
22920
  function createESDecorateContextObject(contextIn) {
@@ -28822,6 +29228,12 @@ var Parser;
28822
29228
  case 114 /* VoidKeyword */:
28823
29229
  return parseVoidExpression();
28824
29230
  case 29 /* LessThanToken */:
29231
+ if (languageVariant === 1 /* JSX */) {
29232
+ return parseJsxElementOrSelfClosingElementOrFragment(
29233
+ /*inExpressionContext*/
29234
+ true
29235
+ );
29236
+ }
28825
29237
  return parseTypeAssertion();
28826
29238
  case 133 /* AwaitKeyword */:
28827
29239
  if (isAwaitExpression2()) {
@@ -29193,6 +29605,7 @@ var Parser;
29193
29605
  return finishNode(factory2.createJsxJsxClosingFragment(), pos);
29194
29606
  }
29195
29607
  function parseTypeAssertion() {
29608
+ Debug.assert(scriptKind === 3 /* TS */, "Type assertions should never be parsed outside of TS; they should either be comparisons or JSX.");
29196
29609
  const pos = getNodePos();
29197
29610
  parseExpected(29 /* LessThanToken */);
29198
29611
  const type = parseType();
@@ -30543,17 +30956,25 @@ var Parser;
30543
30956
  function parseModifiers(allowDecorators, permitConstAsModifier, stopOnStartOfClassStaticBlock) {
30544
30957
  const pos = getNodePos();
30545
30958
  let list;
30546
- let modifier, hasSeenStaticModifier = false;
30959
+ let decorator, modifier, hasSeenStaticModifier = false, hasLeadingModifier = false, hasTrailingDecorator = false;
30960
+ if (allowDecorators && token() === 59 /* AtToken */) {
30961
+ while (decorator = tryParseDecorator()) {
30962
+ list = append(list, decorator);
30963
+ }
30964
+ }
30547
30965
  while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {
30548
30966
  if (modifier.kind === 124 /* StaticKeyword */)
30549
30967
  hasSeenStaticModifier = true;
30550
30968
  list = append(list, modifier);
30969
+ hasLeadingModifier = true;
30551
30970
  }
30552
- if (allowDecorators && token() === 59 /* AtToken */) {
30553
- let decorator;
30971
+ if (hasLeadingModifier && allowDecorators && token() === 59 /* AtToken */) {
30554
30972
  while (decorator = tryParseDecorator()) {
30555
30973
  list = append(list, decorator);
30974
+ hasTrailingDecorator = true;
30556
30975
  }
30976
+ }
30977
+ if (hasTrailingDecorator) {
30557
30978
  while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {
30558
30979
  if (modifier.kind === 124 /* StaticKeyword */)
30559
30980
  hasSeenStaticModifier = true;
@@ -42874,6 +43295,7 @@ function createTypeChecker(host) {
42874
43295
  let flowTypeCache;
42875
43296
  const contextualTypeNodes = [];
42876
43297
  const contextualTypes = [];
43298
+ const contextualIsCache = [];
42877
43299
  let contextualTypeCount = 0;
42878
43300
  const inferenceContextNodes = [];
42879
43301
  const inferenceContexts = [];
@@ -50044,6 +50466,8 @@ function createTypeChecker(host) {
50044
50466
  return !!target.baseTypesResolved;
50045
50467
  case 8 /* WriteType */:
50046
50468
  return !!getSymbolLinks(target).writeType;
50469
+ case 9 /* ParameterInitializerContainsUndefined */:
50470
+ return getNodeLinks(target).parameterInitializerContainsUndefined !== void 0;
50047
50471
  }
50048
50472
  return Debug.assertNever(propertyName);
50049
50473
  }
@@ -55310,7 +55734,7 @@ function createTypeChecker(host) {
55310
55734
  }
55311
55735
  }
55312
55736
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
55313
- const templates = filter(types, isPatternLiteralType);
55737
+ const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
55314
55738
  if (templates.length) {
55315
55739
  let i = types.length;
55316
55740
  while (i > 0) {
@@ -57835,7 +58259,12 @@ function createTypeChecker(host) {
57835
58259
  }
57836
58260
  }
57837
58261
  function checkExpressionForMutableLocationWithContextualType(next, sourcePropType) {
57838
- pushContextualType(next, sourcePropType);
58262
+ pushContextualType(
58263
+ next,
58264
+ sourcePropType,
58265
+ /*isCache*/
58266
+ false
58267
+ );
57839
58268
  const result = checkExpressionForMutableLocation(next, 1 /* Contextual */);
57840
58269
  popContextualType();
57841
58270
  return result;
@@ -58143,7 +58572,12 @@ function createTypeChecker(host) {
58143
58572
  if (isTupleLikeType(source)) {
58144
58573
  return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);
58145
58574
  }
58146
- pushContextualType(node, target);
58575
+ pushContextualType(
58576
+ node,
58577
+ target,
58578
+ /*isCache*/
58579
+ false
58580
+ );
58147
58581
  const tupleizedType = checkArrayLiteral(
58148
58582
  node,
58149
58583
  1 /* Contextual */,
@@ -61368,14 +61802,6 @@ function createTypeChecker(host) {
61368
61802
  const key = `B${getTypeId(type)}`;
61369
61803
  return (_a2 = getCachedType(key)) != null ? _a2 : setCachedType(key, mapType(type, getBaseTypeOfLiteralType));
61370
61804
  }
61371
- function getBaseTypeOfLiteralTypeForComparison(type) {
61372
- return type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) ? stringType : type.flags & 256 /* NumberLiteral */ ? numberType : type.flags & 2048 /* BigIntLiteral */ ? bigintType : type.flags & 512 /* BooleanLiteral */ ? booleanType : type.flags & 1024 /* EnumLiteral */ ? getBaseTypeOfEnumLiteralType(type) : type.flags & 1048576 /* Union */ ? getBaseTypeOfLiteralTypeUnionForComparison(type) : type;
61373
- }
61374
- function getBaseTypeOfLiteralTypeUnionForComparison(type) {
61375
- var _a2;
61376
- const key = `BC${getTypeId(type)}`;
61377
- return (_a2 = getCachedType(key)) != null ? _a2 : setCachedType(key, mapType(type, getBaseTypeOfLiteralTypeForComparison));
61378
- }
61379
61805
  function getWidenedLiteralType(type) {
61380
61806
  return type.flags & 1024 /* EnumLiteral */ && isFreshLiteralType(type) ? getBaseTypeOfEnumLiteralType(type) : type.flags & 128 /* StringLiteral */ && isFreshLiteralType(type) ? stringType : type.flags & 256 /* NumberLiteral */ && isFreshLiteralType(type) ? numberType : type.flags & 2048 /* BigIntLiteral */ && isFreshLiteralType(type) ? bigintType : type.flags & 512 /* BooleanLiteral */ && isFreshLiteralType(type) ? booleanType : type.flags & 1048576 /* Union */ ? mapType(type, getWidenedLiteralType) : type;
61381
61807
  }
@@ -64874,15 +65300,25 @@ function createTypeChecker(host) {
64874
65300
  function isConstVariable(symbol) {
64875
65301
  return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */) !== 0;
64876
65302
  }
64877
- function removeOptionalityFromDeclaredType(declaredType, declaration) {
64878
- if (pushTypeResolution(declaration.symbol, 2 /* DeclaredType */)) {
64879
- const annotationIncludesUndefined = strictNullChecks && declaration.kind === 166 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !(getTypeFacts(checkExpression(declaration.initializer)) & 16777216 /* IsUndefined */);
64880
- popTypeResolution();
64881
- return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType;
64882
- } else {
64883
- reportCircularityError(declaration.symbol);
64884
- return declaredType;
65303
+ function parameterInitializerContainsUndefined(declaration) {
65304
+ const links = getNodeLinks(declaration);
65305
+ if (links.parameterInitializerContainsUndefined === void 0) {
65306
+ if (!pushTypeResolution(declaration, 9 /* ParameterInitializerContainsUndefined */)) {
65307
+ reportCircularityError(declaration.symbol);
65308
+ return true;
65309
+ }
65310
+ const containsUndefined = !!(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */);
65311
+ if (!popTypeResolution()) {
65312
+ reportCircularityError(declaration.symbol);
65313
+ return true;
65314
+ }
65315
+ links.parameterInitializerContainsUndefined = containsUndefined;
64885
65316
  }
65317
+ return links.parameterInitializerContainsUndefined;
65318
+ }
65319
+ function removeOptionalityFromDeclaredType(declaredType, declaration) {
65320
+ const removeUndefined = strictNullChecks && declaration.kind === 166 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration);
65321
+ return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType;
64886
65322
  }
64887
65323
  function isConstraintPosition(type, node) {
64888
65324
  const parent = node.parent;
@@ -66200,11 +66636,13 @@ function createTypeChecker(host) {
66200
66636
  if (node.flags & 33554432 /* InWithStatement */) {
66201
66637
  return void 0;
66202
66638
  }
66203
- const index = findContextualNode(node);
66639
+ const index = findContextualNode(
66640
+ node,
66641
+ /*includeCaches*/
66642
+ !contextFlags
66643
+ );
66204
66644
  if (index >= 0) {
66205
- const cached = contextualTypes[index];
66206
- if (cached || !contextFlags)
66207
- return cached;
66645
+ return contextualTypes[index];
66208
66646
  }
66209
66647
  const { parent } = node;
66210
66648
  switch (parent.kind) {
@@ -66275,17 +66713,30 @@ function createTypeChecker(host) {
66275
66713
  }
66276
66714
  return void 0;
66277
66715
  }
66278
- function pushContextualType(node, type) {
66716
+ function pushCachedContextualType(node) {
66717
+ pushContextualType(
66718
+ node,
66719
+ getContextualType(
66720
+ node,
66721
+ /*contextFlags*/
66722
+ void 0
66723
+ ),
66724
+ /*isCache*/
66725
+ true
66726
+ );
66727
+ }
66728
+ function pushContextualType(node, type, isCache) {
66279
66729
  contextualTypeNodes[contextualTypeCount] = node;
66280
66730
  contextualTypes[contextualTypeCount] = type;
66731
+ contextualIsCache[contextualTypeCount] = isCache;
66281
66732
  contextualTypeCount++;
66282
66733
  }
66283
66734
  function popContextualType() {
66284
66735
  contextualTypeCount--;
66285
66736
  }
66286
- function findContextualNode(node) {
66737
+ function findContextualNode(node, includeCaches) {
66287
66738
  for (let i = contextualTypeCount - 1; i >= 0; i--) {
66288
- if (node === contextualTypeNodes[i]) {
66739
+ if (node === contextualTypeNodes[i] && (includeCaches || !contextualIsCache[i])) {
66289
66740
  return i;
66290
66741
  }
66291
66742
  }
@@ -66308,7 +66759,11 @@ function createTypeChecker(host) {
66308
66759
  }
66309
66760
  function getContextualJsxElementAttributesType(node, contextFlags) {
66310
66761
  if (isJsxOpeningElement(node) && contextFlags !== 4 /* Completions */) {
66311
- const index = findContextualNode(node.parent);
66762
+ const index = findContextualNode(
66763
+ node.parent,
66764
+ /*includeCaches*/
66765
+ !contextFlags
66766
+ );
66312
66767
  if (index >= 0) {
66313
66768
  return contextualTypes[index];
66314
66769
  }
@@ -66579,11 +67034,7 @@ function createTypeChecker(host) {
66579
67034
  const elementCount = elements.length;
66580
67035
  const elementTypes = [];
66581
67036
  const elementFlags = [];
66582
- pushContextualType(node, getContextualType(
66583
- node,
66584
- /*contextFlags*/
66585
- void 0
66586
- ));
67037
+ pushCachedContextualType(node);
66587
67038
  const inDestructuringPattern = isAssignmentTarget(node);
66588
67039
  const inConstContext = isConstContext(node);
66589
67040
  const contextualType = getApparentTypeOfContextualType(
@@ -66746,11 +67197,7 @@ function createTypeChecker(host) {
66746
67197
  let propertiesTable = createSymbolTable();
66747
67198
  let propertiesArray = [];
66748
67199
  let spread = emptyObjectType;
66749
- pushContextualType(node, getContextualType(
66750
- node,
66751
- /*contextFlags*/
66752
- void 0
66753
- ));
67200
+ pushCachedContextualType(node);
66754
67201
  const contextualType = getApparentTypeOfContextualType(
66755
67202
  node,
66756
67203
  /*contextFlags*/
@@ -68090,26 +68537,22 @@ function createTypeChecker(host) {
68090
68537
  function getSuggestedLibForNonExistentName(name) {
68091
68538
  const missingName = diagnosticName(name);
68092
68539
  const allFeatures = getScriptTargetFeatures();
68093
- const libTargets = getOwnKeys(allFeatures);
68094
- for (const libTarget of libTargets) {
68095
- const containingTypes = getOwnKeys(allFeatures[libTarget]);
68096
- if (containingTypes !== void 0 && contains(containingTypes, missingName)) {
68097
- return libTarget;
68098
- }
68099
- }
68540
+ const typeFeatures = allFeatures.get(missingName);
68541
+ return typeFeatures && firstIterator(typeFeatures.keys());
68100
68542
  }
68101
68543
  function getSuggestedLibForNonExistentProperty(missingProperty, containingType) {
68102
68544
  const container = getApparentType(containingType).symbol;
68103
68545
  if (!container) {
68104
68546
  return void 0;
68105
68547
  }
68548
+ const containingTypeName = symbolName(container);
68106
68549
  const allFeatures = getScriptTargetFeatures();
68107
- const libTargets = getOwnKeys(allFeatures);
68108
- for (const libTarget of libTargets) {
68109
- const featuresOfLib = allFeatures[libTarget];
68110
- const featuresOfContainingType = featuresOfLib[symbolName(container)];
68111
- if (featuresOfContainingType !== void 0 && contains(featuresOfContainingType, missingProperty)) {
68112
- return libTarget;
68550
+ const typeFeatures = allFeatures.get(containingTypeName);
68551
+ if (typeFeatures) {
68552
+ for (const [libTarget, featuresOfType] of typeFeatures) {
68553
+ if (contains(featuresOfType, missingProperty)) {
68554
+ return libTarget;
68555
+ }
68113
68556
  }
68114
68557
  }
68115
68558
  }
@@ -72413,8 +72856,8 @@ function createTypeChecker(host) {
72413
72856
  case 32 /* LessThanEqualsToken */:
72414
72857
  case 33 /* GreaterThanEqualsToken */:
72415
72858
  if (checkForDisallowedESSymbolOperand(operator)) {
72416
- leftType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(leftType, left));
72417
- rightType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(rightType, right));
72859
+ leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left));
72860
+ rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right));
72418
72861
  reportOperatorErrorUnless((left2, right2) => {
72419
72862
  if (isTypeAny(left2) || isTypeAny(right2)) {
72420
72863
  return true;
@@ -72765,14 +73208,19 @@ function createTypeChecker(host) {
72765
73208
  return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */));
72766
73209
  }
72767
73210
  function getContextNode(node) {
72768
- if (node.kind === 289 /* JsxAttributes */ && !isJsxSelfClosingElement(node.parent)) {
73211
+ if (isJsxAttributes(node) && !isJsxSelfClosingElement(node.parent)) {
72769
73212
  return node.parent.parent;
72770
73213
  }
72771
73214
  return node;
72772
73215
  }
72773
73216
  function checkExpressionWithContextualType(node, contextualType, inferenceContext, checkMode) {
72774
73217
  const contextNode = getContextNode(node);
72775
- pushContextualType(contextNode, contextualType);
73218
+ pushContextualType(
73219
+ contextNode,
73220
+ contextualType,
73221
+ /*isCache*/
73222
+ false
73223
+ );
72776
73224
  pushInferenceContext(contextNode, inferenceContext);
72777
73225
  const type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0));
72778
73226
  if (inferenceContext && inferenceContext.intraExpressionInferenceSites) {
@@ -73113,7 +73561,12 @@ function createTypeChecker(host) {
73113
73561
  if (links.contextFreeType) {
73114
73562
  return links.contextFreeType;
73115
73563
  }
73116
- pushContextualType(node, anyType);
73564
+ pushContextualType(
73565
+ node,
73566
+ anyType,
73567
+ /*isCache*/
73568
+ false
73569
+ );
73117
73570
  const type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */);
73118
73571
  popContextualType();
73119
73572
  return type;
@@ -80567,6 +81020,7 @@ function createTypeChecker(host) {
80567
81020
  let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator;
80568
81021
  let flags = 0 /* None */;
80569
81022
  let sawExportBeforeDecorators = false;
81023
+ let hasLeadingDecorators = false;
80570
81024
  for (const modifier of node.modifiers) {
80571
81025
  if (isDecorator(modifier)) {
80572
81026
  if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) {
@@ -80584,8 +81038,22 @@ function createTypeChecker(host) {
80584
81038
  if (flags & ~(1025 /* ExportDefault */ | 131072 /* Decorator */)) {
80585
81039
  return grammarErrorOnNode(modifier, Diagnostics.Decorators_are_not_valid_here);
80586
81040
  }
81041
+ if (hasLeadingDecorators && flags & 126975 /* Modifier */) {
81042
+ Debug.assertIsDefined(firstDecorator);
81043
+ const sourceFile = getSourceFileOfNode(modifier);
81044
+ if (!hasParseDiagnostics(sourceFile)) {
81045
+ addRelatedInfo(
81046
+ error(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),
81047
+ createDiagnosticForNode(firstDecorator, Diagnostics.Decorator_used_before_export_here)
81048
+ );
81049
+ return true;
81050
+ }
81051
+ return false;
81052
+ }
80587
81053
  flags |= 131072 /* Decorator */;
80588
- if (flags & 1 /* Export */) {
81054
+ if (!(flags & 126975 /* Modifier */)) {
81055
+ hasLeadingDecorators = true;
81056
+ } else if (flags & 1 /* Export */) {
80589
81057
  sawExportBeforeDecorators = true;
80590
81058
  }
80591
81059
  firstDecorator != null ? firstDecorator : firstDecorator = modifier;
@@ -113512,11 +113980,19 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
113512
113980
  diagnostics.push(createDiagnosticForNode2(parent.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));
113513
113981
  } else if (isClassDeclaration(parent)) {
113514
113982
  const exportIndex = findIndex(parent.modifiers, isExportModifier);
113515
- const defaultIndex = findIndex(parent.modifiers, isDefaultModifier);
113516
- if (exportIndex >= 0 && decoratorIndex < exportIndex) {
113517
- diagnostics.push(createDiagnosticForNode2(parent.modifiers[decoratorIndex], Diagnostics.Decorators_must_come_after_export_or_export_default_in_JavaScript_files));
113518
- } else if (defaultIndex >= 0 && decoratorIndex < defaultIndex) {
113519
- diagnostics.push(createDiagnosticForNode2(parent.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));
113983
+ if (exportIndex >= 0) {
113984
+ const defaultIndex = findIndex(parent.modifiers, isDefaultModifier);
113985
+ if (decoratorIndex > exportIndex && defaultIndex >= 0 && decoratorIndex < defaultIndex) {
113986
+ diagnostics.push(createDiagnosticForNode2(parent.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));
113987
+ } else if (exportIndex >= 0 && decoratorIndex < exportIndex) {
113988
+ const trailingDecoratorIndex = findIndex(parent.modifiers, isDecorator, exportIndex);
113989
+ if (trailingDecoratorIndex >= 0) {
113990
+ diagnostics.push(addRelatedInfo(
113991
+ createDiagnosticForNode2(parent.modifiers[trailingDecoratorIndex], Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),
113992
+ createDiagnosticForNode2(parent.modifiers[decoratorIndex], Diagnostics.Decorator_used_before_export_here)
113993
+ ));
113994
+ }
113995
+ }
113520
113996
  }
113521
113997
  }
113522
113998
  }