Skip to content

Commit 9626ff5

Browse files
authored
Merge pull request #136 from bananaumai/add-readme-annotation-for-ts
[suggestion] chore: add annotation typescript usage in README
2 parents 6ed7993 + 0709254 commit 9626ff5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ This module requires definitions of `AsyncIterator` and whatwg streams, which is
489489

490490
For the TypeScript version, the latest TypeScript is tested in development, but older versions of TypeScript might be able to compile this module.
491491

492+
We also recommend enabling `strict` mode (or `strictNullCheck` mode at least). Specifically when you use `ExtensionCodec` with the ContextType that you defines, the type checking for `EncodeOptions` argument of `encode` function and `DecodeOptions` arugument of `decode` function will fail because ts compiler cannot infer the `EncodeOptions`/`DecodeOptions` generic type appropriately unless `strictNullChecks` property is set to be `true` in `tsconfig.json`.
493+
492494
## Benchmark
493495

494496
Run-time performance is not the only reason to use MessagePack, but it's important to choose MessagePack libraries, so a benchmark suite is provided to monitor the performance of this library.

0 commit comments

Comments
 (0)