AnyhowStep / tsql

A SQL query-builder/ORM
37 stars 3 forks source link

Prefer interfaces over type aliases where possible #176

Open AnyhowStep opened 4 years ago

AnyhowStep commented 4 years ago

For example, instead of,

type AfterFromClause = IQuery<{ ... }>;

Use,

interface AfterFromClause extends IQuery<{ ... }> {}

The interface is here because the identifier AfterFromClause is guaranteed to be used in emit for error messages, .d.ts

The type alias may be expanded, which may make reading error messages hard to read