diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 081e59860517f..58656b017dbb1 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -3867,7 +3867,7 @@ ${code} } // put ranges in the correct order - localRanges = localRanges.sort((a, b) => a.pos < b.pos ? -1 : 1); + localRanges = localRanges.sort((a, b) => a.pos < b.pos ? -1 : a.pos === b.pos && a.end > b.end ? -1 : 1); localRanges.forEach((r) => { ranges.push(r); }); return { diff --git a/tests/cases/fourslash/generateTypes_baselines.ts b/tests/cases/fourslash/generateTypes_baselines.ts index a8363b302837a..9508f83d31f40 100644 --- a/tests/cases/fourslash/generateTypes_baselines.ts +++ b/tests/cases/fourslash/generateTypes_baselines.ts @@ -6,14 +6,14 @@ verify.generateTypes( // would like to test against the real "global" but that may vary between node versions. { value: { - Array: ignore(Array, ["values"]), + Array: ignore(Array, ["values", "flat", "flatMap"]), Boolean, Date, Math, Number, RegExp, String: ignore(String, ["padStart", "padEnd", "trimStart", "trimEnd"]), - Symbol: ignore(Symbol, ["asyncIterator"]), + Symbol: ignore(Symbol, ["asyncIterator", "description"]), }, outputBaseline: "global", },