parzh / iso4217

ISO-4217 as a JSON – https://www.iso.org/iso-4217-currency-codes.html
https://npmjs.org/package/@iso4217/json
MIT License
6 stars 1 forks source link

Automatically export all definitions from `*.type.ts` files #7

Open parzhitsky opened 2 years ago

parzhitsky commented 2 years ago

Currently, when another entity definition is added to a *.type.ts file, to re-export it through entry-point index.ts file it is necessary to reference this definition again via export { Entity } from "entity.type.ts"; statement:

export type Type1 = any;
+ export type Type2 = any;
export {
  Type1,
+ Type2,
} from "module.type.ts";

To comply to D.R.Y., the export statement should automatically pick up and re-export all definitions:

export * from "module.type.ts";

However, the latest version of TypeScript (4.4.x) preserves this export for type entities, causing runtime error due to these entities missing.

parzhitsky commented 1 year ago

This is now achievable since TypeScript 5.0, but unless Virtual-Finland-Development/codesets updates to it from TypeScript 4.9, it is a breaking change for them.

@lsipii ^

parzhitsky commented 1 year ago

By the way, @lsipii, huge thanks for using the library! ❤️