FlorianRappl / dets

Generate a single declaration file for your TypeScript project. :rocket:
https://piral.io
MIT License
25 stars 5 forks source link

Resolve Name Conflicts #10

Closed FlorianRappl closed 4 years ago

FlorianRappl commented 4 years ago

Right now importing typings from, e.g., React will result in some strange things as in the React package we have something like

import * as PropTypes from 'prop-types';
export type Validator<T> = PropTypes.Validator<T>;

in dets this becomes

export type Validator<T> = Validator<T>;

where obviously the declaration of Validator is missing (otherwise we would have two with the same name).

Instead, we should choose a new name and come up with, e.g.,

export type Validator<T> = PropTypesValidator<T>;

where the latter would still be properly included / defined.

FlorianRappl commented 4 years ago

Available in latest version (0.5).