32 Commits

Author SHA1 Message Date
Som Shekhar Mukherjee
2702882aa9
Add custom processor to lint JSDoc codeblocks (#1300) 2025-11-30 04:44:57 +07:00
Som Shekhar Mukherjee
2300245cb6
Add lint rule to validate JSDoc codeblocks using TS compiler (#1265) 2025-11-12 11:52:24 +07:00
Sindre Sorhus
3ac9f35397
Add ESLint rule to ensure all source files have empty exports (#1244) 2025-09-25 22:07:24 +09:00
Sindre Sorhus
5f830b58c3 Minor tweaks 2025-09-13 16:05:22 +07:00
Gerkin
642bb133d0
Jsonify: Handle unknown as JsonValue (#1206) 2025-08-24 23:33:59 +07:00
Sindre Sorhus
a0a803bfba Move JsonValue to a separate file 2025-05-13 03:57:19 +07:00
Sindre Sorhus
cc2b0f2038 Require ESM and Node.js 20 2025-05-08 15:21:25 +07:00
m-shaka
60c10242c5
Jsonify: Convert undefined to null in union element of array (#901) 2024-07-02 14:34:46 +02:00
Haozheng Li
fe03e0a87a
Jsonify: Remove redundant conditions (#762) 2023-11-18 16:22:00 +07:00
Sindre Sorhus
f8019c2e44 Jsonify: Fix usage with readonly array
Fixes #758
2023-11-17 19:21:54 +07:00
Nicholas Rakoto
157ed07c87
Jsonify: Improve type inference for objects with .toJSON() extending primitives (#690) 2023-10-17 15:41:26 +07:00
Emiya
025f6e9db5
Jsonify: Fix handling of arrays (#673) 2023-09-30 21:32:23 +07:00
Sindre Sorhus
d743202a0a Revert "Revert "Jsonify: Fix handling of tuples (#638)""
This reverts commit 9fdac37ea5e1ea7fcc444a8df95c8eafe88dca2f.
2023-07-16 12:04:52 +02:00
Sindre Sorhus
9fdac37ea5 Revert "Jsonify: Fix handling of tuples (#638)"
This reverts commit 605b9011726e72c6ff3735ce6c864263ff5bdcb6.
2023-07-16 11:44:27 +02:00
Michaël De Boey
605b901172
Jsonify: Fix handling of tuples (#638)
Co-authored-by: Pedro Cattori <pcattori@gmail.com>
2023-07-09 13:33:48 +02:00
Tommy
4045737499
Add IsX/IfX types for any/never/unknown (#564)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2023-04-06 00:07:21 +09:00
Sindre Sorhus
8eb7bf2a54 Minor tweaks 2022-12-08 20:19:23 +01:00
Ken
88dcf0fd8f
Fix typo in code example (#524) 2022-12-08 19:59:50 +01:00
Sachin Raja
2071f47efb
Jsonify: Add jump to definition and any support (#519)
Co-authored-by: Michaël De Boey <info@michaeldeboey.be>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2022-11-28 16:00:03 +07:00
skarab42
e11d30b727
Fix Jsonify to look deeper (#498) 2022-10-19 22:42:38 +07:00
skarab42
f24821b3c7
Fix Jsonify with empty Set and Map (#497) 2022-10-19 22:41:36 +07:00
Sindre Sorhus
cca3ca2c27 Require TypeScript 4.7 and Node.js 14 2022-08-29 15:23:09 +07:00
skarab42
d83d62c966
Jsonify: Add support for optional object keys (#445) 2022-08-27 05:00:24 +07:00
Ilia Baryshnikov
8a014e5703
Jsonify: Do not downgrade tuples to arrays (#433) 2022-08-18 18:16:17 +02:00
Fatih Altinok
095831c506
Don't use BigInt (#412) 2022-06-30 19:44:13 +02:00
Fatih Altinok
8ca2959bc8
Make the Jsonify type more correct (#410) 2022-06-30 18:07:52 +02:00
Sindre Sorhus
e3234d74aa Use import type
Closes #390
2022-04-09 19:04:14 +07:00
Darcy Parker
17b0235699
Jsonify: Handle undefined in array (#310) 2022-03-30 15:56:55 +07:00
bbrk24
600f0c2486
Jsonify: Allow partial types (#312) 2022-01-06 11:45:10 +01:00
Jonah Snider
043b732bf0
Improve @category doc comments (#331) 2021-12-01 23:06:04 +07:00
Darcy Parker
09fb092617
Accept non-JSON types with .toJSON() method in Jsonify type (#257)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2021-09-10 11:07:12 +07:00
Darcy Parker
5349d27008 Add Jsonify type (#244)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2021-08-06 02:50:54 +02:00