# Introduction Followup of https://github.com/twentyhq/twenty/pull/15331 ( Reducing size by concerns ) This PR centralizes v2 format error types in `twenty-shared` and consuming them in the existing v2 error format logic in `twenty-server` ## Next This https://github.com/twentyhq/twenty/pull/15360 handles the frontend v2 format error refactor ## Conclusion Related to https://github.com/twentyhq/core-team-issues/issues/1776
7 lines
207 B
TypeScript
7 lines
207 B
TypeScript
type AssertIsDefined = <T>(value: T) => asserts value is NonNullable<T>;
|
|
|
|
export const jestExpectToBeDefined: AssertIsDefined = (value) => {
|
|
expect(value).toBeDefined();
|
|
expect(value).not.toBeNull();
|
|
};
|