Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Missing default modifier for TSNamespaceExportDeclaration #288

Closed
vjeux opened this issue May 23, 2017 · 3 comments
Closed

Missing default modifier for TSNamespaceExportDeclaration #288

vjeux opened this issue May 23, 2017 · 3 comments

Comments

@vjeux
Copy link

vjeux commented May 23, 2017

What version of typescript-eslint-parser are you using?
b7220fd

What code were you trying to parse?

declare module 'react-native-video' {
  export default class Video { }
}

What did you expect to happen?

Have a way to know that it's default

What happened?

There is no such thing

{ type: 'TSNamespaceExportDeclaration',
  declaration:
   { type: 'ClassDeclaration',
     range: [ 55, 70 ],
     loc: { start: [Object], end: [Object] },
     id:
      { type: 'Identifier',
        range: [Object],
        loc: [Object],
        name: 'Video' },
     body: { type: 'ClassBody', body: [], range: [Object], loc: [Object] },
     superClass: null,
     implements: [],
     decorators: [] },
  range: [ 40, 70 ],
  loc: { start: { line: 2, column: 2 }, end: { line: 2, column: 32 } } }

and prettier prints it as

declare module "react-native-video" {
  export class Video {}
}
@soda0289
Copy link
Member

Thanks for the report

This looks like a duplicate of #263
I think its better to just use the ESTree export node types and have a PR that just needs a final review #265

@vjeux
Copy link
Author

vjeux commented May 24, 2017

Thanks! This is the only blocker left on this project side to correctly print many real typescript projects:

image

prettier/prettier#1643 (comment)

@soda0289
Copy link
Member

soda0289 commented Jun 3, 2017

Fixed in master

@soda0289 soda0289 closed this as completed Jun 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants