davidmarkclements / fast-safe-stringify

Safely and quickly serialize JavaScript objects
MIT License
348 stars 27 forks source link

Typescript definition misses undefined return type #63

Open zlk89 opened 2 years ago

zlk89 commented 2 years ago

The follow example returns undefined:

import safeStringify from "fast-safe-stringify";
safeStringify(undefined) // -> returns undefined

But the type definition only specifies string as return type, we should update it to string | undefined instead.