2016-11-08 20:07:17 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
//@Filename: file.tsx
|
|
|
|
// @jsx: preserve
|
|
|
|
// @noLib: true
|
|
|
|
|
|
|
|
//// declare module JSX {
|
|
|
|
//// interface Element { }
|
|
|
|
//// interface IntrinsicElements {
|
|
|
|
//// }
|
|
|
|
//// interface ElementAttributesProperty { props; }
|
|
|
|
//// }
|
|
|
|
//// interface ClickableProps {
|
|
|
|
//// children?: string;
|
|
|
|
//// className?: string;
|
|
|
|
//// }
|
|
|
|
//// interface ButtonProps extends ClickableProps {
|
|
|
|
//// onClick(event?: React.MouseEvent<HTMLButtonElement>): void;
|
|
|
|
//// }
|
|
|
|
//// interface LinkProps extends ClickableProps {
|
|
|
|
//// goTo: string;
|
|
|
|
//// }
|
2017-01-19 18:46:43 +01:00
|
|
|
//// declare function /*firstSource*/MainButton(buttonProps: ButtonProps): JSX.Element;
|
|
|
|
//// declare function /*secondSource*/MainButton(linkProps: LinkProps): JSX.Element;
|
|
|
|
//// declare function /*thirdSource*/MainButton(props: ButtonProps | LinkProps): JSX.Element;
|
2017-10-19 00:49:46 +02:00
|
|
|
//// let opt = <[|Main/*firstTarget*/Button|] />;
|
|
|
|
//// let opt = <[|Main/*secondTarget*/Button|] children="chidlren" />;
|
|
|
|
//// let opt = <[|Main/*thirdTarget*/Button|] onClick={()=>{}} />;
|
|
|
|
//// let opt = <[|Main/*fourthTarget*/Button|] onClick={()=>{}} ignore-prop />;
|
2018-07-03 02:18:07 +02:00
|
|
|
//// let opt = <[|Main/*fifthTarget*/Button|] goTo="goTo" />;
|
2017-10-19 00:49:46 +02:00
|
|
|
//// let opt = <[|Main/*sixthTarget*/Button|] wrong />;
|
2016-11-08 20:07:17 +01:00
|
|
|
|
|
|
|
verify.goToDefinition({
|
2018-10-17 02:16:00 +02:00
|
|
|
firstTarget: "firstSource",
|
|
|
|
secondTarget: "firstSource",
|
2016-11-08 20:07:17 +01:00
|
|
|
thirdTarget: "firstSource",
|
|
|
|
fourthTarget: "firstSource",
|
2018-07-03 02:18:07 +02:00
|
|
|
fifthTarget: "secondSource",
|
2018-10-17 02:16:00 +02:00
|
|
|
sixthTarget: "firstSource"
|
2016-11-08 20:07:17 +01:00
|
|
|
});
|