Closed
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I have searched for related issues and found none that match my proposal.
- I have searched the current rule list and found no rules that match my proposal.
- I have read the FAQ and my problem is not listed.
Relevant Package
ast-spec
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
Currently
module a.b {}
^^^^^^^^^^^^^ TSModuleDeclaration(a)
^ TSModuleDeclaration(a).id
^^^^ TSModuleDeclaration(b)
^ TSModuleDeclaration(b).id
^^ TSModuleBlock
Can we change it to
module a.b {}
^^^^^^^^^^^^^ TSModuleDeclaration
^^^ TSModuleDeclaration.id
^^ TSModuleBlock
?
Another problem is we parse the following code as the same ast
namespace a {}
module a {}
Prettier can't distinguish them without the original code. Failure detection
Maybe add TSNamespaceDeclaration
or TSModuleDeclaration.namespace
?
Fail
N/a
Pass
N/a
Additional Info
No response