Skip to content

Commit

Permalink
Update mod.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Roosteridk authored Dec 19, 2022
1 parent 3442fe1 commit 8a342b6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ export class Deta {
* @param name The name of your database
* @returns A new database instance
*/
Base<Schema>(name: string) {
Base<Schema extends object>(name: string) {
return new Base<Schema>(this, name);
}
}

// TODO: Make this nested inside Deta
class Base<Schema> {
class Base<Schema extends object> {
name: string;
rootUrl: URL;
deta: Deta;
Expand Down Expand Up @@ -129,7 +128,7 @@ class Base<Schema> {
}
}

interface Updates<Schema> {
interface Updates<Schema extends object> {
/**Fields to update*/
set?: Partial<Schema>;
/**Fields to increment by a number.*/
Expand Down

0 comments on commit 8a342b6

Please sign in to comment.