Skip to content

Commit abf5140

Browse files
authored
Merge pull request #36 from andnp/greenkeeper/simplytyped-2.0.0
Update simplytyped to the latest version 🚀
2 parents 6765453 + 0e43896 commit abf5140

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
},
5555
"dependencies": {
5656
"ajv": "^6.5.0",
57-
"simplytyped": "^1.0.5",
57+
"simplytyped": "^2.0.0",
58+
"tslib": "^1.9.3",
5859
"type-level-schema": "^1.3.2"
5960
},
6061
"repository": {

src/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { objectKeys, Nominal, AnyFunc, AllRequired, Optional, Unknown, PlainObject, Omit } from 'simplytyped';
1+
import { objectKeys, Nominal, AnyFunc, AllRequired, Optional, PlainObject, Omit } from 'simplytyped';
22
import * as Ajv from 'ajv';
33

44
// Schema definitions
@@ -152,7 +152,7 @@ export class Validator<T> {
152152
* if (userModel.isValid(x)) doThing(x);
153153
* ```
154154
*/
155-
isValid(thing: Unknown): thing is T {
155+
isValid(thing: unknown): thing is T {
156156
const ajvValidator = this.getCompiledSchema();
157157

158158
return ajvValidator(thing) as boolean;
@@ -174,7 +174,7 @@ export class Validator<T> {
174174
* else logger.error(...result.errors);
175175
* ```
176176
*/
177-
validate(data: Unknown): ValidResult<T> | InvalidResult {
177+
validate(data: unknown): ValidResult<T> | InvalidResult {
178178
if (this.isValid(data)) {
179179
return { data, valid: true };
180180
}

0 commit comments

Comments
 (0)