mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-20 19:45:07 -06:00
Accepted baselines.
This commit is contained in:
parent
57938e6cc2
commit
a34f9880ea
@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/omitTypeTestErrors01.ts(11,16): error TS2339: Property 'c' does not exist on type 'Pick<Foo, "a" | "b">'.
|
||||
tests/cases/compiler/omitTypeTestErrors01.ts(15,16): error TS2339: Property 'b' does not exist on type 'Pick<Foo, "a">'.
|
||||
tests/cases/compiler/omitTypeTestErrors01.ts(11,16): error TS2339: Property 'c' does not exist on type 'Omit<Foo, "c">'.
|
||||
tests/cases/compiler/omitTypeTestErrors01.ts(15,16): error TS2339: Property 'b' does not exist on type 'Omit<Foo, "c" | "b">'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/omitTypeTestErrors01.ts (2 errors) ====
|
||||
@ -15,13 +15,13 @@ tests/cases/compiler/omitTypeTestErrors01.ts(15,16): error TS2339: Property 'b'
|
||||
export function getBarC(bar: Bar) {
|
||||
return bar.c;
|
||||
~
|
||||
!!! error TS2339: Property 'c' does not exist on type 'Pick<Foo, "a" | "b">'.
|
||||
!!! error TS2339: Property 'c' does not exist on type 'Omit<Foo, "c">'.
|
||||
}
|
||||
|
||||
export function getBazB(baz: Baz) {
|
||||
return baz.b;
|
||||
~
|
||||
!!! error TS2339: Property 'b' does not exist on type 'Pick<Foo, "a">'.
|
||||
!!! error TS2339: Property 'b' does not exist on type 'Omit<Foo, "c" | "b">'.
|
||||
}
|
||||
|
||||
|
||||
@ -11,28 +11,28 @@ interface Foo {
|
||||
}
|
||||
|
||||
export type Bar = Omit<Foo, "c">;
|
||||
>Bar : Pick<Foo, "a" | "b">
|
||||
>Bar : Omit<Foo, "c">
|
||||
|
||||
export type Baz = Omit<Foo, "b" | "c">;
|
||||
>Baz : Pick<Foo, "a">
|
||||
>Baz : Omit<Foo, "c" | "b">
|
||||
|
||||
export function getBarC(bar: Bar) {
|
||||
>getBarC : (bar: Pick<Foo, "a" | "b">) => any
|
||||
>bar : Pick<Foo, "a" | "b">
|
||||
>getBarC : (bar: Omit<Foo, "c">) => any
|
||||
>bar : Omit<Foo, "c">
|
||||
|
||||
return bar.c;
|
||||
>bar.c : any
|
||||
>bar : Pick<Foo, "a" | "b">
|
||||
>bar : Omit<Foo, "c">
|
||||
>c : any
|
||||
}
|
||||
|
||||
export function getBazB(baz: Baz) {
|
||||
>getBazB : (baz: Pick<Foo, "a">) => any
|
||||
>baz : Pick<Foo, "a">
|
||||
>getBazB : (baz: Omit<Foo, "c" | "b">) => any
|
||||
>baz : Omit<Foo, "c" | "b">
|
||||
|
||||
return baz.b;
|
||||
>baz.b : any
|
||||
>baz : Pick<Foo, "a">
|
||||
>baz : Omit<Foo, "c" | "b">
|
||||
>b : any
|
||||
}
|
||||
|
||||
|
||||
@ -28,9 +28,9 @@ export function getBarA(bar: Bar) {
|
||||
>Bar : Symbol(Bar, Decl(omitTypeTests01.ts, 4, 1))
|
||||
|
||||
return bar.a;
|
||||
>bar.a : Symbol(a, Decl(omitTypeTests01.ts, 0, 15))
|
||||
>bar.a : Symbol(a)
|
||||
>bar : Symbol(bar, Decl(omitTypeTests01.ts, 9, 24))
|
||||
>a : Symbol(a, Decl(omitTypeTests01.ts, 0, 15))
|
||||
>a : Symbol(a)
|
||||
}
|
||||
|
||||
export function getBazA(baz: Baz) {
|
||||
@ -39,9 +39,9 @@ export function getBazA(baz: Baz) {
|
||||
>Baz : Symbol(Baz, Decl(omitTypeTests01.ts, 6, 33))
|
||||
|
||||
return baz.a;
|
||||
>baz.a : Symbol(a, Decl(omitTypeTests01.ts, 0, 15))
|
||||
>baz.a : Symbol(a)
|
||||
>baz : Symbol(baz, Decl(omitTypeTests01.ts, 13, 24))
|
||||
>a : Symbol(a, Decl(omitTypeTests01.ts, 0, 15))
|
||||
>a : Symbol(a)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -11,28 +11,28 @@ interface Foo {
|
||||
}
|
||||
|
||||
export type Bar = Omit<Foo, "c">;
|
||||
>Bar : Pick<Foo, "a" | "b">
|
||||
>Bar : Omit<Foo, "c">
|
||||
|
||||
export type Baz = Omit<Foo, "b" | "c">;
|
||||
>Baz : Pick<Foo, "a">
|
||||
>Baz : Omit<Foo, "c" | "b">
|
||||
|
||||
export function getBarA(bar: Bar) {
|
||||
>getBarA : (bar: Pick<Foo, "a" | "b">) => string
|
||||
>bar : Pick<Foo, "a" | "b">
|
||||
>getBarA : (bar: Omit<Foo, "c">) => string
|
||||
>bar : Omit<Foo, "c">
|
||||
|
||||
return bar.a;
|
||||
>bar.a : string
|
||||
>bar : Pick<Foo, "a" | "b">
|
||||
>bar : Omit<Foo, "c">
|
||||
>a : string
|
||||
}
|
||||
|
||||
export function getBazA(baz: Baz) {
|
||||
>getBazA : (baz: Pick<Foo, "a">) => string
|
||||
>baz : Pick<Foo, "a">
|
||||
>getBazA : (baz: Omit<Foo, "c" | "b">) => string
|
||||
>baz : Omit<Foo, "c" | "b">
|
||||
|
||||
return baz.a;
|
||||
>baz.a : string
|
||||
>baz : Pick<Foo, "a">
|
||||
>baz : Omit<Foo, "c" | "b">
|
||||
>a : string
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user