Fix https://github.com/porsager/postgres/issues/1143#1144
Fix https://github.com/porsager/postgres/issues/1143#1144sep2 wants to merge 1 commit intoporsager:masterfrom
Conversation
`Omit` will not work, a common interface `ISql` for `Sql` and `TransactionSql` is introduced. microsoft/TypeScript#41362
|
Won't that include all properties that aren't valid for TransactionSql ? I think the proper way is to make an explicit definition of TransactionSql instead of inherit. Perhaps better to use Type instead of Interface. |
|
Only actual properties are included in the interfaces. Properties not in the runtime
I used |
|
It would be good to add a unit test, like what is common in DefinitelyTyped. |
|
To prevent the same hazard as previous PR, can some more people with typescript knowledge approve this? |
|
@porsager I opened the original issue (#1143), and I can confirm that this looks good to me. I've also tested this in my project, and it resolves the issue that I was seeing. @sep2's line of thinking, of moving all shared properties ( |
|
The only nitpick I would have is that since there's already an existing interface called A more descriptive name might be |
|
I would prefer the type to be unknown instead of any. The rest LGTM |
…ngs types issues (ref: porsager/postgres#1144)
|
Please merge this, the library is unusable right now on the latest version. The changes LGTM too. |
Omitwill not work, a common interfaceISqlforSqlandTransactionSqlis introduced.microsoft/TypeScript#41362