In src/models folder, I have a big list of enums that I put in a namespace Enums.
Enums.ts
namespace Enums {
const enum MethodType {
Equal,
NotEqual,
...
}
}
In src/typings-custom folder, I have some interfaces (among others) that use those Enums.
dto.d.ts
/// <reference path="../models/Enums" />
namespace DTO {
interface IRule {
MethodType: Enums.MethodType
}
}
The only way I found to reference my Enums namespace into the DTO namespace is by using the /// <reference .../> line.
Is it still part of good practices with TypeScript v2.6? Is there another way? (I tried with import but it expects a module instead of a namespace)
Thank you!