Skip to content

Migration (v3 to v4)

Λlisue (Ali sue・ありすえ) edited this page Aug 3, 2024 · 4 revisions

Details

  • Use alternative functions of deprecated functions
    • is.RecordLike to is.Record
    • is.RecordLikeOf(...) to is.RecordOf(...)
    • is.ReadonlyTupleOf(...) to is.ReadonlyOf(is.TupleOf(...))
    • is.ReadonlyUniformTupleOf(...) to is.ReadonlyOf(is.UniformTupleOf(...))
    • is.ObjectOf(..., { strict: true }) to is.StrictOf(is.ObjectOf(...))
    • is.OneOf(...) to is.UnionOf(...)
    • is.AllOf(...) to is.IntersectionOf(...)
  • Rename is.BigInt(...) to is.Bigint(...)
  • Rename is.OptionalOf(...) to as.Optional(...)
  • Remove obsolete functions/types
    • isReadonly
    • isUnwrapReadonlyOf
    • getMetadata
    • getPredicateFactoryMetadata
    • setPredicateFactoryMetadata
    • GetMetadata
    • WithMetadata
    • PredicateFactoryMetadata

Migration script

  1. Update jsr:@core/unknownutil@^3.0.0 to jsr:@core/unknownutil@^4.0.0 in import map
  2. Execute deno run -A https://gist.githubusercontent.com/lambdalisue/cd173d1f7e9787ed9842a9f1c51f48fe/raw/unknownutil-v3-to-v4-migration.ts (Check the code in gist)
Clone this wiki locally