Skip to content

Instantly share code, notes, and snippets.

View MaxMonteil's full-sized avatar
🏠
Working from home

MaxMonteil

🏠
Working from home
View GitHub Profile
@MaxMonteil
MaxMonteil / jsonPatch.ts
Created August 23, 2025 12:14
TS typed JSON Patch RFC 6902
/**
* Type definitions for JSON Patch, based on RFC 6902:
* https://datatracker.ietf.org/doc/html/rfc6902
*
* This file defines the TypeScript types for JSON Patch operations
* (`add`, `remove`, `replace`, `move`, `copy`, `test`) and JSON Patch
* documents. These types are intended to ensure type safety when
* constructing or working with JSON Patch structures.
*
* @see RFC 6902 (JSON Patch): https://datatracker.ietf.org/doc/html/rfc6902