Skip to content

Commit

Permalink
Convert utils to typescript (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuykendall authored Jun 23, 2019
1 parent ed79715 commit 0c7ba35
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion __tests__/Utils-spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import utils from './../src/utils.js';
import utils from '../src/utils';

describe('Utils', () => {
it('should check equality of objects and arrays', () => {
Expand Down
4 changes: 2 additions & 2 deletions dist/formsy-react.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/formsy-react.cjs.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/formsy-react.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/formsy-react.esm.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/formsy-react.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/formsy-react.umd.js.map

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions dist/utils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare const _default: {
arraysDiffer(a: any, b: any): boolean;
objectsDiffer(a: any, b: any): boolean;
isSame(a: any, b: any): boolean;
find(collection: any, fn: any): any;
runRules(value: any, currentValues: any, validations: any, validationRules: any): {
errors: any[];
failed: any[];
success: any[];
};
};
export default _default;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",
"@types/prop-types": "^15.7.1",
"@types/react": "^16.8.22",
"auto-changelog": "^1.13.0",
"babel-eslint": "^10.0.2",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==

"@types/prop-types@*":
"@types/prop-types@*", "@types/prop-types@^15.7.1":
version "15.7.1"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.1.tgz#f1a11e7babb0c3cad68100be381d1e064c68f1f6"
integrity sha512-CFzn9idOEpHrgdw8JsoTkaDDyRWk1jrzIV8djzcgpq0y9tG4B4lFT+Nxh52DVpDXV+n4+NPNv7M1Dj5uMp6XFg==
Expand Down

0 comments on commit 0c7ba35

Please sign in to comment.