| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
|
||
| // Repro from #46045 | ||
|
|
||
| export type Action = |
There was a problem hiding this comment.
We probably want to remove the export from this and the other line to keep around the declaration emit in the test.
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, for sure.
Sorry, something went wrong.
| const targetEnd = target.texts[target.texts.length - 1]; | ||
| const startLen = Math.min(sourceStart.length, targetStart.length); | ||
| const endLen = Math.min(sourceEnd.length, targetEnd.length); | ||
| return sourceStart.slice(0, startLen) !== targetStart.slice(0, startLen) || |
There was a problem hiding this comment.
Won't this flag foo-${boolean} and foo-${number} as possibly related? We still need to make sure the holes relate when this returns True, no?
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, it'll flag them as possibly related. Or, rather, not flag them as definitely unrelated. We could potentially check the placeholders that immediately follow identical prefix texts or immediately precede identical suffix texts, but honestly there's very little gained from it. In fact, probably only the boolean vs. number disqualification. I think what is here already is sufficient, and it impacts whether we flag operands as non-overlapping, which isn't super critical to get 100% right.
Sorry, something went wrong.
|
|
||
| // Repro from #46125 | ||
|
|
||
| function ff1<T extends string>(x: `foo-${string}`, y: `${string}-bar`, z: `baz-${string}`) { |
There was a problem hiding this comment.
Before I forget, can we also get a copy of this test with a signature like
function ff1<T extends string>(x: `foo-${T}`, y: `${T}-bar`, z: `baz-${T}`) {? I figure it should behave the same, but, y'know, coverage. Maybe it can just be more cases on this signature, since it already has a generic parameter for some reason~
Sorry, something went wrong.
There was a problem hiding this comment.
Will do.
Sorry, something went wrong.
|
TypeScript Bot (@typescript-bot) test this |
Sorry, something went wrong.
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the perf test suite on this PR at e1907a2. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the extended test suite on this PR at e1907a2. You can monitor the build here. |
Sorry, something went wrong.
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the parallelized community code test suite on this PR at e1907a2. You can monitor the build here. |
Sorry, something went wrong.
|
Daniel Rosenwasser (@DanielRosenwasser) Comparison Report - main..46137
System
Hosts
Scenarios
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sorry, something went wrong.
|
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
Sorry, something went wrong.
|
Tests look clean, perf is slightly improved if anything. I think this one is good to go! |
Sorry, something went wrong.
|
Great! But will buitin string methods support this? For now, I'm forced to use these standalone functions: const startsWith = <T extends string>(str: string, search: T): str is `${T}${string}` => str.startsWith(search);
const endsWith = <T extends string>(str: string, search: T): str is `${string}${T}` => str.endsWith(search);
const includes = <T extends string>(str: string, search: T): str is `${string}${T}${string}` => str.includes(search); |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #46045.
Fixes #46125.