From 85d009ef1bfe542fef89af639381d5ac0258f843 Mon Sep 17 00:00:00 2001 From: Alisue Date: Sat, 3 Aug 2024 07:14:22 +0900 Subject: [PATCH] :package: Update unknownutil to v4 --- error.ts | 2 +- plugin.ts | 8 ++++---- runner.ts | 2 +- with.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/error.ts b/error.ts index d119d4b..ee44998 100644 --- a/error.ts +++ b/error.ts @@ -1,4 +1,4 @@ -import { is } from "jsr:@core/unknownutil@3.18.0"; +import { is } from "jsr:@core/unknownutil@^4.0.0"; import { fromErrorObject, isErrorObject, diff --git a/plugin.ts b/plugin.ts index 4a54833..4dba380 100644 --- a/plugin.ts +++ b/plugin.ts @@ -1,5 +1,5 @@ import type { Denops } from "jsr:@denops/core@7.0.0"; -import { assert, ensure, is } from "jsr:@core/unknownutil@3.18.0"; +import { assert, ensure, as, is } from "jsr:@core/unknownutil@^4.0.0"; import { Client, Session } from "jsr:@lambdalisue/messagepack-rpc@2.1.1"; import { errorDeserializer, errorSerializer } from "./error.ts"; @@ -70,7 +70,7 @@ function invoke( } } -const isRedrawArgs = is.TupleOf([is.OptionalOf(is.Boolean)] as const); +const isRedrawArgs = is.TupleOf([as.Optional(is.Boolean)] as const); const isCallArgs = (v: unknown): v is [string, ...unknown[]] => { return is.Array(v) && is.String(v[0]); @@ -78,9 +78,9 @@ const isCallArgs = (v: unknown): v is [string, ...unknown[]] => { const isBatchArgs = is.ArrayOf(isCallArgs); -const isCmdArgs = is.TupleOf([is.String, is.OptionalOf(is.Record)] as const); +const isCmdArgs = is.TupleOf([is.String, as.Optional(is.Record)] as const); -const isEvalArgs = is.TupleOf([is.String, is.OptionalOf(is.Record)] as const); +const isEvalArgs = is.TupleOf([is.String, as.Optional(is.Record)] as const); const isDispatchArgs = (v: unknown): v is [string, string, ...unknown[]] => { return is.Array(v) && is.String(v[0]) && is.String(v[1]); diff --git a/runner.ts b/runner.ts index 5ff6d9b..35ede94 100644 --- a/runner.ts +++ b/runner.ts @@ -1,5 +1,5 @@ import { mergeReadableStreams } from "jsr:@std/streams@0.224.5/merge-readable-streams"; -import { is } from "jsr:@core/unknownutil@3.18.0"; +import { is } from "jsr:@core/unknownutil@^4.0.0"; import { unreachable } from "jsr:@lambdalisue/errorutil@1.0.0"; import { type Config, getConfig } from "./conf.ts"; diff --git a/with.ts b/with.ts index c73c7e1..dfa29b5 100644 --- a/with.ts +++ b/with.ts @@ -1,5 +1,5 @@ import { deadline } from "jsr:@std/async@1.0.0/deadline"; -import { assert, is } from "jsr:@core/unknownutil@3.18.0"; +import { assert, is } from "jsr:@core/unknownutil@^4.0.0"; import { Client, Session } from "jsr:@lambdalisue/messagepack-rpc@2.1.1"; import type { Denops, Meta } from "jsr:@denops/core@7.0.0"; import { getConfig } from "./conf.ts";