From a4714f326c8c136af90a04471d268e9b35793b91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr>
Date: Tue, 7 Jul 2020 10:33:37 +0200
Subject: [PATCH] [ivette] better api doc

---
 ivette/src/dome/src/renderer/data/json.ts | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/ivette/src/dome/src/renderer/data/json.ts b/ivette/src/dome/src/renderer/data/json.ts
index 195aec66a84..ba0be2fc66f 100644
--- a/ivette/src/dome/src/renderer/data/json.ts
+++ b/ivette/src/dome/src/renderer/data/json.ts
@@ -52,17 +52,23 @@ export function pretty(js: any) {
 
 /** Decoder for values of type `D`.
     You can abbreviate `Safe<D | undefined>` with `Loose<D>`. */
-export type Safe<D> = (js?: json) => D;
+export interface Safe<D> {
+  (js?: json): D;
+}
 
 /** Decoder for values of type `D`, if any.
     Same as `Safe<D | undefined>`. */
-export type Loose<D> = (js?: json) => D | undefined;
+export interface Loose<D> {
+  (js?: json): D | undefined;
+}
 
 /**
    Encoder for value of type `D`.
    In most cases, you only need [[identity]].
  */
-export type Encoder<D> = (v: D) => json;
+export interface Encoder<D> {
+  (v: D): json;
+}
 
 /** Can be used for most encoders. */
 export function identity<A>(v: A): A { return v; };
-- 
GitLab