mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
fix(50079): show deprecated on JSX attributes (#50084)
This commit is contained in:
25
tests/cases/fourslash/jsdocDeprecated_suggestion18.ts
Normal file
25
tests/cases/fourslash/jsdocDeprecated_suggestion18.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
// @jsx: preserve
|
||||
// @filename: foo.tsx
|
||||
////interface Props {
|
||||
//// /** @deprecated */
|
||||
//// x: number;
|
||||
//// y: number;
|
||||
////}
|
||||
////function A(props: Props) {
|
||||
//// return <div>{props.y}</div>
|
||||
////}
|
||||
////function B() {
|
||||
//// return <A [|x|]={1} [|y|]={1} />
|
||||
////}
|
||||
|
||||
const [range] = test.ranges();
|
||||
verify.getSuggestionDiagnostics([
|
||||
{
|
||||
"code": 6385,
|
||||
"message": "'x' is deprecated.",
|
||||
"reportsDeprecated": true,
|
||||
"range": range
|
||||
},
|
||||
]);
|
||||
Reference in New Issue
Block a user