Skip to content

Commit 0e43896

Browse files
committed
fix: update to simplytyped@2.0.0
1 parent 345fb23 commit 0e43896

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"dependencies": {
5656
"ajv": "^6.5.0",
5757
"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)