|
| 1 | +=== tests/cases/compiler/complicatedIndexesOfIntersectionsAreInferencable.ts === |
| 2 | +interface FormikConfig<Values> { |
| 3 | +>FormikConfig : Symbol(FormikConfig, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 0, 0)) |
| 4 | +>Values : Symbol(Values, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 0, 23)) |
| 5 | + |
| 6 | + initialValues: Values; |
| 7 | +>initialValues : Symbol(FormikConfig.initialValues, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 0, 32)) |
| 8 | +>Values : Symbol(Values, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 0, 23)) |
| 9 | + |
| 10 | + validate?: (props: Values) => void; |
| 11 | +>validate : Symbol(FormikConfig.validate, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 1, 26)) |
| 12 | +>props : Symbol(props, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 2, 16)) |
| 13 | +>Values : Symbol(Values, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 0, 23)) |
| 14 | + |
| 15 | + validateOnChange?: boolean; |
| 16 | +>validateOnChange : Symbol(FormikConfig.validateOnChange, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 2, 39)) |
| 17 | +} |
| 18 | + |
| 19 | +declare function Func<Values = object, ExtraProps = {}>( |
| 20 | +>Func : Symbol(Func, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 4, 1)) |
| 21 | +>Values : Symbol(Values, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 22)) |
| 22 | +>ExtraProps : Symbol(ExtraProps, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 38)) |
| 23 | + |
| 24 | + x: (string extends "validate" | "initialValues" | keyof ExtraProps |
| 25 | +>x : Symbol(x, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 56)) |
| 26 | +>ExtraProps : Symbol(ExtraProps, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 38)) |
| 27 | + |
| 28 | + ? Readonly<FormikConfig<Values> & ExtraProps> |
| 29 | +>Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) |
| 30 | +>FormikConfig : Symbol(FormikConfig, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 0, 0)) |
| 31 | +>Values : Symbol(Values, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 22)) |
| 32 | +>ExtraProps : Symbol(ExtraProps, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 38)) |
| 33 | + |
| 34 | + : Pick<Readonly<FormikConfig<Values> & ExtraProps>, "validate" | "initialValues" | Exclude<keyof ExtraProps, "validateOnChange">> |
| 35 | +>Pick : Symbol(Pick, Decl(lib.es5.d.ts, --, --)) |
| 36 | +>Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) |
| 37 | +>FormikConfig : Symbol(FormikConfig, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 0, 0)) |
| 38 | +>Values : Symbol(Values, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 22)) |
| 39 | +>ExtraProps : Symbol(ExtraProps, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 38)) |
| 40 | +>Exclude : Symbol(Exclude, Decl(lib.es5.d.ts, --, --)) |
| 41 | +>ExtraProps : Symbol(ExtraProps, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 38)) |
| 42 | + |
| 43 | + & Partial<Pick<Readonly<FormikConfig<Values> & ExtraProps>, "validateOnChange" | Extract<keyof ExtraProps, "validateOnChange">>>) |
| 44 | +>Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --)) |
| 45 | +>Pick : Symbol(Pick, Decl(lib.es5.d.ts, --, --)) |
| 46 | +>Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) |
| 47 | +>FormikConfig : Symbol(FormikConfig, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 0, 0)) |
| 48 | +>Values : Symbol(Values, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 22)) |
| 49 | +>ExtraProps : Symbol(ExtraProps, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 38)) |
| 50 | +>Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) |
| 51 | +>ExtraProps : Symbol(ExtraProps, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 6, 38)) |
| 52 | + |
| 53 | +): void; |
| 54 | + |
| 55 | +Func({ |
| 56 | +>Func : Symbol(Func, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 4, 1)) |
| 57 | + |
| 58 | + initialValues: { |
| 59 | +>initialValues : Symbol(initialValues, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 13, 6)) |
| 60 | + |
| 61 | + foo: "" |
| 62 | +>foo : Symbol(foo, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 14, 20)) |
| 63 | + |
| 64 | + }, |
| 65 | + validate: props => { |
| 66 | +>validate : Symbol(validate, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 16, 6)) |
| 67 | +>props : Symbol(props, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 17, 13)) |
| 68 | + |
| 69 | + props.foo; |
| 70 | +>props.foo : Symbol(foo, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 14, 20)) |
| 71 | +>props : Symbol(props, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 17, 13)) |
| 72 | +>foo : Symbol(foo, Decl(complicatedIndexesOfIntersectionsAreInferencable.ts, 14, 20)) |
| 73 | + } |
| 74 | +}); |
0 commit comments