Content-Length: 331598 | pFad | http://github.com/microsoft/TypeScript/pull/45976/commits/e949c855e8dfde81ff57b5a60e70a52085cd9d2c

7A Create type aliases for unresolved type symbols by ahejlsberg · Pull Request #45976 · microsoft/TypeScript · GitHub
Skip to content

Create type aliases for unresolved type symbols #45976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into fix45893
# Conflicts:
#	src/compiler/checker.ts
#	tests/cases/fourslash/findReferencesJSXTagName.ts
#	tests/cases/fourslash/tsxFindAllReferences10.ts
  • Loading branch information
ahejlsberg committed Sep 23, 2021
commit e949c855e8dfde81ff57b5a60e70a52085cd9d2c
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31942,7 +31942,7 @@ namespace ts {
}

const operandType = checkExpression(node.expression);
const awaitedType = checkAwaitedType(operandType, node, Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
const awaitedType = checkAwaitedType(operandType, /*withAlias*/ true, node, Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
if (awaitedType === operandType && !isErrorType(awaitedType) && !(operandType.flags & TypeFlags.AnyOrUnknown)) {
addErrorOrSuggestion(/*isError*/ false, createDiagnosticForNode(node, Diagnostics.await_has_no_effect_on_the_type_of_this_expression));
}
Expand Down
6 changes: 1 addition & 5 deletions tests/cases/fourslash/findReferencesJSXTagName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@
//github.com//export const /*2*/SubmissionComp = (submission: SubmissionProps) =>
//github.com// <div style={{ fontFamily: "sans-serif" }}></div>;

const [r0Def, r0, r1Def, r1, r2Def, r2] = test.ranges();
const imports = { definition: "(alias) const SubmissionComp: (submission: SubmissionProps) => div\nimport SubmissionComp", ranges: [r0, r1] };
const def = { definition: "const SubmissionComp: (submission: SubmissionProps) => div", ranges: [r2] };
verify.referenceGroups([r0, r1], [imports, def]);
verify.referenceGroups(r2, [def, imports]);
verify.baselineFindAllReferences('1', '2')
2 changes: 1 addition & 1 deletion tests/cases/fourslash/tsxFindAllReferences10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
//github.com// let opt = <MainButton goTo="goTo" />;
//github.com// let opt = <MainButton wrong />;

verify.singleReferenceGroup("(method) ButtonProps.onClick(event?: React.MouseEvent<HTMLButtonElement>): void", "onClick");
verify.baselineFindAllReferences('1')
You are viewing a condensed version of this merge commit. You can view the full changes here.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/microsoft/TypeScript/pull/45976/commits/e949c855e8dfde81ff57b5a60e70a52085cd9d2c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy