mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-10 18:04:18 -05:00
@@ -981,6 +981,7 @@ namespace ts {
|
||||
return node === (<ComputedPropertyName>parent).expression;
|
||||
case SyntaxKind.Decorator:
|
||||
case SyntaxKind.JsxExpression:
|
||||
case SyntaxKind.JsxSpreadAttribute:
|
||||
return true;
|
||||
case SyntaxKind.ExpressionWithTypeArguments:
|
||||
return (<ExpressionWithTypeArguments>parent).expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent);
|
||||
|
||||
26
tests/cases/fourslash/jsxSpreadReference.ts
Normal file
26
tests/cases/fourslash/jsxSpreadReference.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//@Filename: file.tsx
|
||||
//// declare module JSX {
|
||||
//// interface Element { }
|
||||
//// interface IntrinsicElements {
|
||||
//// }
|
||||
//// interface ElementAttributesProperty { props }
|
||||
//// }
|
||||
//// class MyClass {
|
||||
//// props: {
|
||||
//// name?: string;
|
||||
//// size?: number;
|
||||
//// }
|
||||
//// }
|
||||
////
|
||||
//// var [|/*dst*/nn|]: {name?: string; size?: number};
|
||||
//// var x = <MyClass {...[|n/*src*/n|]}></MyClass>;
|
||||
|
||||
goTo.marker('src');
|
||||
debugger;
|
||||
goTo.definition();
|
||||
verify.caretAtMarker('dst');
|
||||
|
||||
goTo.marker('src');
|
||||
verify.renameLocations(false, false);
|
||||
Reference in New Issue
Block a user