I'm interested in incorporating gts into my project.
One rule in tslint.json is "no-any": true
, which prohibits the use of the any
keyword in the code. How should one handle cases where a function needs to accept any type, such as when working with SQL queries that can take arguments of different types? While it's possible to override this rule, I'm curious about best practices for scenarios like these.
One approach that comes to mind is specifying all primitive types using |
:
param: string| number| Date;
But what if the function is wrapping external code like mysql that already accepts any[]
?