Rocky_Mountain_Vending/.pnpm-store/v10/files/fd/7b345e98194a8506e3f7cd72a5dfc716365c3e5522c7da9bd51e4ff09b6b98f23fb84e53725acf712e2efaea6861d13291595aa6a1de05df3b315af7278871
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

37 lines
1 KiB
Text

import type {JsonPrimitive} from './basic';
type JsonifiableObject = {[Key in string]?: Jsonifiable} | {toJSON: () => Jsonifiable};
type JsonifiableArray = readonly Jsonifiable[];
/**
Matches a value that can be losslessly converted to JSON.
Can be used to type values that you expect to pass to `JSON.stringify`.
`undefined` is allowed in object fields (for example, `{a?: number}`) as a special case even though `JSON.stringify({a: undefined})` is `{}` because it makes this class more widely useful and checking for undefined-but-present values is likely an anti-pattern.
@example
```
import type {Jsonifiable} from 'type-fest';
// @ts-expect-error
const error: Jsonifiable = {
map: new Map([['a', 1]]),
};
JSON.stringify(error);
//=> {"map": {}}
const good: Jsonifiable = {
number: 3,
date: new Date(),
missing: undefined,
}
JSON.stringify(good);
//=> {"number": 3, "date": "2022-10-17T22:22:35.920Z"}
```
@category JSON
*/
export type Jsonifiable = JsonPrimitive | JsonifiableObject | JsonifiableArray;