@player-ui/types
Advanced tools
Comparing version 0.4.0 to 0.4.1-next.0
@@ -206,4 +206,5 @@ /** | ||
/** Each property describes a property of the object */ | ||
[key: string]: DataType; | ||
[key: string]: DataTypes; | ||
} | ||
type DataTypes = DataType | RecordType | ArrayType; | ||
/** Each prop in the object can have a specific DataType */ | ||
@@ -213,4 +214,2 @@ interface DataType<T = unknown> { | ||
type: string; | ||
/** The referenced object represents an array rather than an object */ | ||
isArray?: boolean; | ||
/** | ||
@@ -234,2 +233,16 @@ * Any additional validations that are associated with this property | ||
} | ||
/** Determines if the Datatype is a record object */ | ||
interface RecordType extends DataType { | ||
/** boolean to define if its a record */ | ||
isRecord: boolean; | ||
/** This property is mutually exclusive with RecordType and can not be used with ArrayType */ | ||
isArray?: never; | ||
} | ||
/** Determines if the DataType is an Array Object */ | ||
interface ArrayType extends DataType { | ||
/** boolean to define if its an array */ | ||
isArray: boolean; | ||
/** This property is mutually exclusive with ArrayType and can not be used with RecordType */ | ||
isRecord?: never; | ||
} | ||
} | ||
@@ -300,2 +313,10 @@ /** Namespace to wrap up core functionality to be used by the Language Service */ | ||
displayTarget?: DisplayTarget; | ||
/** | ||
* If the validation blocks navigation | ||
* true/false - always/never block navigation | ||
* once - only block navigation if the validation has not been triggered before | ||
* | ||
* @default - true for errors, 'once' for warnings | ||
*/ | ||
blocking?: boolean | 'once'; | ||
/** Additional props to send down to a Validator */ | ||
@@ -302,0 +323,0 @@ [key: string]: unknown; |
{ | ||
"name": "@player-ui/types", | ||
"version": "0.4.0", | ||
"version": "0.4.1-next.0", | ||
"private": false, | ||
@@ -53,4 +53,12 @@ "publishConfig": { | ||
"url": "https://github.com/kharrop" | ||
}, | ||
{ | ||
"name": "Alejandro Fimbres", | ||
"url": "https://github.com/lexfm" | ||
}, | ||
{ | ||
"name": "Rafael Campos", | ||
"url": "https://github.com/rafbcampos" | ||
} | ||
] | ||
} |
@@ -275,5 +275,7 @@ /** | ||
/** Each property describes a property of the object */ | ||
[key: string]: DataType; | ||
[key: string]: DataTypes; | ||
} | ||
export type DataTypes = DataType | RecordType | ArrayType; | ||
/** Each prop in the object can have a specific DataType */ | ||
@@ -284,5 +286,2 @@ export interface DataType<T = unknown> { | ||
/** The referenced object represents an array rather than an object */ | ||
isArray?: boolean; | ||
/** | ||
@@ -309,2 +308,19 @@ * Any additional validations that are associated with this property | ||
} | ||
/** Determines if the Datatype is a record object */ | ||
export interface RecordType extends DataType { | ||
/** boolean to define if its a record */ | ||
isRecord: boolean; | ||
/** This property is mutually exclusive with RecordType and can not be used with ArrayType */ | ||
isArray?: never; | ||
} | ||
/** Determines if the DataType is an Array Object */ | ||
export interface ArrayType extends DataType { | ||
/** boolean to define if its an array */ | ||
isArray: boolean; | ||
/** This property is mutually exclusive with ArrayType and can not be used with RecordType */ | ||
isRecord?: never; | ||
} | ||
} | ||
@@ -388,2 +404,11 @@ | ||
/** | ||
* If the validation blocks navigation | ||
* true/false - always/never block navigation | ||
* once - only block navigation if the validation has not been triggered before | ||
* | ||
* @default - true for errors, 'once' for warnings | ||
*/ | ||
blocking?: boolean | 'once'; | ||
/** Additional props to send down to a Validator */ | ||
@@ -390,0 +415,0 @@ [key: string]: unknown; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
426370
38
7598
1