Skip to content

Commit

Permalink
Added PickPartial type
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiglesias93 committed Apr 27, 2021
1 parent 2d16c06 commit 9dc3740
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@finsweet/ts-utils",
"version": "0.3.0",
"version": "0.4.0",
"description": "Typescript utils for custom Webflow projects.",
"main": "index.ts",
"module": "index.ts",
Expand Down
6 changes: 6 additions & 0 deletions types/PickPartial.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* The picked keys will become Partial and the rest of the interface will stay the same.
*/
type PickPartial<Object, Keys extends keyof Object> = Omit<Object, Keys> & Partial<Pick<Object, Keys>>;

export default PickPartial;
1 change: 1 addition & 0 deletions types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export { default as Entry } from './Entry';
export { default as FormField } from './FormField';
export { default as Instance } from './Instance';
export { default as PartialExcept } from './PartialExcept';
export { default as PickPartial } from './PickPartial';
export { default as Webflow } from './Webflow';

0 comments on commit 9dc3740

Please sign in to comment.