@player-ui/types
Advanced tools
Comparing version 0.4.0-next.5 to 0.4.0-next.6
@@ -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; | ||
} | ||
} | ||
@@ -236,0 +249,0 @@ /** Namespace to wrap up core functionality to be used by the Language Service */ |
{ | ||
"name": "@player-ui/types", | ||
"version": "0.4.0-next.5", | ||
"version": "0.4.0-next.6", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -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; | ||
} | ||
} | ||
@@ -311,0 +327,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
412285
38
7419
1