@clickup/ent-framework
Version:
A PostgreSQL graph-database-alike library with microsharding and row-level security
15 lines • 660 B
TypeScript
/**
* A tool to verify integrity of custom field types. It is meant to be called
* from Jest expect(). The helper runs dbValueToJs, stringify and parse methods
* on the type and makes sure that parse() is the opposite of stringify(). The
* returned object can then be compared against a Jest snapshot.
*/
export declare function testSpecTypeIntegrity<TDBValue, TJsValue>(SpecType: {
dbValueToJs: (dbValue: TDBValue) => TJsValue;
stringify: (jsValue: TJsValue) => string;
parse: (str: string) => TJsValue;
}, dbValue: TDBValue): {
jsValueDecoded: TJsValue;
stringifiedBack: string;
};
//# sourceMappingURL=testSpecTypeIntegrity.d.ts.map