New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support TypeScript 4.7 #12640
Comments
Anything else? |
both pr mentioned in this issue are merged 馃憖 |
Is there still something left to be done? |
Implementation of TS 4.7 support is almost complete. We are currently preparing for the release of 2.7. |
@sosukesuzuki, I've tested this locally and found a critical bug. My code: It can be fixed by adding a semicolon: But when Prettier formats my code, it removes the semicolon! |
@0x009922 Thank you! I'll investigate it. |
Maybe this is a bug of TypeScript Compiler so I've reported to TS repo microsoft/TypeScript#49348 |
I encountered an errors when trying to format files containing TS 4.7 feature: Instantiation Expressions. Here's my code producing the errors: import { Button } from '@mantine/core'
import { Link, useTransition } from '@remix-run/react'
import type { ComponentPropsWithRef} from 'react'
import { forwardRef } from 'react'
type SubmitButtonProps = {
/** Show a loading indicator */
showLoader?: boolean
} & ComponentPropsWithRef<typeof Button<'button'>> Logs:
However when i formats any other files that doesn't contain such code, it works just fine. Could you please investigate it @sosukesuzuki . Thank you. |
@ookamiiixd You have just a syntax error. What does |
@stepaniukm I just tried to pass a generic to my react component which accepts a generic. I believe it's not a syntax error since typechecking and the code is working just fine. I'm not good at explaining since i'm a beginner myself, could you please refer here? |
@stepaniukm there are no syntax errors here. declare const x: 'button'; |
Hey this still doesn't work properly on function test<T>(i: T): T { return i }
type TestString = typeof test<string> also, this comment isnt fixed yet |
Can you open a new issue if problem still exists? |
Locked due to age. |
TypeScript 4.7 beta has been released 馃帀
https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/
extends
constraints forinfer
聽babel/babel#14476Instantiation Expressions
extends
Constraints oninfer
Type Variablesextends
constraints forinfer
(tests)聽#12897Optional Variance Annotations for Type Parameters
The text was updated successfully, but these errors were encountered: