@suchipi/ts-json-utils
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@suchipi/ts-json-utils

Utility types for describing JSON values in TypeScript

Exports

Types

  • JSONValue (type for any value which is valid in JSON)
  • JSONObject (type for object with string/number keys and JSONValue values)
  • JSONArray (type for array of JSONValue)
  • JSONPrimitive (type for all non-composite values which are valid in JSON)

Functions

  • parse (re-export of JSON.parse, but typed as returning JSONValue instead of any)
  • stringify (re-export of JSON.stringify, but typed as accepting JSONValue instead of any)

Installation

npm install --save-dev @suchipi/ts-json-utils

License

MIT

Package Sidebar

Install

npm i @suchipi/ts-json-utils

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

6.62 kB

Total Files

10

Last publish

Collaborators

  • suchipi