angular / ts-api-guardian

MIT License
15 stars 15 forks source link

fix: support enum values as value types #21

Closed alxhub closed 7 years ago

alxhub commented 7 years ago

Currently if the guardian sees a type of the form X.Y, it assumes X is a module identifier (import * as X from ...). However, X could also be an enum name, a class declaration, or some other container type which can hold values.

This change checks whether X is in fact a module identifier instead of assuming it is, which allows enums and other nested value types.