Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
892 bytes
|
Line | |
---|
1 | import type { ErrorObject, AnySchemaObject } from "../../types";
|
---|
2 | import type { SchemaObjCxt } from "..";
|
---|
3 | import { JSONType } from "../rules";
|
---|
4 | import { Code, Name } from "../codegen";
|
---|
5 | export declare enum DataType {
|
---|
6 | Correct = 0,
|
---|
7 | Wrong = 1
|
---|
8 | }
|
---|
9 | export declare function getSchemaTypes(schema: AnySchemaObject): JSONType[];
|
---|
10 | export declare function getJSONTypes(ts: unknown | unknown[]): JSONType[];
|
---|
11 | export declare function coerceAndCheckDataType(it: SchemaObjCxt, types: JSONType[]): boolean;
|
---|
12 | export declare function checkDataType(dataType: JSONType, data: Name, strictNums?: boolean | "log", correct?: DataType): Code;
|
---|
13 | export declare function checkDataTypes(dataTypes: JSONType[], data: Name, strictNums?: boolean | "log", correct?: DataType): Code;
|
---|
14 | export declare type TypeError = ErrorObject<"type", {
|
---|
15 | type: string;
|
---|
16 | }>;
|
---|
17 | export declare function reportTypeError(it: SchemaObjCxt): void;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.