Working on my Angular 7 project, I created a definition file to easily access certain types throughout the app without importing them individually:
// globals.d.ts
interface ISomethingA {
name: string;
age: number;
}
However, when attempting to declare an interface using a type from a third-party library, a problem arises:
// globals.d.ts
import { SomeTypeFromSomeWhere } from ‘some-library’;
interface ISomethingB {
propA: SomeTypeFromSomeWhere
}
The application continues to work, but a compile error occurs stating: Cannot find name 'ISomethingB’
. Is it not recommended to use imported types from third-party libraries? Any insights would be valuable!