Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
menduz committed Feb 11, 2021
1 parent a7b52c1 commit fd57cf8
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 43 deletions.
3 changes: 1 addition & 2 deletions api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
* local files for library1.
*/
"bundledPackages": [
"fp-future",
"bignumber.js"
// "ajv"
],
/**
* Determines how the TypeScript compiler engine will be invoked by API Extractor.
Expand Down
76 changes: 55 additions & 21 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"refresh-api": "api-extractor run --local --verbose --diagnostics --typescript-compiler-folder ./node_modules/typescript"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.13.1",
"@types/mocha": "^8.2.0",
"@types/node": "^14.14.25",
"expect": "^26.6.2",
Expand All @@ -18,7 +19,6 @@
"typescript": "^4.1.5"
},
"dependencies": {
"@microsoft/api-extractor": "^7.13.1",
"ajv": "^7.1.0"
},
"files": [
Expand Down
15 changes: 9 additions & 6 deletions report/schemas.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@
```ts

import Ajv from 'ajv';
import { JSONSchemaType } from 'ajv';
import { ValidateFunction } from 'ajv';

// @public
export type AbstractTypedSchema<T> = {
schema: Schema<T>;
schema: JSONSchema<T>;
validate: ValidateFunction<T>;
};

export { Ajv }

// @public
export function generateValidator<T>(schema: JSONSchema<T>): ValidateFunction<T>;

// @public
export function generateValidator<T>(schema: Schema<T>): ValidateFunction<T>;
export type JSONSchema<T> = JSONSchemaType<T>;

// @alpha
export type MetaTransaction = {
Expand All @@ -25,14 +31,11 @@ export type MetaTransaction = {
// @alpha (undocumented)
export namespace MetaTransaction {
const // (undocumented)
schema: Schema<MetaTransaction>;
schema: JSONSchema<MetaTransaction>;
const // (undocumented)
validate: ValidateFunction<MetaTransaction>;
}

// @public
export type Schema<T> = JSONSchemaType<T>;

export { ValidateFunction }

// @public
Expand Down
4 changes: 2 additions & 2 deletions src/dapps/meta-transactions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { generateValidator, Schema, ValidateFunction } from "../validation"
import { generateValidator, JSONSchema, ValidateFunction } from "../validation"

/**
* Meta-transaction to be relayed
Expand All @@ -13,7 +13,7 @@ export type MetaTransaction = {
* @alpha
*/
export namespace MetaTransaction {
export const schema: Schema<MetaTransaction> = {
export const schema: JSONSchema<MetaTransaction> = {
type: "object",
properties: {
from: { type: "string" },
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// export the utils
export * from './validation'
export * from "./validation"

// export all the types
export { MetaTransaction } from './dapps/meta-transactions'
export { MetaTransaction } from "./dapps/meta-transactions"
Loading

0 comments on commit fd57cf8

Please sign in to comment.