Skip to content

Commit

Permalink
📦 Update unknownutil to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Aug 3, 2024
1 parent 82cd32d commit 10f2de0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion error.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
8 changes: 4 additions & 4 deletions plugin.ts
Original file line number Diff line number Diff line change
@@ -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 { as, assert, ensure, 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";

Expand Down Expand Up @@ -70,17 +70,17 @@ 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]);
};

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]);
Expand Down
2 changes: 1 addition & 1 deletion runner.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion with.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down

0 comments on commit 10f2de0

Please sign in to comment.