Skip to content

Commit

Permalink
fix: support symbol as dict key (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
undefined-moe authored Oct 2, 2024
1 parent 2da9c0c commit a6f508c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type Dict<T = any, K extends string = string> = { [key in K]: T }
export type Dict<T = any, K extends string | symbol = string> = { [key in K]: T }
export type Get<T extends {}, K> = K extends keyof T ? T[K] : never
export type Extract<S, T, U = S> = S extends T ? U : never
export type MaybeArray<T> = [T] extends [unknown[]] ? T : T | T[]
Expand Down

0 comments on commit a6f508c

Please sign in to comment.