Skip to content

Commit

Permalink
refactor(@tossteam/utils): Use @toss/utility-types for ElementType
Browse files Browse the repository at this point in the history
  • Loading branch information
raon0211 committed May 31, 2024
1 parent e95595c commit 0638216
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 43 deletions.
75 changes: 38 additions & 37 deletions .pnp.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/common/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
},
"dependencies": {
"@babel/runtime": "^7.14.8",
"@toss/utility-types": "workspace:^",
"date-fns": "^2.25.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/common/utils/src/object/omit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @tossdocs-ignore */
import { ElementType } from '@toss/utility-types';
import { ObjectKeys, objectKeys } from './object-keys';
import { ElementType } from './types';

export function omit<ObjectType extends Record<PropertyKey, any>, KeyTypes extends Array<ObjectKeys<ObjectType>>>(
obj: ObjectType,
Expand Down
2 changes: 1 addition & 1 deletion packages/common/utils/src/object/pick.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @tossdocs-ignore */
import { ElementType } from './types';
import { ElementType } from '@toss/utility-types';

export function pick<ObjectType extends Record<PropertyKey, any>, KeyTypes extends Array<keyof ObjectType>>(
obj: ObjectType,
Expand Down
3 changes: 0 additions & 3 deletions packages/common/utils/src/object/types.ts

This file was deleted.

4 changes: 3 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5617,6 +5617,7 @@ __metadata:
"@testing-library/jest-dom": "npm:^5.16.4"
"@testing-library/react": "npm:^13.3.0"
"@toss/jest": "workspace:^"
"@toss/react": "workspace:^1.7.0"
"@toss/rollup-config": "workspace:^0.2.0"
"@toss/utils": "workspace:^1.5.0"
"@types/babel__core": "npm:^7"
Expand Down Expand Up @@ -6228,7 +6229,7 @@ __metadata:
languageName: unknown
linkType: soft

"@toss/utility-types@workspace:packages/common/utility-types":
"@toss/utility-types@workspace:^, @toss/utility-types@workspace:packages/common/utility-types":
version: 0.0.0-use.local
resolution: "@toss/utility-types@workspace:packages/common/utility-types"
dependencies:
Expand Down Expand Up @@ -6262,6 +6263,7 @@ __metadata:
"@rollup/plugin-node-resolve": "npm:^13.3.0"
"@toss/jest": "workspace:^"
"@toss/rollup-config": "workspace:^0.2.0"
"@toss/utility-types": "workspace:^"
"@types/babel__core": "npm:^7"
"@types/babel__preset-env": "npm:^7"
"@types/jest": "npm:^28.1.8"
Expand Down

0 comments on commit 0638216

Please sign in to comment.