Commit 68ac33fc authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Supprime le type JSONValue.

parent c2d6a1a7
import { Resource, JSONValue } from './resource';
import { Resource } from './resource';
/**
* Nom de la propriété contenant les resource d'une collection.
......@@ -16,7 +16,7 @@ export const COLLECTION_TOTAL_COUNT = 'hydra:totalItems';
export interface Collection<R extends Resource> {
[COLLECTION_MEMBERS]: R[];
[COLLECTION_TOTAL_COUNT]: number;
[property: string]: JSONValue;
[property: string]: any;
}
/**
......
......@@ -27,24 +27,8 @@ export interface IRI<R extends Resource> {
/**
* Resource
*/
export interface Resource extends JSONObject {
export interface Resource {
readonly [IRI_PROPERTY]: IRI<any>;
readonly [TYPE_PROPERTY]: string;
//[property: string]: JSONValue | undefined;
}
/**
* Sous-typage de valeurs JSON
*/
export type JSONValue =
| string
| IRI<any>
| number
| null
| JSONArray
| JSONObject
| Resource;
export type JSONArray = Array<JSONValue>;
export interface JSONObject {
[key: string]: JSONValue | undefined;
[property: string]: any;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment