WIP stripe customer metedada sync (#3153)
This commit is contained in:
1 parent
a7212660a4
commit
2c30976e99
3 files changed
+41
-1
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import isPrismaObj from "./isPrismaObj";
|
||||
|
||||
const hasKeyInMetadata = <T extends string>(
|
||||
x: { metadata: unknown } | null,
|
||||
key: T
|
||||
): x is { metadata: { [key in T]: string | boolean | number } } =>
|
||||
isPrismaObj(x?.metadata) && !!x?.metadata && key in x.metadata;
|
||||
|
||||
export default hasKeyInMetadata;
|
||||
Reference in new issue
Block a user