Typescript - rename not working in ts
See original GitHub issuefollow the tutorial, i rename the posts to articles, but the eslint yell at me

import type { CellSuccessProps, CellFailureProps } from '@redwoodjs/web'
import { FindPosts } from 'types/graphql'
export const QUERY = gql`
query ArticlesQuery {
articles: posts {
id
title
body
createdAt
}
}
`
export const Loading = () => <div>Loading...</div>
export const Empty = () => <div>Empty</div>
export const Failure = ({ error }: CellFailureProps) => (
<div style={{ color: 'red' }}>Error: {error.message}</div>
)
export const Success = ({ articles }: CellSuccessProps<FindPosts>) => {
return (
<>
{articles.map((article) => (
<article key={article.id}>
<header>
<h2>{article.title}</h2>
</header>
<p>{article.body}</p>
<div>Posted at: {article.createdAt}</div>
</article>
))}
</>
)
}
Issue Analytics
- State:
- Created a year ago
- Comments:15 (13 by maintainers)
Top Results From Across the Web
F2 rename doesn't work in TypeScript · Issue #103213 - GitHub
I can't repo the rename bug but have seen the could not load TypeScript at this path . This can happen when you...
Read more >Typescript confusing error after .js file renamed to .tsx file
I had the same issue. Renamed the files which I needed to .tsx and changed the code to typescript. Restarted the server. It...
Read more >How to Fix VS Code Rename Symbols Feature for TypeScript
The solution for this problem is to select TypeScript version in Visual Studio Code. You can do this by opening up the command...
Read more >In TypeScript, renaming a class function (via Refactor) causes ...
In TypeScript, renaming a class function (via Refactor) causes functions with the same name in untyped objects to be renamed as well, everywhere...
Read more >TypeScript Programming with Visual Studio Code
No, the TypeScript language service that ships with Visual Studio 2019 and 2022 isn't compatible with VS Code. You will need to install...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jtoar codegen checks the web side as well and generates the type for each GraphQL operation.
And I finally see why it’s not working.
@PeterChen1997 type needs to change from
CellSuccessProps<FindPosts>
toCellSuccessProps<ArticlesQuery>
. Since the type name is the same as whatever is set for the operation name. If we usequery SomeOtherName
, we need to update the type name.@jtoar if you read through what I and Andre have said above, what do you think is a good next step?