File tree Expand file tree Collapse file tree 2 files changed +7
-17
lines changed
neo4j-driver-deno/lib/core Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Original file line number Diff line number Diff line change 18
18
*/
19
19
import { NotificationCategory , NotificationSeverityLevel } from './result-summary'
20
20
21
+ type Combine < Enum1 extends string , Enum2 extends string , Separator extends string = '.' > = `${Enum1 } ${Separator } ${Enum2 } `
21
22
type ExcludeUnknown < T > = Exclude < T , 'UNKNOWN' >
22
23
23
24
type FilterKeys = ExcludeUnknown < NotificationSeverityLevel > | 'ALL'
24
25
type FilterInnerKeys = ExcludeUnknown < NotificationCategory > | 'ALL'
26
+ type CombinedFilter = Combine < FilterKeys , FilterInnerKeys >
25
27
26
28
type SeverityDotCategoryFilters = { [ key in FilterKeys ] : { [ k in FilterInnerKeys ] : NotificationFilter } }
27
29
28
- type NotificationFilter =
29
- 'NONE' | 'SERVER_DEFAULT' |
30
- 'ALL.ALL' | 'ALL.DEPRECATION' | 'ALL.GENERIC' | 'ALL.HINT' |
31
- 'ALL.PERFORMANCE' | 'ALL.QUERY' | 'ALL.UNRECOGNIZED' | 'ALL.UNSUPPORTED' |
32
- 'INFORMATION.ALL' | 'INFORMATION.DEPRECATION' | 'INFORMATION.GENERIC' | 'INFORMATION.HINT' |
33
- 'INFORMATION.PERFORMANCE' | 'INFORMATION.QUERY' | 'INFORMATION.UNRECOGNIZED' | 'INFORMATION.UNSUPPORTED' |
34
- 'WARNING.ALL' | 'WARNING.DEPRECATION' | 'WARNING.GENERIC' | 'WARNING.HINT' |
35
- 'WARNING.PERFORMANCE' | 'WARNING.QUERY' | 'WARNING.UNRECOGNIZED' | 'WARNING.UNSUPPORTED'
30
+ type NotificationFilter = 'NONE' | 'SERVER_DEFAULT' | CombinedFilter
36
31
37
32
/**
38
33
*
Original file line number Diff line number Diff line change 18
18
*/
19
19
import { NotificationCategory , NotificationSeverityLevel } from './result-summary.ts'
20
20
21
+ type Combine < Enum1 extends string , Enum2 extends string , Separator extends string = "." > = `${Enum1 } ${Separator } ${Enum2 } `;
21
22
type ExcludeUnknown < T > = Exclude < T , 'UNKNOWN' >
22
23
23
24
type FilterKeys = ExcludeUnknown < NotificationSeverityLevel > | 'ALL'
24
25
type FilterInnerKeys = ExcludeUnknown < NotificationCategory > | 'ALL'
26
+ type CombinedFilter = Combine < FilterKeys , FilterInnerKeys >
25
27
26
28
type SeverityDotCategoryFilters = { [ key in FilterKeys ] : { [ k in FilterInnerKeys ] : NotificationFilter } }
27
29
28
- type NotificationFilter =
29
- 'NONE' | 'SERVER_DEFAULT' |
30
- 'ALL.ALL' | 'ALL.DEPRECATION' | 'ALL.GENERIC' | 'ALL.HINT' |
31
- 'ALL.PERFORMANCE' | 'ALL.QUERY' | 'ALL.UNRECOGNIZED' | 'ALL.UNSUPPORTED' |
32
- 'INFORMATION.ALL' | 'INFORMATION.DEPRECATION' | 'INFORMATION.GENERIC' | 'INFORMATION.HINT' |
33
- 'INFORMATION.PERFORMANCE' | 'INFORMATION.QUERY' | 'INFORMATION.UNRECOGNIZED' | 'INFORMATION.UNSUPPORTED' |
34
- 'WARNING.ALL' | 'WARNING.DEPRECATION' | 'WARNING.GENERIC' | 'WARNING.HINT' |
35
- 'WARNING.PERFORMANCE' | 'WARNING.QUERY' | 'WARNING.UNRECOGNIZED' | 'WARNING.UNSUPPORTED'
36
-
30
+ type NotificationFilter = 'NONE' | 'SERVER_DEFAULT' | CombinedFilter
31
+
37
32
/**
38
33
*
39
34
* Notifications filters used during the {@link Driver} and {@link Session} configuration.
You can’t perform that action at this time.
0 commit comments