Skip to content

Update submodule with type ordering changes #1236

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 1 commit into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -141,23 +141,4 @@
+>< K extends KeyOfOriginal, N extends NestedKeyOfOriginalFor<K>>( original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N): [Original[K][N], MappedFromOriginal[K][N]] => { return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]];} : <K extends keyof Original, N extends keyof Original[K]>(original: Original, mappedFromOriginal: SameKeys<Original>, key: K, nestedKey: N) => [Original[K][N], SameKeys<Original>[K][N]]

K extends KeyOfOriginal,
N extends NestedKeyOfOriginalFor<K>
@@= skipped -63, +63 lines =@@
>key : T

const assertedCheck = userValue ? userValue! : defaultValue;
->assertedCheck : NonNullable<Partial<Config>[T]>
->userValue ? userValue! : defaultValue : NonNullable<Partial<Config>[T]>
+>assertedCheck : Config[T]
+>userValue ? userValue! : defaultValue : Config[T]
>userValue : Partial<Config>[T]
>userValue! : NonNullable<Partial<Config>[T]>
>userValue : NonNullable<Partial<Config>[T]>
>defaultValue : Config[T]

return assertedCheck;
->assertedCheck : NonNullable<Partial<Config>[T]>
+>assertedCheck : Config[T]
}

// repro from #47523
N extends NestedKeyOfOriginalFor<K>
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,4 @@
+>obj4 : { name: string; } | T & { prop: boolean; }
>prop : boolean
>name : string
>{ name: "test", prop: true } : { name: string; prop: boolean; }
@@= skipped -11, +11 lines =@@

// No excess property checks when union includes 'object' type
const obj5: object | { x: string } = { z: 'abc' }
->obj5 : { x: string; } | object
+>obj5 : object | { x: string; }
>x : string
>{ z: 'abc' } : { z: string; }
>z : string
>{ name: "test", prop: true } : { name: string; prop: boolean; }
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@

function foo(instance: Function | object) {
->foo : (instance: Function | object) => number
->instance : Function | object
+>foo : (instance: object | Function) => number
+>instance : object | Function
>instance : object | Function

if (typeof instance === 'function') {
>typeof instance === 'function' : boolean
>typeof instance : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
->instance : Function | object
+>instance : object | Function
>'function' : "function"

if (instance.prototype == null || instance.prototype.constructor == null) {
if (typeof instance === 'function') {
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
>callable : Function | (() => object)
}

function f2(fetcherParams: object | (() => object)) {
>f2 : (fetcherParams: object | (() => object)) => void
->fetcherParams : (() => object) | object
+>fetcherParams : object | (() => object)
@@= skipped -10, +10 lines =@@
>fetcherParams : object | (() => object)

const data = typeof fetcherParams === 'function'
->data : error
Expand All @@ -32,8 +30,7 @@
+>typeof fetcherParams === 'function' ? fetcherParams() : fetcherParams : any
>typeof fetcherParams === 'function' : boolean
>typeof fetcherParams : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
->fetcherParams : (() => object) | object
+>fetcherParams : object | (() => object)
>fetcherParams : object | (() => object)
>'function' : "function"

? fetcherParams()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

declare function test(fn: Options): void;
->test : { <Data, Props>(fn: ThisTypedOptions<Data, Props>): void; (fn: Options): void; }
->fn : Options<((this: Instance) => object) | object, PropsDefinition<Record<string, any>>>
+>test : { <Data, Props>(fn: ThisTypedOptions<Data, Props>): void; (fn: Options<object | ((this: Instance) => object), PropsDefinition<Record<string, any>>>): void; }
+>fn : Options<object | ((this: Instance) => object), PropsDefinition<Record<string, any>>>
>fn : Options<object | ((this: Instance) => object), PropsDefinition<Record<string, any>>>

test({
>test({ props: { foo: '' }, data(): { bar: boolean } { return { bar: true } }, watch: { foo(newVal: string, oldVal: string): void { this.bar = false } }}) : void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@
>predicate : (v: T) => boolean
>v : T

@@= skipped -29, +29 lines =@@

declare function toString1(value: object | Function): string ;
>toString1 : (value: object | Function) => string
->value : Function | object
+>value : object | Function

declare function toString2(value: Function): string ;
>toString2 : (value: Function) => string
@@= skipped -173, +173 lines =@@
@@= skipped -202, +202 lines =@@
// Repro from #33568

declare function save(_response: IRootResponse<string>): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,7 @@

_step: T,
>_step : T
@@= skipped -9, +9 lines =@@
>_state : PartialStepState<unknown>

_selection: StepItemType<T> | Directive
->_selection : Directive | StepItemType<T>
+>_selection : StepItemType<T> | Directive

): _selection is StepItemType<T> {
return false;
@@= skipped -19, +19 lines =@@
@@= skipped -28, +28 lines =@@
}

function* showStep<
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@

function unionCase2<T>(t: T | object) {
->unionCase2 : <T>(t: T | object) => void
->t : T | object
+>unionCase2 : <T>(t: object | T) => void
+>t : object | T
>t : object | T

var rb5 = x in t;
>rb5 : boolean
>x in t : boolean
>x : any
->t : T | object
+>t : object | T
}

interface X { x: number }
var rb5 = x in t;

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,7 @@
}

function f3<T extends undefined>(a: T) {
@@= skipped -19, +19 lines =@@

function f4<T extends undefined>(a: object | T) {
>f4 : <T extends undefined>(a: object | T) => {}
->a : T | object
+>a : object | T

return { ...a };
>{ ...a } : {}
->a : T | object
+>a : object | T
}

function f5<S, T extends undefined>(a: S | T) {
@@= skipped -28, +28 lines =@@
@@= skipped -47, +47 lines =@@
// Repro from #46976

function g1<T extends {}, A extends { z: (T | undefined) & T }>(a: A) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@
>id : string

let x: keyof T & string | `-${keyof T & string}`;
->x : (keyof T & string) | `-${keyof T & string}`
->x : `-${keyof T & string}` | (keyof T & string)
+>x : `-${keyof T & string}` | keyof T & string

x = "id";
>x = "id" : "id"
->x : (keyof T & string) | `-${keyof T & string}`
->x : `-${keyof T & string}` | (keyof T & string)
+>x : `-${keyof T & string}` | keyof T & string
>"id" : "id"

x = "-id";
>x = "-id" : "-id"
->x : (keyof T & string) | `-${keyof T & string}`
->x : `-${keyof T & string}` | (keyof T & string)
+>x : `-${keyof T & string}` | keyof T & string
>"-id" : "-id"
}