Skip to content

Commit

Permalink
chore: changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Dec 21, 2023
1 parent 5e91833 commit a046603
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/chatty-onions-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hiogawa/utils": patch
---

Fix `objectMapValues` mapped type
14 changes: 11 additions & 3 deletions packages/utils/src/lodash.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import {
afterEach,
beforeEach,
describe,
expect,
expectTypeOf,
it,
vi,
} from "vitest";
import { LruCache } from "./cache";
import {
capitalize,
Expand Down Expand Up @@ -458,11 +466,11 @@ describe(`${objectMapValues.name}/${objectMapKeys.name}`, () => {
};
{
const result = objectMapValues(o, (v, k) => (v ? k.repeat(v) : "bad-v"));
result satisfies {
expectTypeOf(result).toEqualTypeOf<{
x: string;
y?: string;
z?: string;
};
}>();
expect(result).toMatchInlineSnapshot(`
{
"x": "xxx",
Expand Down

0 comments on commit a046603

Please sign in to comment.