How to enforce a file to follow a certain signature in typescript

Viewed 42

Consider having a file named Controller.ts. Is there any way one can force a signature for this file to follow? For example, the Controller should always export a default value of type ControllerResponse. Is there any way for forcing this with typescript?
I already tried putting a Controller.d.ts next to it, But it only dictates what "others" see from this file, not how this file should look like itself.
Also, I don't want to touch the containing of the Controller.ts file. I basically want to define a "folder and file" schema for the users of my tools that they need to follow and want it to be somewhat automatically enforced.
And I want them to automatically have auto-completes etc. for their files.

0 Answers
Related