Skip to content

Commit a889c03

Browse files
committed
Sync deno
1 parent 5ee5d08 commit a889c03

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

packages/neo4j-driver-deno/lib/core/mapping.ts

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,40 @@ import Integer from './integer.ts'
2121
import { Point } from './spatial-types.ts'
2222
import { DateTime, Duration, LocalDateTime, LocalTime, Time } from './temporal-types.ts'
2323

24-
2524
/**
2625
* Defines methods for hydrate and dehydrate objects
27-
*
26+
*
2827
* @interface
2928
*/
3029
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+
}
4342
}
4443

4544
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+
}
5048

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+
}
5452

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+
}
5856
}
5957

6058
export type DehydrationHooks = DehytrationHook[]
6159
// bytes |> unpack |> fromStructure |> hydrate
62-
// type |> dehydrate |> toStructure |> pack
60+
// type |> dehydrate |> toStructure |> pack

0 commit comments

Comments
 (0)