Skip to content

TypeScript error TS2351 with validator.ts  #1228

@clayroach

Description

@clayroach
jsonforms version 2.1.0
typescript 3.2.2
webpack 4.28.2
ERROR in [blah]/uiproject/node_modules/@jsonforms/core/src/util/validator.ts
ERROR in [blah]/uiproject/node_modules/@jsonforms/core/src/util/validator.ts(5,15):
TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.

To Reproduce
Compile project with webpack.

Expected behavior
No error

Proposed solution
Change import from:
import * as AJV from 'ajv';

To:
import Ajv from 'ajv';

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions