Releases: uhyo/better-typescript-lib
Releases Β· uhyo/better-typescript-lib
v2.9.0
v2.8.0
What's Changed
- fix: tighten up Object.values and Object.entries types by @uhyo in #42
- fix: improve
NodeListOf<T>
#item return type to include null by @uhyo in #44 - feat: upgrade to TS 5.5 by @uhyo in #45
Full Changelog: v2.7.0...v2.8.0
Breaking Change to Object.entries
and Object.values
#42 changed the types of Object.entries
and Object.values
in a backwards-incompatible way. This had to be done because previous typing was too permissive and unsafe.
The change can be observed in cases like below:
// Previously number[], now unknown[]
const values = Object.values({ foo: 123 });
To recover the previous behavior, you need to give a Record<string, T>
type to your object.
const obj: Record<string, number> = { foo: 123 };
// still number[]
const values = Object.values(obj);
Also, we recommend migrating out from Object.values
and Object.entries
if possible. Map
should be a good alternative for many use cases.
See also: #46
v2.7.0
v2.6.0
Full Changelog: v2.5.0...v2.6.0
v2.5.0
Full Changelog: v2.4.0...v2.5.0
- Upgraded TypeScript to 5.2.
This release suppresses any
from new SuppressedError
in lib.esnext.disposable.d.ts
π₯³
v2.4.0
Full Changelog: v2.3.1...v2.4.0
- Upgrade TypeScript to
5.1.3
v2.3.1
v2.3.0
What's Changed
- docs: description for use with pnpm by @tksst in #22
- π₯ Add strong types for
JSON.parse
andJSON.stringify
by @aaditmshah in #25 - build: upgrade Node.js version and other dependencies on CI by @uhyo in #27
- π₯ Add strong type definition for
fetch().json()
by @aaditmshah in #26 - π₯ Add better type definitions for promises by @aaditmshah in #28
New Contributors
- @tksst made their first contribution in #22
- @aaditmshah made their first contribution in #25
Full Changelog: v2.2.1...v2.3.0
v2.2.1
v2.2.0
- Upgraded TypeScript to
4.9.3
. - Several Improvements (#10)
- Improved typing of TypedArrays. (#12)
- Improved
Function#bind
and severalObject
method typings. (#16) - Improved
Object#hasOwnProperty
andObject.hasOwn
typings. (#13) - Removed type guards from
Number
static methods because they affected soundness. (#14)