mirror of
https://github.com/Nezumi-2711/typescript-training.git
synced 2026-09-22 20:02:19 +00:00
Cast type of data
This commit is contained in:
@@ -9,6 +9,6 @@ export class DataObject<T> {
|
||||
|
||||
constructor(dataObject: IDataObject<T>) {
|
||||
this.id = dataObject?.id ?? null;
|
||||
this.data = dataObject.data;
|
||||
this.data = dataObject.data as T;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user