|
1 | 1 | tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(27,24): error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
2 |
| - Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
| 2 | + Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'LinkProps'. |
| 3 | + Property 'goTo' is missing in type '{ extra: true; onClick: (k: "left" | "right") => void; }'. |
| 4 | +tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(27,64): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
3 | 5 | tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(28,24): error TS2322: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
4 | 6 | Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
5 |
| -tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(29,24): error TS2322: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. |
6 |
| - Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
| 7 | +tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(29,43): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
7 | 8 | tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(30,24): error TS2322: Type '{ goTo: "home"; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
8 | 9 | Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
9 |
| -tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(33,25): error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. |
10 |
| - Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. |
11 |
| -tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(36,25): error TS2322: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. |
12 |
| - Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
| 10 | +tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(33,65): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. |
| 11 | +tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(36,44): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
13 | 12 |
|
14 | 13 |
|
15 |
| -==== tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx (6 errors) ==== |
| 14 | +==== tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx (7 errors) ==== |
16 | 15 | import React = require('react')
|
17 | 16 |
|
18 | 17 | export interface ClickableProps {
|
@@ -42,29 +41,29 @@ tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(36,25): err
|
42 | 41 | const b0 = <MainButton {...{onClick: (k) => {console.log(k)}}} extra />; // k has type "left" | "right"
|
43 | 42 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
44 | 43 | !!! error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
45 |
| -!!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
| 44 | +!!! error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'LinkProps'. |
| 45 | +!!! error TS2322: Property 'goTo' is missing in type '{ extra: true; onClick: (k: "left" | "right") => void; }'. |
| 46 | + ~~~~~ |
| 47 | +!!! error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
46 | 48 | const b2 = <MainButton onClick={(k)=>{console.log(k)}} extra />; // k has type "left" | "right"
|
47 | 49 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
48 | 50 | !!! error TS2322: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
49 | 51 | !!! error TS2322: Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
50 | 52 | const b3 = <MainButton {...{goTo:"home"}} extra />; // goTo has type"home" | "contact"
|
51 |
| - ~~~~~~~~~~~~~~~~~~~~~~~~ |
52 |
| -!!! error TS2322: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. |
53 |
| -!!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
| 53 | + ~~~~~ |
| 54 | +!!! error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
54 | 55 | const b4 = <MainButton goTo="home" extra />; // goTo has type "home" | "contact"
|
55 | 56 | ~~~~~~~~~~~~~~~~~
|
56 | 57 | !!! error TS2322: Type '{ goTo: "home"; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
57 | 58 | !!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
58 | 59 |
|
59 | 60 | export function NoOverload(buttonProps: ButtonProps): JSX.Element { return undefined }
|
60 | 61 | const c1 = <NoOverload {...{onClick: (k) => {console.log(k)}}} extra />; // k has type any
|
61 |
| - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
62 |
| -!!! error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. |
63 |
| -!!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. |
| 62 | + ~~~~~ |
| 63 | +!!! error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. |
64 | 64 |
|
65 | 65 | export function NoOverload1(linkProps: LinkProps): JSX.Element { return undefined }
|
66 | 66 | const d1 = <NoOverload1 {...{goTo:"home"}} extra />; // goTo has type "home" | "contact"
|
67 |
| - ~~~~~~~~~~~~~~~~~~~~~~~~ |
68 |
| -!!! error TS2322: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. |
69 |
| -!!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
| 67 | + ~~~~~ |
| 68 | +!!! error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. |
70 | 69 |
|
0 commit comments