forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Merge upstream changes #1
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. `T[K]` now correctly produces `number` when `K extends string, T extends Record<K, number>`. 2. `T[K]` no longer allows any type to be assigned to it when `T extends object, K extends keyof T`. Previously both of these cases failed in getConstraintOfIndexedAccessType because both bases followed `K`'s base constraint to `string` and then incorrectly produced `any` for types (like `object`) with no string index signature. In (1), this produced an error in checkBinaryLikeExpression`. In (2), this failed to produce an error in `checkTypeRelatedTo`.
#16364) * Treat explicit imports from `node_modules` as external library imports * Update baselines
…cess Fix getConstraintOfIndexedAccess
…ntOfIndexedAccess Revert "Fix getConstraintOfIndexedAccess"
* Deduplicate inputfiles before running RWC tests We deduplicate in the compiler, but we don't in the harness - this causes tests where the same file is listed multiple times in the arguments to not have the expected errors written, because we write out the same file multiple times when we should not. * Don't completely omit both copied of duplicates * Remove trailing whitespace * Maintain list order while filtering duplicates * Merge adjacent loops
multi-line comment formatting fix and handler
Correct outlining spans for object and array literals in array
* Fix stack overflow when resolving default construct signatures * No need for || emptyArray
fix #16567: better coloring on light theme terminal
…-names Object literals computed property names allow literal-typed expressions
…arameter Disable isStartOfType's lookahead when called from isStartOfParameter
Don't get typings for projects with disabled language services
Optimize array operations to reduce memory footprint
* Ensure that emitter calls calbacks * Move new parameter to end of parameters * Fix for ConditionalExpression * Make suggested changes to emitter * Fix parameter ordering * Respond to minor comments * Remove potentially expensive assertion * More emitter cleanup
…oadModuleFromFile` case (#18185) * When loading a module from node_modules, get packageId even in the `loadModuleFromFile` case * Support packageId for <reference types> too
When the return type is void, there's no `returnValueProperty`, but that doesn't mean we don't need a `return` at the call site. Fixes #18140.
…18316) * Explicitly avoid canonicalizing paths during configuration handling * Extract usage of identity in commandLineParser into single function, use identity in checker
1. It was looking at the parent which wasn't guaranteed to be in the extracted range. 2. It was checking direct, rather than indirect containment - apparently to avoid applying the rules to certain expressions (which can't contain jumps anyway, unless they're in anonymous functions, in which case they're fine). Fixes #18144
…tern" This reverts commit 57906fe.
Handle the combination of a write and a void return
Also remove JSDocTypeLiteral.jsdocTypeTag, which made no sense since it was only useful when storing information for its parent `@typedef` tag.
…fTag Fix forEachChild jsdoc `@typedef` tag
Simplify and correct PermittedJumps computation
* Care about esnext where we look for es2015 * Update diagnostic message to be more agnostic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.