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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support TypeScript 4.1 via typescript-estree #9636
Conversation
const { | ||
concat, | ||
join, | ||
hardline, | ||
line, | ||
softline, | ||
group, | ||
indent, | ||
ifBreak, | ||
} = require("../document").builders; | ||
builders: { concat, join, hardline, line, softline, group, indent, ifBreak }, | ||
} = require("../document"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why, but this change removes the TypeScript typecheck error. Why...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe #9207
All prod tests are failed. I'm looking into that. |
Seems we can access decorators via require("@typescript-eslint/typescript-estree").parseAndGenerateServices('@foo\nfunction bar(){}').services.program.getSourceFile().statements[0] |
I'm going to take a shot |
@typescript-eslint/typescript-estree@4.8.0 released, working on it. |
@bradzacher Did I do something wrong? There is no info in > const {ast, esTreeNodeToTSNodeMap} = require("@typescript-eslint/typescript-estree").parseWithNodeMaps('@foo()\nfunction bar(){}')
undefined
> esTreeNodeToTSNodeMap.get(ast.body[0])
undefined > const {ast, services:{esTreeNodeToTSNodeMap}} = require("@typescript-eslint/typescript-estree").parseAndGenerateServices('@foo()\nfunction bar(){}')
undefined
> esTreeNodeToTSNodeMap.get(ast.body[0])
<ref *1> NodeObject {
pos: 0,
end: 23,
flags: 0,
modifierFlagsCache: 0,
transformFlags: 1050625,
parent: <ref *2> SourceFileObject
//... |
FFS I'm a stooge. The I'll have a fix released ASAP. |
This comment has been minimized.
This comment has been minimized.
typescript-eslint/typescript-eslint#2773 is merged, but I can't do an NPM release right now as azure pipelines have an outage.... For now you can test against |
Can we merge this as is? or should wait |
I don't think we need wait for @typescript-eslint/typescript-estree , but do we need wait for typescript release stable version? |
TypeScript 4.1 will seem be released soon according to microsoft/TypeScript#40124. Let's wait. |
4.8.1 is live with the fix :) |
|
I see. let's merge this PR for now. I'll do the other work required for the release. When TypeScript 4.1 is released, I'll create a PR just to update it. |
Partial of #9234
This PR tries the approach @thorn0 suggested (27e7b46)changelog_unreleased/*/pr-XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨