Skip to content

Intellisense and TSX: not working when "foreign" namespace #7388

Description

@TheWind3

Visual Studio: No intellisense in TSX file in certain conditions.
However, compilation is OK.

TypeScript Version:
1.8.6

VisualStudio Version:
2015, 14.0.24720.00 update 1

Code

// filename: test.tsx
declare module JSX {
  interface Element {
  }
  interface ElementAttributesProperty {
    props;
  }
  interface IntrinsicElements {
    div: any;
  }
}
namespace Library {
  export class LibComponent {
    props: {
      title: string;
    };
  }
}
namespace Application {
  import lib = Library;

  class AppComponent {
    props: {
      title: string;
    };
  }

  function appMain(): void {
    var result = (
      <div>
// get intellisense here:
        <AppComponent title="My Application" />
        <AppCompone // get intellisense
        <AppComponent tit // get intellisense

// no intellisense here:
        <Library.LibComponent title="Library item 1" />
        <Libra // no intellisense
        <Library. // no intellisense
        <Library.LibCo // no intellisense
        <Library.LibComponent tit // no intellisense

// no intellisense here:
        <lib.LibComponent title="Library item 1" />
        <li // no intellisense
        <lib. // no intellisense
        <lib.LibCo // no intellisense
        <lib.LibComponent tit // no intellisense
      </div>
    );
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions