Typescript issue for a generic observable variable as param #456
Replies: 1 comment
-
I ended solving in in another way: import dayjs from "dayjs";
import { v4 } from "uuid";
export default class AuditDB {
constructor(
public readonly authId: string,
) {}
insert<Data>(values: Data) {
const now = dayjs().format("YYYY-MM-DD HH:mm:ss");
return {
...values,
id: v4(),
created_by: this.authId,
created_by_local: this.authId,
updated_by: this.authId,
updated_by_local: this.authId,
created_at_local: now,
updated_at_local: now,
};
}
update<Data>(values: Data) {
const now = dayjs().format("YYYY-MM-DD HH:mm:ss");
return {
...values,
updated_by: this.authId,
updated_by_local: this.authId,
updated_at_local: now,
};
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to do something like this in frontened:
I'm getting this error:
status$[id].get();
Observable object:
Beta Was this translation helpful? Give feedback.
All reactions