Buckets:
| import { expectType, expectAssignable } from "tsd"; | |
| import slowRedact from "."; | |
| import type { redactFn, redactFnNoSerialize } from "."; | |
| // should return redactFn | |
| expectType<redactFn>(slowRedact()); | |
| expectType<redactFn>(slowRedact({ paths: [] })); | |
| expectType<redactFn>(slowRedact({ paths: ["some.path"] })); | |
| expectType<redactFn>(slowRedact({ paths: [], censor: "[REDACTED]" })); | |
| expectType<redactFn>(slowRedact({ paths: [], strict: true })); | |
| expectType<redactFn>(slowRedact({ paths: [], serialize: JSON.stringify })); | |
| expectType<redactFn>(slowRedact({ paths: [], serialize: true })); | |
| expectType<redactFnNoSerialize>(slowRedact({ paths: [], serialize: false })); | |
| expectType<redactFn>(slowRedact({ paths: [], remove: true })); | |
| // should return string | |
| expectType<string>(slowRedact()("")); | |
| // should return string or T | |
| expectAssignable<string | { someField: string }>( | |
| slowRedact()({ someField: "someValue" }) | |
| ); | |
Xet Storage Details
- Size:
- 914 Bytes
- Xet hash:
- ccac22a709ff0d54355abd8562a3d80f2ea76d55c6a142aaf83c4711b0e1970b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.