···11+export { NormalizedCache } from './store.js';
22+export type { NormalizedCacheOptions } from './store.js';
33+export type { EntityDefinition, EntitySubscriber, EntityTypeId, TypeSubscriber } from './types.js';
+39
packages/clients/cache/lib/predicates.ts
···11+import type {
22+ ArraySchema,
33+ BaseSchema,
44+ LiteralSchema,
55+ NullableSchema,
66+ ObjectSchema,
77+ OptionalSchema,
88+ VariantSchema,
99+} from '@atcute/lexicons/validations';
1010+1111+/** check if schema is an object schema */
1212+export const isObjectSchema = (schema: BaseSchema): schema is ObjectSchema => {
1313+ return schema.type === 'object';
1414+};
1515+1616+/** check if schema is an array schema */
1717+export const isArraySchema = (schema: BaseSchema): schema is ArraySchema => {
1818+ return schema.type === 'array';
1919+};
2020+2121+/** check if schema is a variant schema */
2222+export const isVariantSchema = (schema: BaseSchema): schema is VariantSchema => {
2323+ return schema.type === 'variant';
2424+};
2525+2626+/** check if schema is an optional schema */
2727+export const isOptionalSchema = (schema: BaseSchema): schema is OptionalSchema => {
2828+ return schema.type === 'optional';
2929+};
3030+3131+/** check if schema is a nullable schema */
3232+export const isNullableSchema = (schema: BaseSchema): schema is NullableSchema => {
3333+ return schema.type === 'nullable';
3434+};
3535+3636+/** check if schema is a literal schema */
3737+export const isLiteralSchema = (schema: BaseSchema): schema is LiteralSchema => {
3838+ return schema.type === 'literal';
3939+};