Skip to content

Commit

Permalink
Improve isMap function
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjohnsonpint committed Jan 11, 2024
1 parent 5a2f126 commit 39e161d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assembly/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -911,5 +911,6 @@ function parseDate(dateTimeString: string): Date {

// @ts-ignore: Decorator
@inline function isMap<T>(): bool {
return nameof<T>().startsWith("Map<");
let type = changetype<T>(0);
return type instanceof Map;
}

0 comments on commit 39e161d

Please sign in to comment.