Reputation: 18670
I am importing the following type with TypeScript 1.8:
import { Option } from "react-select-props";
However when I try to create an object of type Option, Intellisense thinks it corresponds to the following type from the core library:
declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };
It compiles with the correct type from react-select-props
however. Am I missing something? How to hide this base type with the imported type and make sure Intellisense reflects this? I am using Visual Studio 2015 Update 3, and TypeScript Tools 2.0.6.
Upvotes: 0
Views: 666
Reputation: 164347
You can rename it:
import { Option as ReactPropsOption } from "react-select-props";
let options: ReactPropsOption = {};
Upvotes: 1