@typescript-deploys/pr-build 5.4.0-pr-57008-7 → 5.4.0-pr-48838-21

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
@@ -9107,20 +9107,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9107
9107
  }
9108
9108
  const ch = codePointAt(text, pos);
9109
9109
  if (pos === 0) {
9110
- let isBinary = ch === 65533 /* replacementCharacter */;
9111
- if (ch === 71 /* G */) {
9112
- const end2 = Math.min(text.length, pos + 188);
9113
- let i = pos + charSize(ch);
9114
- while (i < end2) {
9115
- const ch2 = codePointAt(text, i);
9116
- if (codePointAt(text, i) === 65533 /* replacementCharacter */) {
9117
- isBinary = true;
9118
- break;
9119
- }
9120
- i += charSize(ch2);
9121
- }
9122
- }
9123
- if (isBinary) {
9110
+ if (ch === 65533 /* replacementCharacter */) {
9124
9111
  error(Diagnostics.File_appears_to_be_binary);
9125
9112
  pos = end;
9126
9113
  return token = 8 /* NonTextFileMarkerTrivia */;
@@ -68858,7 +68845,7 @@ function createTypeChecker(host) {
68858
68845
  function instantiateContextualType(contextualType, node, contextFlags) {
68859
68846
  if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {
68860
68847
  const inferenceContext = getInferenceContext(node);
68861
- if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
68848
+ if (inferenceContext && (contextFlags & 1 /* Signature */ || maybeTypeOfKind(contextualType, 25165824 /* Simplifiable */)) && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
68862
68849
  return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
68863
68850
  }
68864
68851
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
package/lib/tsserver.js CHANGED
@@ -12695,20 +12695,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12695
12695
  }
12696
12696
  const ch = codePointAt(text, pos);
12697
12697
  if (pos === 0) {
12698
- let isBinary = ch === 65533 /* replacementCharacter */;
12699
- if (ch === 71 /* G */) {
12700
- const end2 = Math.min(text.length, pos + 188);
12701
- let i = pos + charSize(ch);
12702
- while (i < end2) {
12703
- const ch2 = codePointAt(text, i);
12704
- if (codePointAt(text, i) === 65533 /* replacementCharacter */) {
12705
- isBinary = true;
12706
- break;
12707
- }
12708
- i += charSize(ch2);
12709
- }
12710
- }
12711
- if (isBinary) {
12698
+ if (ch === 65533 /* replacementCharacter */) {
12712
12699
  error2(Diagnostics.File_appears_to_be_binary);
12713
12700
  pos = end;
12714
12701
  return token = 8 /* NonTextFileMarkerTrivia */;
@@ -73596,7 +73583,7 @@ function createTypeChecker(host) {
73596
73583
  function instantiateContextualType(contextualType, node, contextFlags) {
73597
73584
  if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {
73598
73585
  const inferenceContext = getInferenceContext(node);
73599
- if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
73586
+ if (inferenceContext && (contextFlags & 1 /* Signature */ || maybeTypeOfKind(contextualType, 25165824 /* Simplifiable */)) && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
73600
73587
  return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
73601
73588
  }
73602
73589
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
package/lib/typescript.js CHANGED
@@ -10305,20 +10305,7 @@ ${lanes.join("\n")}
10305
10305
  }
10306
10306
  const ch = codePointAt(text, pos);
10307
10307
  if (pos === 0) {
10308
- let isBinary = ch === 65533 /* replacementCharacter */;
10309
- if (ch === 71 /* G */) {
10310
- const end2 = Math.min(text.length, pos + 188);
10311
- let i = pos + charSize(ch);
10312
- while (i < end2) {
10313
- const ch2 = codePointAt(text, i);
10314
- if (codePointAt(text, i) === 65533 /* replacementCharacter */) {
10315
- isBinary = true;
10316
- break;
10317
- }
10318
- i += charSize(ch2);
10319
- }
10320
- }
10321
- if (isBinary) {
10308
+ if (ch === 65533 /* replacementCharacter */) {
10322
10309
  error2(Diagnostics.File_appears_to_be_binary);
10323
10310
  pos = end;
10324
10311
  return token = 8 /* NonTextFileMarkerTrivia */;
@@ -71351,7 +71338,7 @@ ${lanes.join("\n")}
71351
71338
  function instantiateContextualType(contextualType, node, contextFlags) {
71352
71339
  if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {
71353
71340
  const inferenceContext = getInferenceContext(node);
71354
- if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
71341
+ if (inferenceContext && (contextFlags & 1 /* Signature */ || maybeTypeOfKind(contextualType, 25165824 /* Simplifiable */)) && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
71355
71342
  return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
71356
71343
  }
71357
71344
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
@@ -8427,20 +8427,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8427
8427
  }
8428
8428
  const ch = codePointAt(text, pos);
8429
8429
  if (pos === 0) {
8430
- let isBinary = ch === 65533 /* replacementCharacter */;
8431
- if (ch === 71 /* G */) {
8432
- const end2 = Math.min(text.length, pos + 188);
8433
- let i = pos + charSize(ch);
8434
- while (i < end2) {
8435
- const ch2 = codePointAt(text, i);
8436
- if (codePointAt(text, i) === 65533 /* replacementCharacter */) {
8437
- isBinary = true;
8438
- break;
8439
- }
8440
- i += charSize(ch2);
8441
- }
8442
- }
8443
- if (isBinary) {
8430
+ if (ch === 65533 /* replacementCharacter */) {
8444
8431
  error(Diagnostics.File_appears_to_be_binary);
8445
8432
  pos = end;
8446
8433
  return token = 8 /* NonTextFileMarkerTrivia */;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.4.0-pr-57008-7",
5
+ "version": "5.4.0-pr-48838-21",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "20.1.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "9e96ea21415bfb8f99bcee14acd21a8d97923585"
117
+ "gitHead": "582dd51fd6231fdee0cbd5e79ff9bc052f88b16d"
118
118
  }