Skip to content

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

Closed
Closed
@JounQin

Description

@JounQin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: parserIssues related to @typescript-eslint/parsertriageWaiting for team members to take a look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions