Update tests
This commit is contained in:
parent
0dcaaa5c50
commit
77d01ab332
2 changed files with 3 additions and 9 deletions
|
@ -486,10 +486,10 @@ function onChangeGenericFunction<T>(handler: Handler<T & {preset: number}>) {
|
|||
function updateIds<T extends Record<K, string>, K extends string>(
|
||||
obj: T,
|
||||
idFields: K[],
|
||||
idMapping: { [oldId: string]: string }
|
||||
idMapping: Partial<Record<T[K], T[K]>>
|
||||
): Record<K, string> {
|
||||
for (const idField of idFields) {
|
||||
const newId = idMapping[obj[idField]];
|
||||
const newId: T[K] | undefined = idMapping[obj[idField]];
|
||||
if (newId) {
|
||||
obj[idField] = newId;
|
||||
}
|
||||
|
|
|
@ -148,12 +148,6 @@ function f30<T, K extends keyof T>() {
|
|||
let x: Partial<Record<keyof T, string>>[K] = "hello";
|
||||
}
|
||||
|
||||
// We simplify indexed accesses applied to mapped types up to five levels deep
|
||||
|
||||
function f31<T, K extends keyof T>() {
|
||||
let x: Partial<Partial<Partial<Partial<Record<keyof T, string>>>>>[K] = "hello";
|
||||
}
|
||||
|
||||
function f32<T, K extends keyof T>() {
|
||||
let x: Partial<Partial<Partial<Partial<Partial<Record<keyof T, string>>>>>>[K] = "hello";
|
||||
let x: Partial<Partial<Partial<Partial<Partial<Partial<Partial<Record<keyof T, string>>>>>>>>[K] = "hello";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue