Skip to content

Commit

Permalink
fix(DataPacker): packAsRawType
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Feb 1, 2021
1 parent 85cfbcf commit 97fa9fd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils/DataPacker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ export class DataPacker {
/**
* 返回结果同 `pack()`,不过类型是原数据的类型。
*/
static packAsRawType<TRawObjectData extends RawData>(
rawData: RawData<TRawObjectData>,
): TRawObjectData {
static packAsRawType<T>(rawData: T): T {
return DataPacker.pack(rawData) as any
}

Expand Down

0 comments on commit 97fa9fd

Please sign in to comment.