Skip to content

Conversation

@lambdalisue
Copy link
Member

@lambdalisue lambdalisue commented Sep 23, 2023

Before

error: Uncaught AssertError: Expected a value that satisfies the predicate anonymous predicate, got object: {
  "tile": "Awesome article",
  "body": "This is an awesome article",
  "refs": [
    {
      "name": "Deno",
      "url": "https://deno.land/"
    },
    "https://github.com"
  ]
}
    throw new AssertError(
          ^
    at assert (file:///Users/alisue/ghq/github.com/lambdalisue/deno-unknownutil/util.ts:85:11)
    at file:///Users/alisue/ghq/github.com/lambdalisue/test.ts:22:1

After

error: Uncaught AssertError: Expected a value that satisfies the predicate isObjectOf({
  title: isString,
  body: isString,
  refs: isArrayOf(isOneOf([
    isString,
    isObjectOf({
      name: isString,
      url: isString
    })
  ]))
}), got object: {
  "tile": "Awesome article",
  "body": "This is an awesome article",
  "refs": [
    {
      "name": "Deno",
      "url": "https://deno.land/"
    },
    "https://github.com"
  ]
}
    throw new AssertError(
          ^
    at assert (file:///Users/alisue/ghq/github.com/lambdalisue/deno-unknownutil/util.ts:85:11)
    at file:///Users/alisue/ghq/github.com/lambdalisue/test.ts:22:1

@lambdalisue lambdalisue force-pushed the predicate-name branch 3 times, most recently from 2567cf9 to 88b582e Compare September 23, 2023 14:11
@lambdalisue lambdalisue merged commit 019fd38 into main Sep 23, 2023
@lambdalisue lambdalisue deleted the predicate-name branch September 23, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants