2024-05-15 18:55:05 +10:00
|
|
|
/**
|
|
|
|
|
* Below type is borrowed from Trigger.dev's SDK, it may be moved elsewhere later.
|
|
|
|
|
*/
|
|
|
|
|
|
2024-05-16 15:44:39 +10:00
|
|
|
export type JsonPrimitive = string | number | boolean | null | undefined | Date | symbol;
|
2024-05-15 18:55:05 +10:00
|
|
|
|
2024-05-16 15:44:39 +10:00
|
|
|
export type JsonArray = Json[];
|
2024-05-15 18:55:05 +10:00
|
|
|
|
2024-05-16 15:44:39 +10:00
|
|
|
export type JsonRecord<T> = {
|
2024-05-15 18:55:05 +10:00
|
|
|
[Property in keyof T]: Json;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2024-05-16 15:44:39 +10:00
|
|
|
export type Json<T = any> = JsonPrimitive | JsonArray | JsonRecord<T>;
|