Skip to content

Commit

Permalink
feat(key): rename property key to key
Browse files Browse the repository at this point in the history
  • Loading branch information
TomokiMiyauci committed May 25, 2023
1 parent dc97964 commit dcc3d4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions combinator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { type Display } from "./types.ts";
import { getCount } from "./iter_utils.ts";
import { bind, interpolate, shouldBe, shouldBeBut } from "./utils.ts";
import { PropertyKeyValidator } from "./validators/key.ts";
import { KeyValidator } from "./validators/key.ts";
import { RangeValidator } from "./validators/range.ts";
import { FixedArrayValidator } from "./validators/array/fixed_array.ts";
import { DictionaryValidator } from "./validators/object/dictionary.ts";
Expand Down Expand Up @@ -91,7 +91,7 @@ export const between = /* @__PURE__ */ lazy(
);

// known
export const propertyKey = /* @__PURE__ */ lazy(PropertyKeyValidator);
export const key = /* @__PURE__ */ lazy(KeyValidator);

// Array
export const fixedArray = /* @__PURE__ */ lazy(FixedArrayValidator);
Expand Down
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export {
int32,
int8,
item,
key,
lt,
lte,
maxCount,
Expand All @@ -48,7 +49,6 @@ export {
or,
pattern,
positive,
propertyKey,
string,
type,
uint16,
Expand Down
2 changes: 1 addition & 1 deletion validators/key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { curryR, fromPath } from "../utils.ts";
import { map } from "../iter_utils.ts";
import { type ValidationFailure, Validator } from "../types.ts";

export class PropertyKeyValidator<In_ extends string = string>
export class KeyValidator<In_ extends string = string>
implements Validator<{}, Record<In_, unknown>> {
validator: Validator<string>;

Expand Down

0 comments on commit dcc3d4d

Please sign in to comment.