Skip to content

Improve inference for a tuple target with 2 middle variadic elements and implied arity for the latter#56976

Closed
Andarist wants to merge 3 commits intomicrosoft:mainfrom
Andarist:improve-inference-2-variadic-elements
Closed

Improve inference for a tuple target with 2 middle variadic elements and implied arity for the latter#56976
Andarist wants to merge 3 commits intomicrosoft:mainfrom
Andarist:improve-inference-2-variadic-elements

Conversation

@Andarist
Copy link
Copy Markdown
Contributor

@Andarist Andarist commented Jan 8, 2024

fixes #56970

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jan 8, 2024
inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]);
inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);
}
else if ((targetInfo = getInferenceInfoForType(elementTypes[startLength + 1]))?.impliedArity !== undefined) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: I might have to limit this to fixed-sized sources or something. This requires more test cases to exercise the improved behavior. It would help me slightly if I'd have a playground with this build - @jakebailey would you mind creating one? :)

…ariadic-elements

# Conflicts:
#	tests/baselines/reference/variadicTuples3.symbols
#	tests/baselines/reference/variadicTuples3.types
#	tests/cases/conformance/types/tuple/variadicTuples3.ts
@typescript-bot typescript-bot added For Backlog Bug PRs that fix a backlog bug and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 8, 2025
@jakebailey
Copy link
Copy Markdown
Member

@typescript-bot pack this

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Oct 8, 2025

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Oct 8, 2025

Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/166267/artifacts?artifactName=tgz&fileId=311108D32D3890BA7ABED555C9656D49559FB88E725DE49F2D1779B6F6931E6B02&fileName=/typescript-6.0.0-insiders.20251008.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@6.0.0-pr-56976-2".;

@typescript-bot
Copy link
Copy Markdown
Collaborator

With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies).

Next steps for PRs:

  • For crash bugfixes or language service improvements, PRs are currently accepted at the typescript-go repo
  • Changes to type system behavior should wait until after 7.0, at which point mainline TypeScript development will resume in this repository with the Go codebase
  • Library file updates (lib.d.ts etc) continue to live in this repo or the DOM Generator repo as appropriate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error in Variadic Tuple Types , if i reverse the partial function

4 participants