Skip to content

How to parse .js with .d.ts? #660

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

Closed
JounQin opened this issue Jun 30, 2019 · 2 comments
Closed

How to parse .js with .d.ts? #660

JounQin opened this issue Jun 30, 2019 · 2 comments
Labels
package: parser Issues related to @typescript-eslint/parser triage Waiting for team members to take a look

Comments

@JounQin
Copy link
Contributor

JounQin commented Jun 30, 2019

What code were you trying to parse?

// Please put code here
// foo.d.ts
export interface Foo {
  bar: string
}

export const foo: Foo;

// foo.js
export const foo = {
  bar: '',
}

// bar.ts
import { foo, Foo } from './foo'

What did you expect to happen?
parse foo.js together with foo.d.js

What actually happened?
No way

Versions

package version
@typescript-eslint/parser 1.11.0
TypeScript 3.5.2
ESLint 6.0.1
node 10.16.0
npm 6.9.0
@JounQin JounQin added package: parser Issues related to @typescript-eslint/parser triage Waiting for team members to take a look labels Jun 30, 2019
@JounQin
Copy link
Contributor Author

JounQin commented Jun 30, 2019

related: import-js/eslint-plugin-import#1341

@JounQin
Copy link
Contributor Author

JounQin commented Jun 30, 2019

close because of import-js/eslint-import-resolver-typescript#20

@JounQin JounQin closed this as completed Jun 30, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: parser Issues related to @typescript-eslint/parser triage Waiting for team members to take a look
Projects
None yet
Development

No branches or pull requests

1 participant