Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Unused variable with flow type inside destructured parameters #233

Closed
arthurflachs opened this issue Jan 8, 2016 · 3 comments
Closed

Unused variable with flow type inside destructured parameters #233

arthurflachs opened this issue Jan 8, 2016 · 3 comments

Comments

@arthurflachs
Copy link

Related to #184 : when declaring the type of destuctured parameters, babel-eslint reports a no-unused-var error :

function DestructuringWithFlowType({x}: MyType): boolean {
  return !!x;
}

Defining the type in a destructuring assignment seems to work fine :

const x = { a: { b: true } };
const { a }: MyType = x;
@arthurflachs
Copy link
Author

This seems to prevent the babel lint task from passing, for instance there.

@hzoo hzoo added the duplicate label Feb 2, 2016
@hzoo
Copy link
Member

hzoo commented Feb 2, 2016

This is the same as #236 I think so closing as a dupe - Thanks!

@hzoo
Copy link
Member

hzoo commented Feb 2, 2016

Also should be fixed by #246

@hzoo hzoo closed this as completed Feb 2, 2016
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

2 participants