How to organize TypeScript interfaces [closed]

Global

The TypeScript team uses a file called types.ts : https://github.com/Microsoft/TypeScript/blob/master/src/compiler/types.ts

I do the same in my project e.g. https://github.com/alm-tools/alm/blob/master/src/common/types.ts

Alternative

Its okay for high reuse portions to belong in types, however don’t pollute it with specific types. Specific types can be (should be) closer to their reference e.g. react style props belong next to (in the same file as) the react component.

React Component Prop Type / React Component

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)