Skip to content

Commit

Permalink
fix: typings for new version of typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
menduz committed Sep 8, 2022
1 parent d74f912 commit 42ddb43
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion etc/interfaces.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export namespace IDatabase {
// @public
export interface IDatabase {
// (undocumented)
query<T>(sql: string): Promise<IDatabase.IQueryResult<T>>;
query<T extends Record<string, any>>(sql: string): Promise<IDatabase.IQueryResult<T>>;
}

// @alpha (undocumented)
Expand Down
35 changes: 28 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"homepage": "https://github.com/well-known-components/interfaces#readme",
"devDependencies": {
"@microsoft/api-extractor": "^7.19.3",
"typescript": "^4.5.4"
"typescript": "^4.8.3"
},
"dependencies": {
"@types/node": "^16.11.19",
Expand Down
2 changes: 1 addition & 1 deletion src/components/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export namespace IDatabase {
* @public
*/
export interface IDatabase {
query<T>(sql: string): Promise<IDatabase.IQueryResult<T>>
query<T extends Record<string, any>>(sql: string): Promise<IDatabase.IQueryResult<T>>
}

0 comments on commit 42ddb43

Please sign in to comment.