I am currently developing an Ionic Sqlite database helper library and in order to streamline the process for other functions, I need to ensure that users include the ID key in the Params property along with their other keys.
interface dbObj {
tableName: string;
orderBy: string;
Params: paramsList;
}
The Params property must contain the ID key, but should not restrict users from adding any other keys to it afterwards.
interface paramsList {
ID: string;
// Additonal keys can be freely added here
}
How can I enforce the inclusion of the ID key in Params while still allowing users to freely add other keys to paramsList? As a newcomer to TypeScript, I hope this question makes sense.