-
Notifications
You must be signed in to change notification settings - Fork 13
BREAKING: correct nodes TSConstructorType and TSConstructorType #74
Conversation
i'm unsure how we should proceed with this, do we want to have same structure as babel for this? or we want to align it to how names are provided in estree... |
Yeah it's a tricky one for sure. The inconsistency on the babel side makes me think that maybe we should forgo compatibility on this one for now and just make a clear note that we need to fix it up on the babel side later. There have been plenty of cases over the last year or so that I flagged up or fixed odd things on the babel side after discovering them through the ast-alignment testing, so it is not entirely unexpected. What do you think? |
I'm OK with changing names of properties but I feel like we should keep type of node same as babel has |
Sounds good 👍 |
BREAKING CHANGE
ok i'm closing than #60 and i will rebase change here |
🎉 This PR is included in version 11.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR contains breaking changes and its alternative way of solving issue #30
Changes from this PR align structure of AST with what babel produces.
There is alternative version of aligning those nodes #60
babel parses
CallSignature
andConstructSignature
asTSCallSignatureDeclaration
andTSConstructSignatureDeclaration
and has fields:typeParameters
typeParametersparameters
array of all parameterstypeAnnotation
expected return type of functionright now we are parsing it as
typeParameters
, (params
orparameters
) andtypeAnnotation
fixes: #30, #60