Skip to content

Commit

Permalink
Fix lint issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemikolh authored Jan 29, 2021
1 parent 25b2693 commit a7a4d66
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 0.4.6

No API changes

# Version 0.4.5

* Add support for dictionaries: arbitrary keys with a validated type.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typesafe-schema",
"version": "0.4.5",
"version": "0.4.6",
"description": "Validate your data and get a well typed value out of it!",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ function validateObject<T extends Any>(value: any, schema: T, path: string, stri
if (typeofVal !== 'object') {
return error(path, `Expected dictionary (object) got '${typeofVal}'`);
}
// tslint:disable-next-line: forin
for (const prop in value) {
const res = validateObject(value[prop], schema.elementSchema, path + '[' + prop + ']', strict);
if (res.type === 'error') {
Expand Down

0 comments on commit a7a4d66

Please sign in to comment.