@@ -21,42 +21,40 @@ import Integer from './integer.ts'
21
21
import { Point } from './spatial-types.ts'
22
22
import { DateTime , Duration , LocalDateTime , LocalTime , Time } from './temporal-types.ts'
23
23
24
-
25
24
/**
26
25
* Defines methods for hydrate and dehydrate objects
27
- *
26
+ *
28
27
* @interface
29
28
*/
30
29
export class HydatrationHooks {
31
- public readonly Duration ?: < V extends unknown > ( duration : Duration ) => V
32
- public readonly LocalTime ?: < V extends unknown > ( localTime : LocalTime ) => V
33
- public readonly LocalDateTime ?: < V extends unknown > ( localDateTime : LocalDateTime ) => V
34
- public readonly Time ?: < V extends unknown > ( time : Time ) => V
35
- public readonly Date ?: < V extends unknown > ( date : Date ) => V
36
- public readonly DateTime ?: < V extends unknown > ( dateTime : DateTime ) => V
37
- public readonly Integer ?: < V extends unknown > ( integer : Integer ) => V
38
- public readonly Point ?: < V extends unknown > ( point : Point ) => V
39
-
40
- constructor ( ) {
41
- throw new Error ( 'This class should not be instantiated' )
42
- }
30
+ public readonly Duration ?: < V extends unknown > ( duration : Duration ) => V
31
+ public readonly LocalTime ?: < V extends unknown > ( localTime : LocalTime ) => V
32
+ public readonly LocalDateTime ?: < V extends unknown > ( localDateTime : LocalDateTime ) => V
33
+ public readonly Time ?: < V extends unknown > ( time : Time ) => V
34
+ public readonly Date ?: < V extends unknown > ( date : Date ) => V
35
+ public readonly DateTime ?: < V extends unknown > ( dateTime : DateTime ) => V
36
+ public readonly Integer ?: < V extends unknown > ( integer : Integer ) => V
37
+ public readonly Point ?: < V extends unknown > ( point : Point ) => V
38
+
39
+ constructor ( ) {
40
+ throw new Error ( 'This class should not be instantiated' )
41
+ }
43
42
}
44
43
45
44
export class DehytrationHook < I = unknown , O = unknown > {
46
-
47
- constructor ( ) {
48
- throw new Error ( 'This class should not be instantiated' )
49
- }
45
+ constructor ( ) {
46
+ throw new Error ( 'This class should not be instantiated' )
47
+ }
50
48
51
- public isTypeInstance ( value : unknown ) : value is I {
52
- throw new Error ( 'Not Implemented' )
53
- }
49
+ public isTypeInstance ( value : unknown ) : value is I {
50
+ throw new Error ( 'Not Implemented' )
51
+ }
54
52
55
- public dehydrate ( value : I ) : O {
56
- throw new Error ( 'Not Implemented' )
57
- }
53
+ public dehydrate ( value : I ) : O {
54
+ throw new Error ( 'Not Implemented' )
55
+ }
58
56
}
59
57
60
58
export type DehydrationHooks = DehytrationHook [ ]
61
59
// bytes |> unpack |> fromStructure |> hydrate
62
- // type |> dehydrate |> toStructure |> pack
60
+ // type |> dehydrate |> toStructure |> pack
0 commit comments