Skip to content

Commit

Permalink
feat: 加上KeyOfMap、ValueOfMap
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Jun 6, 2023
1 parent 8c7a6c1 commit 3b0c0ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ declare global {
keyof InstanceType<DefineComponent>['$props']
>]: InstanceType<Component>['$props'][K];
};

type KeyOfMap<T extends Map> = Parameters<T['get']>[0];

type ValueOfMap<T extends Map> = ReturnType<T['get']>;
}

0 comments on commit 3b0c0ac

Please sign in to comment.