Skip to content

Commit

Permalink
Merge pull request #493 from microsoft/main
Browse files Browse the repository at this point in the history
Create a new pull request by comparing changes across two branches
  • Loading branch information
GulajavaMinistudio authored Oct 17, 2023
2 parents 7b247c1 + 1f759b8 commit 5de9f5d
Show file tree
Hide file tree
Showing 750 changed files with 111,136 additions and 1,321 deletions.
532 changes: 266 additions & 266 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/compiler/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export function getBuilderFileEmit(options: CompilerOptions) {
}

/**
* Determing what all is pending to be emitted based on previous options or previous file emit flags
* Determining what all is pending to be emitted based on previous options or previous file emit flags
*
* @internal
*/
Expand Down Expand Up @@ -1588,7 +1588,7 @@ export function createBuilderProgram(kind: BuilderProgramKind, { newProgram, hos
info.signature = signature;
}
else {
// These are directly commited
// These are directly committed
info.signature = signature;
state.oldExportedModulesMap?.clear();
}
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/builderState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ export interface BuilderState {
*/
hasCalledUpdateShapeSignature?: Set<Path>;
/**
* Stores signatures before before the update till affected file is commited
* Stores signatures before before the update till affected file is committed
*/
oldSignatures?: Map<Path, string | false>;
/**
* Stores exportedModulesMap before the update till affected file is commited
* Stores exportedModulesMap before the update till affected file is committed
*/
oldExportedModulesMap?: Map<Path, ReadonlySet<Path> | false>;
/**
Expand Down
9 changes: 6 additions & 3 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29523,8 +29523,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the
// contextual type for 'this' is 'obj'.
const parent = walkUpParenthesizedExpressions(func.parent);
if (parent.kind === SyntaxKind.BinaryExpression && (parent as BinaryExpression).operatorToken.kind === SyntaxKind.EqualsToken) {
const target = (parent as BinaryExpression).left;
if (isAssignmentExpression(parent)) {
const target = parent.left;
if (isAccessExpression(target)) {
const { expression } = target;
// Don't contextually type `this` as `exports` in `exports.Point = function(x, y) { this.x = x; this.y = y; }`
Expand Down Expand Up @@ -37085,7 +37085,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}

function checkVoidExpression(node: VoidExpression): Type {
checkExpression(node.expression);
checkNodeDeferred(node);
return undefinedWideningType;
}

Expand Down Expand Up @@ -46198,6 +46198,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
case SyntaxKind.ParenthesizedExpression:
checkAssertionDeferred(node as AssertionExpression | JSDocTypeAssertion);
break;
case SyntaxKind.VoidExpression:
checkExpression((node as VoidExpression).expression);
break;
case SyntaxKind.BinaryExpression:
if (isInstanceOfExpression(node)) {
resolveUntypedCall(node);
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/commandLineParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
affectsEmit: true,
affectsBuildInfo: true,
affectsDeclarationPath: true,
isFilePath: false, // This is intentionally broken to support compatability with existing tsconfig files
isFilePath: false, // This is intentionally broken to support compatibility with existing tsconfig files
// for correct behaviour, please use outFile
category: Diagnostics.Backwards_Compatibility,
paramType: Diagnostics.FILE,
Expand Down Expand Up @@ -2384,7 +2384,7 @@ export function convertToJson(
// Currently having element option declaration in the tsconfig with type "object"
// determines if it needs onSetValidOptionKeyValueInParent callback or not
// At moment there are only "compilerOptions", "typeAcquisition" and "typingOptions"
// that satifies it and need it to modify options set in them (for normalizing file paths)
// that satisfies it and need it to modify options set in them (for normalizing file paths)
// vs what we set in the json
// If need arises, we can modify this interface and callbacks as needed
return convertObjectLiteralExpressionToJson(objectLiteralExpression, option as TsConfigOnlyOption);
Expand Down
5 changes: 2 additions & 3 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4334,7 +4334,7 @@ export function getNextJSDocCommentLocation(node: Node) {
parent.kind === SyntaxKind.ExpressionStatement && node.kind === SyntaxKind.PropertyAccessExpression ||
parent.kind === SyntaxKind.ReturnStatement ||
getNestedModuleDeclaration(parent) ||
isBinaryExpression(node) && node.operatorToken.kind === SyntaxKind.EqualsToken
isAssignmentExpression(node)
) {
return parent;
}
Expand All @@ -4346,8 +4346,7 @@ export function getNextJSDocCommentLocation(node: Node) {
// var x = function(name) { return name.length; }
else if (
parent.parent &&
(getSingleVariableOfVariableStatement(parent.parent) === node ||
isBinaryExpression(parent) && parent.operatorToken.kind === SyntaxKind.EqualsToken)
(getSingleVariableOfVariableStatement(parent.parent) === node || isAssignmentExpression(parent))
) {
return parent.parent;
}
Expand Down
Loading

0 comments on commit 5de9f5d

Please sign in to comment.