Skip to content

Commit

Permalink
add types
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Apr 8, 2019
1 parent b467a51 commit 351582f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare function Omit<T, K extends keyof T>(
obj: T,
keys: K[]
): Record<Exclude<keyof T, K>, {}>;

export default Omit;
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
"description": "Utility function to create a shallow copy of an object which had dropped some fields.",
"main": "lib/index.js",
"module": "es/index.js",
"types": "index.d.ts",
"files": [
"lib",
"es",
"dist"
"dist",
"index.d.ts"
],
"scripts": {
"compile": "rc-tools run compile --babel-runtime",
Expand Down

0 comments on commit 351582f

Please sign in to comment.