We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f84e2eb commit ba1eeadCopy full SHA for ba1eead
dashi/src/lib/utils/getValue.ts
@@ -1,4 +1,6 @@
1
-export function getValue(obj: object, path: (string | number)[]): unknown {
+export type PropertyPath = (string | number)[];
2
+
3
+export function getValue(obj: object, path: PropertyPath): unknown {
4
let value: unknown = obj;
5
for (const key of path) {
6
if (typeof value === "object") {
0 commit comments